Ordinary Differential Equations: y Xyyy y
Ordinary Differential Equations: y Xyyy y
5.1 Introduction
y ' a( x) y 2 b( x) y c( x) , (5.2)
is a first order ODE, and the following equation of Euler-type:
y ' a( x) y b( x) . (5.5)
This equation is always solvable using the integrating factor and it has a closed form
solution.
exp[ a( x)dx]
Multiplying both sides of the equation by , which is often called the
integrating factor, we have
y ' e a( x) ye b ( x )e
a ( x ) dx a ( x ) dx a ( x ) dx
, (5.6)
Which can be written as
[ ye ]' b( x)e
a ( x ) dx a ( x ) dx
. (5.7)
By simple integration, we have
ye b ( x )e
a ( x ) dx a ( x ) dx
dx C
. (5.8)
dy
ty (t ) t
Example 5.1: We now try to solve the ordinary differential equation dt with an
initial condition y(0) = 0. As a(t)=t , b(t)= -t, its general solution is:
y (t ) e (t )e dt Ce
tdt tdt tdt
t2 t2 t2
e 2
te 2
dt Ce 2
t2 t2 t2 t2
e e Ce
2 2 2
1 Ce 2
.
0= -1+C , or C=1
For some nonlinear first order ordinary differential equations, sometimes a transform or
change of variables can convert it into the standard first order linear equation (5.5). For
example, the Bernoulli’s equation can be written in the generic form:
y ' p( x) y q ( x) y n , n 1 (5.10)
In the case n=1, it reduces to a standard first order linear ordinary differential equation.
By dividing both sides by yn and using the change of variables:
1 (1 n) y '
u ( x) u'
y n 1 , yn , (5.11)
we have
Ae 19 x
1 , or y ( Ae19 x 1) 19
.
The complementary function is the solution of the linear homogenous equation with constant
coefficients and can be written in a generic form:
terms if the polynomial has n distinct zeros 1 ,...n . For complex roots always
occur in pairs r i , the corresponding linearly independent terms can be replaced by
e rx [ A cos( x) B sin( x )] .
y* ( x)
The particular solution p is any y(x) that satisfies the original inhomogeneous
equation (5.13). Depending on the form of the function f(x), the particular solutions can take
various forms. For most of the combinations of basic functions such as sin x, cos x, ekx , and xn
the method of the undetermined coefficients is widely used. For f(x) = sin(αx) or cos(αx), then
y * A sin x B sin x
we can try p . We then substitute it into the original equation (5.13) so
that the coefficients A and B can be determined. For a polynomial f(x) = x n(n = 0,1,2, … , N), we
y* A Bx Cx 2 ... Qx n
(polynomial). For f ( x) e x ,
kx n
then try p
. Similarly, f ( x ) e sin x or f ( x ) e cos x , we can use
y *p ( A Bx Cx 2 ... Qx n )e kx kx kx
y *p e kx ( A sin x B cos x )
. More general cases and their particular solutions can be found in
various textbooks.
Example 5.3: In order to solve the equation y’’’(x) – 2y’’(x) – y’(x) + 2y(x) = sin x, we have to
find its complementary function yc(x) and its particular integral y*(x). We first try to solve its
complementary equation or homogeneous equation:
y’’’(x) – 2y’’(x) -y’(x) + 2y(x) = 0.
x
Assuming that y Ae , we have the characteristic equation:
3 2 2 2 0 ,
or
( 1)( 1)( 2) 0 .
Thus, three basic solutions are ex , e-xand e2x.The general complementary function
becomes
yc Ae x Be x Ce 2 x .
As the function f(x) = sin x , thus we can assume that the particular integral takes the
form y ( x) a sin x b cos x . Substituting this into the original equation, we have:
*
or
Thus, we have
4a + 2b = 1, -2a+4b = 0,
whose solution becomes
1 1
a b
5, 10 .
The methods for finding particular integrals work for most cases. However, there are
some problems in the case when the right-hand side of the differential equation has the same
form as part of the complementary function. In this case, the trial function should include one
higher order term obtained by multiplying the standard trial function by the lowest integer
power ox x so that the product does not appear in any term of the complementary function. Let
us see an example.
Example 5.4: Consider the equation
y ''( x) 3 y '( x ) 2 y( x) e x .
x
Using y ( x) Ke , we have the characteristic equation
2 3 2 0 .
Its complementary function is
yc Ae x Be 2 x .
As the right hand side f(x) = ex is of the same form as the first term of yc , then standard trial
function aex cannot be a particular integral as it automatically satisfies the homogenous
y ''( x) 3 y '( x) 2 y ( x) 0 . We have to try y*p ( a bx)e x first, and we have:
e x ( a 2b bx) 3e x ( a b bx) 2( a bx )e x e x
or
b= -1.
As there is no constraint for a, thus we take it to be zero (a = 0). In fact, any non-zero ae x
can be absorbed into Aex. Thus, the general solution becomes:
y xe x Ae x Be 2 x .
D , and D n n . Thus, any polynomial P(D) will map to P( ) . On the other hand, the
or
17
y* e2 x
D 2 .
5
Since D 2 , we have:
5 5 5
17e 2 x e2 x
y 5
*
2 2 2 .
This method also works for sin x,cos x,sinh x and others, and this is because they are
1
x sin (ei e i ) x
and cosh x (e e ) / 2.
x
related to e via 2i
If the independent variable x does not appear explicitly in f and g, then the system is said to be
autonomous. Such a system has important properties. For simplicity and in keeping with the
convention, we use t =x and u du / dt in our following discussion. A general linear system of
n-th order can be written as:
u1 a11 a12 a1n u1
u2 a21 a22 a2 n u2
u n an1 an 2 ann un
, (5.20)
or
u Au . (5.21)
If u = v exp(λt), then this becomes an eigenvalue problem for matrix A,
( A )v 0 , (5.22)
which will have a non-trivial solution only if
One of the commonly used second-order ordinary differential equation is the Sturm-
Liouville equation in the interval x [ a, b]
d dy
[ p ( x ) ] q ( x) y r ( x ) y 0
dx dx , (5.24)
with the boundary conditions
For each eigenvalue λn, there is a corresponding solution n , called eigenfunctions.
The Sturm-Liouville theory states that for two different eigenvalues m n , their
eigenfunctions are orthogonal. That is:
b
a m ( x)n ( x)r ( x)dx 0
. (5.26)
or more generally:
b
a m ( x)n ( x )r ( x )dx mn
(5.27)
It is possible to arrange the eigenvalues in an increasing order:
y ' p( x) q( x) y r ( x) y 2 , r ( x) 0 (5.29)
If r(x) = 0, then it reduces to a first order linear ODE. By using the transform:
u '( x)
y ( x)
r ( x )u ( x ) , (5.30)
or
u ( x) e
r ( x ) y ( x ) dx
, (5.31)
we have
u '' P( x )u ' Q ( x )u 0 , (5.32)
Where
r '( x ) r ( x )q ( x)
P( x)
r ( x) , Q( x ) r ( x ) p ( x ) . (5.33)
5.5.1 Bessel Equation
The well-known Bessel equation
v2
( xy ') ' ( x ) y 0
x . (5.35)
Although v can be any real values, but we only focus on the case when the values of v
are integers. In order to solve this equation, we assume that the solution can be written as a
series expansion in the form:
y ( x) x s
a x a x
n 0
n
n
n0
n
n s
a0 0 ,
, (5.36)
where s is a parameter to be determined. If a0 = 0, we can always change the value of s, so that
the first term of a is not zero. Thus, we assume in general a0 0 . This method is often called
n
the Frobenius method which is essentially an expansion in terms of a Laurant series. Thus, we
have:
dy
an (n s ) x n s 1
dx n 0 , (5.37)
d2y
2
an (n s)(n s 1) x n s 2
dx n 0 . (5.38)
Substituting these expressions into the Bessel equation, we have:
a0 ( s 2 v 2 ) 0 . (5.40)
a1 (2s 1) 0 , (5.42)
or
1
a1 0 , s ( )
2 . (5.43)
For the rest of terms n = 2, 3, 4, … , we have:
an (n s )(n s 1) an (n s ) an 2 v 2 an ) 0 (5.44)
or
an 2 an 2
an
(n s ) v
2 2
n(n 2v) . (5.45)
Since we now know that a1 = 0, thus a3 = a5 = a7 = … = a1 = 0. All the even terms contain the
factor a0, we finally have:
(1)k v !
y ( x) a0 x 2 k v a0 J v
k 0 2 2k
k !( k v )! , (5.46)
where we have used n = 2k = 0, 2, 4, … so that k = 0, 1, 2, 3, …
The function Jv
(1) n
J v 2n 2 nv
n 0 2 n !( n v )! x , (5.47)
is called the Bessel function of the order v. This is the Bessel function of the first kind. It has
many interesting properties:
d
[( x v J v ( x)] x v J v 1 ( x);
dx (5.48)
J
v
v 1
J v ( x) (1)v J v ( x)
, (5.49)
and
x
0
uJ 0 (u )du xJ1 ( x )
(5.50)
There are other properties as well such as the orthogonality:
b
a
xJ v ( x) J v ( x )dx 0
, ( ) . (5.51)
5.5.2 Euler Buckling
As an example, let us look at the buckling of an Euler column which is essentially an
elastic rod with one pin-jointed end and the applied axial load P at the other end. The column
I y 2 dA const
has a length of L. Its Young’s modulus is E and its second moment of area is
(for a given geometry). Let u(x) be the transverse displacement, the Euler beam theory gives
the following governing equation:
EI d 2u
u 0
P dx 2 , (5.52)
or
P
2
u '' u 0 ,
2
EI , (5.53)
which is an eigenvalue problem. Its general solution is
u A sin x B cos x . (5.54)
Applying the boundary conditions, we have at the fixed end
u=0 (at x=0), B=0, (5.55)
and at the free end
u=0, (at x = L), Asin(αL) = 0. (5.56)
Thus we have two kinds of solutions either A = 0 or sin(αL) = 0. For A = 0, we have u(x) = 0 which
is a trivial solution. So the non-trivial solution requires that
sin(αL) = 0, (5.57)
or
αL = 0 (trivial) , π , 2π, …, nπ, … (5.58)
Therefore, we have:
n 2 2 EI
P 2 EI
L2 , (n=1,2,3, …). (5.59)
The solutions have fixed mode shapes (since functions) at some critical values (eigenvalues P n).
The lowest eigenvalue is:
2 EI
P*
L , (5.60)
which is Euler buckling load for an elastic rod.
5.5.3 Nonlinear Second-Order ODEs
For higher-order nonlinear ordinary differential equations, there is no general solution
technique. Even for relatively simple second-order ODEs, different equations will usually
require different methods, and there is no guarantee that you can find the solution. One of the
best methods is the change of variables so that the nonlinear equation can be transformed into
a linear ordinary differential equation or one that ca be solved by other methods. This can be
beautifully demonstrated by the solution process of finding the orbit of a satellite.
As the satellite orbits the Earth, the force is purely radial in the polar coordinates,
d
L mr 2 const
therefore, its total angular momentum L is conserved. dt , or
r L / m h const . The radial acceleration is ar r r . Using Newton’s second law of
2
d 2r d GMm
m[ 2
r ( )2 ] 2
dt dt r , (5.61)
where M and m are the masses of the Earth and the satellite, respectively. G is the
universal constant of gravitation. Using the conservation of angular momentum so that:
h2 L
r 2 h
r3 , M , (5.62)
we then have:
d 2 r h 2 GM
2 0
dt 2 r 3 r , (5.63)
which is a nonlinear equation. By using the change of variables u = 1/r, the conservation
of angular momentum becomes:
d
hu 2
dt , (5.64)
have:
dr du du
u 2 h
dt dt d , (5.65)
and
d 2u dr d 2 u d 2
2 2 d u
h 2 h u
dt 2 dt d dt d 2 . (5.66)
Now the governing equation becomes:
d 2u
h 2u 2 h 2u 3 GMu 2 0
d 2
, (5.67)
or
d 2u GM
u 2 S
d 2
h . (5.68)
Since this is a second-order linear ordinary differential equation, it is straightforward to
write down its solution:
u S A cos B cos S [1 e cos( )] , (5.69)
where A and B are integration constants, which can be converted into the eccentricity e
and the initial phase . The final solution is:
1
r
S [1 e cos( )] , (5.70)
which corresponds to an ellipse where e is the eccentricity of the orbit. If we set the
polar coordinates in such a way that =0 (say, along the major axis) and one focus at the
origin, then the equation simply becomes:
h2
r
GM [1 e cos ] , (5.71)
Which is the orbit for satellites and planets.