ordinary differential equations (5 lectures) • matrices (5

23
ME10305 MATHEMATICS 2 • Ordinary Differential Equations (5 lectures) • Matrices (5 lectures) • Laplace Transforms (4 lectures) • Numerical Mathematics (iteration schemes) (2 lectures) • Fourier Series (3 lectures) • Least Squares Fitting of Data (1 lecture)

Upload: others

Post on 29-Mar-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

• Matrices (5 lectures)
• Fourier Series (3 lectures)
1 ORDINARY DIFFERENTIAL EQUATIONS
• Actually, they contain ordinary derivatives, rather than partial derivatives.
• We will meet partial differential equations in ME20021 Modelling Techniques 2 this time next year. Sorry.
• Some of the other topics this semester give us alternative ways to solve ODEs.
But what is the point of solving ODEs?
Here’s the reason...
dy
mz ′′ = k(y − 2z)
f ′′′ + 1 2 ff ′′ = 0 Boundary layer on a flat surface
f ′′
1 +H(h1 − g1) = 0,
0 +H(h0 − g0) = 2


]
,

]
,
4 +Hγ(g4 − h4) = 0,
Weakly nonlinear analysis of the onset of convection in a porous layer which is subject to local thermal nonequilibrium.
• So ODEs appear in a variety of contexts many of which are important to the engineer.
• The ones we have seen so far clearly model different contexts,
• and look quite different from one another,
• and will therefore require different techniques to solve them,
• which means that we have to start off with how to classify different ODEs.
The good news is that we won’t be solving any ODEs in this lecture!
1.2 Classification
Ordinary differential equations also have different methods of solution (both analytical and numerical) depending on their classification.
We will classify ODEs in three different ways:
• IVP or BVP (i.e. Initial value problem or Boundary Value Problem),
• Linear or Nonlinear,
1.2.1 IVP or BVP?
An equation containing only a first derivative, such as dy
dt = −3y, is a first order equation.
Strictly speaking it is incomplete because it requires a condition for it to be solved, an initial condition.
A good example is y(0) = 1 and then it is possible to provide a full solution, as we shall see later.
Note: that first order ODEs (or systems of first order ODEs) are often known as evolution equations
because the solution evolves from its value at t = 0.
For this reason Example 1 (ODE and the initial condition) is an instance of an Initial Value Problem
(IVP). Of course, an initial condition could be at a time other than t = 0.
Example 2.
d2y
dy
dt + 5y = 0 subject to y(0) = 1 and y′(0) = 0,
where we have two conditions given at t = 0. So this too is an IVP.
This represents a damped mass/spring system.
The initial displacement is y = 1 and the velocity is zero. We can imagine happens next.
Example 2b.
d2y
dt + 5y = 0 subject to y(0) = 1 and y(1) = 2,
where we have two conditions again, but they are now given at two different times. So this is a Boundary Value Problem or BVP, for short.
Note: From a numerical perspective the distinction between an IVP and a BVP is important.
Many numerical methods solve IVPs easily, so we would need to guess the unknown value of y′(0) and march forward to t = 1. Then we would need to iterate to find the correct y′(0) which yields y(1) = 2.
Note that an ODE needs a set of boundary conditions to enable it to be solved. If the problem is an IVP, then the boundary conditions are then known as initial conditions.
Example 3. As a final example consider the following coupled set of equations:
m d2x
d2y
d2z
dt2 + k(−y + 2z) = 0.
• • •
If we had to solve this subject to the conditions:
x(0) = 1, x′(0) = 0, y(0) = 0, y′(0) = 1, z(0) = 0, z′(0) = 0,
then the ODE and its boundary conditions form an IVP.
Each of the following boundary conditions and the ODE yield a BVP:
x(0) = 1, x′(0) = 0, y(1) = 0, y′(0) = 1, z(0) = 0, z′(0) = 3 or
x(0) = 1, x′(5) = 0, y(5) = 0, y′(0) = 5, z(0) = 7, z′(0) = 0.
1.2.2 Linearity and Nonlinearity
A horrible but correct definition of a linear equation:
An equation or system of coupled equations is linear when all the dependent variables
and their derivatives are multiplied either by constants or by functions of the independent
variable, otherwise the equation or system is nonlinear.
Here is the most complicated linear equation with and nth derivative:
fn(t) dny
dt + f0(t)y = F (t),
where fi(t) (i = 0, 1, 2, · · · , n) and F (t) are given functions of t at worst.
If the coefficients of y and its derivatives are constants, then
an
dny
and we will be solving these later.
The extension of this definition of linearity to systems of equations is straightforward: all of the ODEs making up the system must be linear. The mass/spring system with three masses is a good example.
Example 1.1: y′ + ay = 0 is linear. Here, y and y′ are multiplied by constants.
Example 1.2: y′′ − ty = e−t is also linear. (Airey’s equation)
y is multiplied by a function of t and y′ is multiplied by a constant. The function of t on the right hand is irrelevant.
Example 1.3: A′ +A−A3 = 0 is nonlinear because of the A3, a power of the dependent variable.
Example 1.4: y′′′ + yy′
= 0 is nonlinear. A product of two dependent variables.
Example 1.5: θ′′ + (g/L) sin θ = 0 is nonlinear because sin θ θ − 1
3! θ3 + · · · , using Taylor’s
series.
nonlinear
= 0 .
The first equation is linear but the second is nonlinear due to the presence of yz, a product of dependent varables. Overall, this is a nonlinear system because the nonlinearity in the second equation effectively contaminates the full system.
1.2.3 The order of ODEs and systems of ODEs
The order of an equation is the order of the highest derivative appearing in that equation. Thus
dy
while
d3y
dt3 +
(dy
dt
)10
+ y = 0 is of 3rd order.
Do not be put off by the 10th power appearing on the 1st derivative term; the 10th power does not affect the fact that the highest derivative is a 3rd derivative.
The system,
m d2x
dt2 + k(2y − x) = 0,
is of 4th order because it is composed of two 2nd order equations: 2 + 2 = 4.
f ′′
1 +H(h1 − g1) = 0,
0 +H(h0 − g0) = 2


]
,

]
,
4 +Hγ(g4 − h4) = 0,
This is a 30th order system. It is possible to solve a 3605th order system.
1.2.4 Reduction to First order Form
The idea of the order of a system of equations helps us to reduce an equation/system to first order
form.
d3y
dt3 +
(dy
dt
)10
+ y = 0.
It is of 3rd order, and it may be transformed into first order form by first defining three new independent variables, y1, y2 and y3, each of which are functions of t, according to
y1 = y, y2 = dy
d2y
dt2 .
We now form 1st order equations for each of these three variables, either by using these definitions or by using the ODE suitably translated into the new notation. Thus we obtain,
dy1
2 ,
We now have three first order ODEs which replace the original 3rd order ODEs.
Example 1.8. Consider the following three equations:
m d2x
d2y
d2z
dt2 + k(−y + 2z) = 0.
It is a 6th order system and requires six replacement variables. We let,
v1 = x, v2 = dx
dt , v3 = y, v4 =
dz1
dz5
dt = −k(−z3 + 2z5).
Note: This technique of reduction to first order form is especially useful when solving ODEs using numerical methods; this topic will be covered in ME20014 Modelling Techniques 1 next semester.
The subscripts which have been used in the new dependent variables represent array indices in Matlab or Fortran.
v2
subscript
−→ v(2)
index
Note: We have only reduced an ODE and a system of ODEs to first order form. We also need to consider the boundary conditions because that will be essential in numerical practice.
1.2.5 Full classifications and reduction to first order form
Example 1.9: Consider the fifth order equation,
y′′′′′ + t2y′′′(1 − y′) + yy′′ = t,
subject to the boundary conditions,
y(0) = y′(0) = 0, y′′(0) = 1, y′(1) = 1, y′′′(1) = 0.
This may be seen to be a 5th order nonlinear BVP.
The most compact way of reducing this to first order form is tabular:
Variable Equation BC(t = 0) BC(t = 1) y1 = y y′
1 = y2 y1(0) = 0 •
y3 = y′′ y′
5 = t− y1y3 − t2y4(1 − y2) • •
The bullet symbols have been used solely to indicate those initial and final conditions which haven’t been specified.
Example 1.10: Consider the following system of ODEs,
ψ′′′ + 3ψψ′′ − 2(ψ′)2 + θ +Nφ = 0,
θ′′ + 3aψθ′ = 0, φ′′ + 3b ψφ′ = 0,
where a, b and N are constants. These equations arise in the free convective boundary layer flow due to heat and solute being supplied into a fluid. The primes denote derivatives with respect to distance, x.
At x = 0 we have ψ = ψ′ = 0 and θ = φ = 1, while ψ′, θ and φ become zero as x → ∞.
We need seven variables to replace ψ, θ and φ. Three for ψ and two each for θ and φ.
Variable Equation BC(x = 0) BC(x → ∞) v1 = ψ v′
1 = v2 v1 = 0 •
v3 = ψ′′ v′ 3 = −3v1v3 + 2v2
2 − v4 −Nv6 • •
v5 = θ′ v′ 5 = −3av1v5 • •
v6 = φ v′ 6 = v7 v6 = 1 v6 → 0
v7 = φ′ v′ 7 = −3bv1v7 • •
So this is a 7th order nonlinear boundary value problem. The initial conditions for v3, v5 and v7 are unknown and will need to be iterated upon in a numerical scheme to enable the the three boundary conditions as x → ∞ to be satisfied — again, this numerical aspect is something that you won’t need to worry about until next semester in ME20014, Modelling Techniques 1.
ORDINARY DIFFERENTIAL EQUATIONS
Reduction to First order Form
Full classifications and reduction to first order form