0% found this document useful (0 votes)
330 views

Ordinary Differential Equations: y Xyyy y

(1) Ordinary differential equations relate functions and their derivatives. They can model many engineering problems. (2) First order ODEs can be solved using integrating factors for linear equations or variable transformations for some nonlinear equations to obtain closed-form solutions. Initial/boundary conditions determine integration constants. (3) Higher order linear ODEs with constant coefficients have solutions as the sum of the complementary function and particular integral. Solving higher order or nonlinear ODEs generally requires numerical methods.

Uploaded by

Adrian Gavrila
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
330 views

Ordinary Differential Equations: y Xyyy y

(1) Ordinary differential equations relate functions and their derivatives. They can model many engineering problems. (2) First order ODEs can be solved using integrating factors for linear equations or variable transformations for some nonlinear equations to obtain closed-form solutions. Initial/boundary conditions determine integration constants. (3) Higher order linear ODEs with constant coefficients have solutions as the sum of the complementary function and particular integral. Solving higher order or nonlinear ODEs generally requires numerical methods.

Uploaded by

Adrian Gavrila
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Chapter 5

Ordinary Differential Equations

Most mathematical models in engineering are formulated in terms of differential


equations. If the variables or quantities (such as velocity, temperature, pressure) change with
other independent variables such as spatial coordinates and time, their relationship can in
general be written as a differential equation or even a set of differential equations.

5.1 Introduction

An ordinary differential equation (ODE) is a relationship between a function y(x) of an


independent variable x and its derivatives y ' , y '' , … , y . It can be written in a generic form:
(n)

 ( x, y , y ', y '',..., y ( n ) )  0 . (5.1)


The solution of the equation is a function y=f(x), satisfying the equation for all x in a
given domain  .
The order of the differential equation is equal to the order n of the highest derivative in
the equation. Thus, the Riccati equation:

y ' a( x) y 2  b( x) y  c( x) , (5.2)
is a first order ODE, and the following equation of Euler-type:

x 2 y '' a1 xy ' a0 y  0 , (5.3)


is a second order. The degree of the equation is defined as the power to which the highest
derivative occurs. Therefore, both Ricatti equation and Euler equation are of the first degree.
An equation is called linear if it can be arranged into the form:

an ( x) y ( n )  ...  a1 ( x) y ' a0 ( x) y   ( x ) , ( 5.4)


where all the coefficients depend on x only, not on y or any derivatives. If any of the coefficients
is a function of y or any of its derivatives, then the equation is nonlinear. If the right hand side is
zero or  ( x)  0 , the equation is homogenous. It is called nonhomogeneous if  ( x)  0 .
The solution of an ordinary differential equation is not always straightforward, and it is
usually very complicated for nonlinear equations. Even for linear equations, the solutions can
only be obtained for a few simple types. The solution of a differential equation generally falls
into three types. The solution of a differential equation generally falls into three types: closed
form, series form and integral form. A closed form solution is the type of solution that can be
expressed in terms of elementary functions and some arbitrary constants. Series solutions are
the ones that can be expressed in terms of a series when a closed-form is not possible for
certain type of equations. The integral form of solutions or quadrature is sometimes the only
form of solutions that are possible. If all these forms are not possible, the alternatives are to
use approximate and numerical solutions.

5.2 First Order ODEs


5.2.1 Linear ODEs
The general form of a first order linear differential equation can be written as:

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)

So its solution becomes


y ( x)  e   a ( x ) dx dx  Ce   a ( x ) dx
 a ( x ) dx
 b ( x )e , (5.9)

where C is an integration constant. The integration constant can be determined if extra


requirements are given, and these extra requirements are usually the initial condition when
time is zero or boundary conditions at some given points which are at the domain boundary.
However, the classification of conditions may also depend on the meaning of the independent
x. If x is spatial coordinate, then y(x=0) = y0 is boundary condition at x=0. However, if x=t means
time, then y(t=0) = y0 can be thought of as the initial condition at t=0. Nevertheless, one
integration constant usually requires one condition to determine it.

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
.

From the initial condition y(0) = 0 at t=0, we have:

0= -1+C , or C=1

Thus, the solution becomes:


t2

y (t )  e 2
1 .

5.2.2 Nonlinear ODEs

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

u ' (1  n) p( x)u  (1  n)q( x) , (5.12)


which is a standard first order linear differential equation whose general solution is given earlier
in this section.
Example 5.2: To solve y’(x) + xy = y20 , we first use u(x) = 1/y19 , and we u’=-19y’/y20. The
original equation becomes:
u’ – 19xu = -19,
whose general solution is
u(x) = Ae19x + 1.
Therefore, the solution to the original equation becomes:
1
y19  
1

Ae 19 x
1 , or y  ( Ae19 x  1) 19
.

5.3 Higher Order ODEs


Higher order ODEs are more complicated to solve even for the linear equations. For the
special case of higher-order ODEs where all the coefficients a n , … , a1 , a0 are constants,
any(n)+ … +a1y’ + a0y = f(x), (5.13)
its general solution y(x) consists of two parts: the complementary function y c(x) and the
y*p ( x)
particular integral or particular solution . We have:
y*p ( x )
y(x) = yc(x) + (5.14)

5.3.1 General Solution

The complementary function is the solution of the linear homogenous equation with constant
coefficients and can be written in a generic form:

an ycn  an 1 yc ( n 1)  ...  a1 y 'c  a0  0 (5.15)


x
Assuming y  Ae , we get the polynomial equation of characteristics

an  n  an1 ( n 1)  ...  a1  a0  0 (5.16)


which has n roots in general. Then, the solution can be expressed as the summation of various
yc ( x)   k 1 ck ek x
n

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:
*

(a cos x  b sin x)  2(a sin x  b cos x)


(a cos x  b sin x)  2(a sin x  b cos x)  sin x ,

or

(b  2a  b  2a  1)sin x  (a  2b  a  2b) cos x  0 .

Thus, we have
4a + 2b = 1, -2a+4b = 0,
whose solution becomes
1 1
a b
5, 10 .

Now the particular integral becomes


1 1
y *( x )  sin x  cos x
5 10 .

Finally, the general solution


1 1
y  sin x  cos x  Ae x  Be  x  Ce 2 x
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

Dividing both sides by ex , we have:

(a  2b  bx)  3(a  b  bx)  2(a  bx)  1 ,

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 .

5.3.2 Differential Operator

A very useful technique is to use the method of differential operator D. A differential


operator D is defined as:
d
D
dx . (5.17)

Since we know that De


x
  e x and D n e x   n e x , so they are equivalent to

D   , and D n   n . Thus, any polynomial P(D) will map to P( ) . On the other hand, the

integral operator D-1=  dx


is just the inverse of the differentiation. The beauty of using the
differential operator form is that one can factorize it in the same way as for factorizing
polynomials, then solve each factor separately. Thus, differential operators are very useful in
finding out both the complementary functions and particular integral.
Example 5.5: To find the particular integral for the equation
Y’’’’’+ 2y = 17e2x ,
we get
( D5  2) y*  17e2 x ,

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

Higher order differential equations can conveniently be written as a system of


differential equations. In fact, an nth-order linear equation can always be written as a linear
system of n first-order differential equations. A linear system of ODEs is more suitable for
mathematical analysis and numerical integration.

5.4 Linear System


For a linear n order equation (5.15), it can be always written as a linear system:
dy dy1 dyn 1
 y1  y2  yn  1
dx , dx , … , dx ,

an ( x) yn' 1  an 1 ( x ) yn 1  ...  a1 ( x ) y1  a0 ( x) y   ( x) , (5.18)

Which is a system for u = [y y1 y2 … yn-1]T.


For a second-order differential equation, we can always write it in the following form:
du dv
 f (u , v, x)  g (u , v, x)
dx , dx . (5.19)

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:
 u1   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

det( A  )  0 . (5.23)

5.5 Sturm-Liouville Equation

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

y (a)   y ' ( a)  0 , y (b)   y ' (b)  0 , (5.25)


where the known function p(x) is differentiable, and the known functions q(x), r(x) are
continuous. The parameter λ to be determined can only take certain values λn , called the eigen-
values, if the problem has solutions. For the obvious reason, this problem is called the Sturn-
Liouville eigenvalue problem.

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:

1  2 ...  n  ...   (5.28)


Sometimes, it is possible to transform a nonlinear equation into a standard linear
equation. For example, the Riccati equation can be written in the generic form:

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

x 2 y '' xy '  ( x 2  v 2 ) y  0 , (5.34)


is in fact an eigenvalue problem as it can be written as

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

n0
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:
   

 (k  s)(k  s  1)an x n s   (n  s)an x n s   an x n s 2  v 2  an x n s  0


n0 n 0 n 0 n 0 (5.39)
Equating the coefficients of the same power xn(n = 0, 1, 2, …), we can get some recurrence
relationships. For n = 0, we have:

a0 ( s 2  v 2 )  0 . (5.40)

Since a0  0 , we thus have:


s  v . (5.41)
From n = 1 terms, we have:

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 nv
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  

motion and Newton’s law of gravity, we have:

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)

which is equivalent to dt  d / (hu ) and this can be used to eliminate t. Then, we


2

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.

You might also like