You are on page 1of 18

Sem.

1 Sesi 06/07

KXEX2244 ORDINARY DIFFERENTIAL EQUATION

Course Contents

Chapter 1. Introduction. First Order Differential Equation

Chapter 2. Second Order Differential Equation

Chapter 3. Series Solutions of Differential Equation

Course Synopsis
:
Fundamental concepts and definitions in ODE, Initial valued problem, First
order ODE: separable, linear, exact equations and equations reducible to those
forms. Integrating factor. Linear equation of higher order: Linearly independent
solutions, Wronskian, Lagrange’s reduction of order, complementary functions
and particular solutions, the method of undetermined coefficients, the variation of
parameters, Euler-Cauchy’s equation. Series solution method: power series,
convergence, series solution at ordinary and singular points, the method of
Frobenius.

Tutorial papers

Tutorial 1 to 8

References

1. Engineering Mathematics (5th Ed), K Stroud & D Booth, Palgrave (2001)

2. Advanced Engineering Mathematics (8th Ed), Erwin Kreyszig, John Wiley


(1998)

3. Modern Engineering Mathematics (2nd Ed), Glyn James, Addison-Wesley


(1996)

4. Theory and Problems of Differential Equations. Frank Ayres Jr. Schaum’s


Outline Series.

Assessment

Mid-Semester Exam: 30%

Assignment: 10%

Final Exam: 60%

1
Sem. 1 Sesi 06/07

CHAPTER 1

1. Introduction

Definition 1: For a function such as y = f (x) or implicitly as φ ( x, y ) = 0 , x is known as


the independent variable and y the dependent variable. An equation that involves
derivatives is known as a differential equation. If there is a single independent variable,
the equation is called an ordinary differential equation (ODE).

Example 1 (Ref: page 1)


dy
i) = y sin x
dx
ii) 3( y ′′) 2 + x( y ′) 5 = 2 x + 1
iii) x 2 y ( 4) + y = tan x
In all cases, y is a function of x, i.e. y = y (x) .

When there are two or more variables, the equation is called a partial differential equation
(PDE). You will learn this in detail KXEX3244.

Example 2 (Ref: page 1)


∂U ∂U
+ = 2 x + y where U ( x, y ) is the dependent variable.
∂x ∂y

Definition 2 : The order of a differential equation is the order of the highest derivative
appears in the equation. The degree of a differential equation is the degree of the highest
derivative term.

Example 3 (Ref: page 1)


For ODE in Example 1
i) Order 1, Degree 1
ii) Order 2, Degree 2
iii) Order 4, Degree 1

Definition 3 : A linear ODE of order n is an equation of the form


a n ( x) y ( n ) + a n −1 ( x) y ( n −1) + Κ + a 2 ( x) y ′′ + a1 ( x) y ′ + a 0 ( x) y = g ( x)
where a i (x) and g (x) are functions of x only.
A differential equation that is not linear is known as nonlinear differential equation.

Example 4 (Ref: page 2)


i) 2 x 2 y ′′ − xy ′ + y = 0 linear ODE
ii) y ′′ + y 3 = x nonlinear ODE
iii) y ′′ − yy ′ − y = x nonlinear ODE

2
Sem. 1 Sesi 06/07

2 Solutions of Differential Equations

Definition 4: A differentiable function φ (x) is a solution of an ODE if y = φ (x) is


substituted into the differential equation, gives an identity.

Example 5 (Ref: page 2)


1
Verify that φ ( x) = x 3 − is a solution to the second order differential equation
x2
x 2 y ′′ = 6 y .

1 6
Let y = φ ( x) = x 3 − ⇒ φ ′′( x) = 6 x −
x2 x4
 6   1 
LHS = x 2 y ′′ = x 2  6 x − 4  = 6 x 3 − 2 
 x   x 
= 6y = RHS
1
Hence φ ( x) = x 3 − 2 is a solution to x 2 y ′′ = 6 y .
x

Example 6 (Ref: page 3)


Show that φ ( x) = ax + b x , where a and b are arbitrary constants, is a solution of
2 x 2 y ′′ − xy ′ + y = 0 .

Let y = φ ( x) = ax + b x
b b
⇒ y′ = a + and y ′′ = − x −3 / 2 .
2 x 4
2
LHS = 2 x y ′′ − xy ′ + y
 b   b 
= 2 x 2  − 3 / 2  − x a +  + ax + b x = 0 = RHS.
 4x   2 x
Hence φ ( x) = ax + b x is a solution for 2 x 2 y ′′ − xy ′ + y = 0 .

Definition 5 : A relation φ ( x, y ) = 0 is said to be an implicit solution of an ODE if we can


deduce the differential equation from it.

Example 7 (Ref: page 3)


Show that x 2 + y 2 − 4 = 0 is a solution of yy ′ = − x .

Differentiate implicitly x 2 + y 2 − 4 = 0 wrt x.


2 x + 2 yy ′ = 0
⇒ yy ′ = − x .
Hence the circle x 2 + y 2 − 4 = 0 is a solution for yy ′ = − x .

3
Sem. 1 Sesi 06/07

dy
The relations = f (x) and y = ∫ f ( x) dx are equivalent.
dx

Example 8 (Ref: page 4)


Solve the equation y ′ = cos x .
dy
= cos x ⇒ y = ∫ cos x dx
dx
= sin x + C where C is an arbitrary constant.

Definition 6
A general solution of differential equation of order n contains n independent arbitrary
constants. A particular solution of a differential equation is one obtained from the general
solution by assigning definite values to the arbitrary constants.

Example 9 (Ref: page 4)


Show that y = Ae x + Be2 x is a general solution of the differential equation
d2y dy
2
−3 + 2y = 0 .
dx dx

y = Ae x + Be2 x ⇒ y′ = Ae x + 2 Be 2 x and y′′ = Ae x + 4 Be 2 x .


Then
LHS = y′′ − 3 y′ + 2 y
= ( Ae x + 4 Be 2 x ) −3( Ae x + 2 Be 2 x ) + 2( Ae x + Be 2 x )
= ( A − 3 A + 2 A)e x + (4 B − 6 B + 2 B)e 2 x = 0
This shows that y = Ae x + Be2 x is a general solution.

4
Sem. 1 Sesi 06/07

3 Initial Value Problem

A linear ODE of order n given by


a n ( x) y ( n ) + a n −1 ( x) y ( n −1) + Κ + a 2 ( x) y ′′ + a1 ( x) y ′ + a 0 ( x) y = g ( x)
subject to the n initial conditions
y ( x0 ) = y0 , y′( x0 ) = y1 , y′′(0) = y2 K
is known as an initial value problem (IVP). Many problems in physical sciences can be
classified as IVP. An example is a simple electrical circuit element connected in series of
• a battery or a generator, supplying an emf E (volts)
• a resistor having resistance R (ohms)
• an inductor having inductance L (henrys)
• a capacitor having capacitance C (farads)

These circuit elements are represented symbolically as follows

When the circuit is completed, a charge q (coulombs) will flow to the capacitor plates.
dq
The time rate for the flow of charge is given by = i (current) and measured in
dt
amperes. The basic relations are
• voltage drop across a resistor, V(t) = R i(t)
di (t )
• voltage drop across an inductor, V (t ) = L
dt
1
• voltage drop across a capacitor, V (t ) = q (t )
C
• voltage drop across a generator = − voltage rise = −E

The differential equation is derived by using the Kirchhoff’s Law.


(Va − Vd ) + (Vb − Va ) + (Vc − Vb ) + (Vd − Vc ) = 0
di q
E (t ) − R i − L − = 0
dt C
which can be simplified to
d 2q dq 1
L 2 +R + q = E (t ) (3.1)
dt dt C

5
Sem. 1 Sesi 06/07

Example 10 (Ref: page 5)


Show that y = 2sin x + cos x is the solution for the initial value problem
y′′ + y = 0 , y (0) = 1 , y′(0) = 2

y = 2sin x + cos x ⇒ y′ = 2 cos x − sin x and y′′ = −2sin x − cos x


LHS = y′′ + y = (−2 sin x − cos x) + (2sin x + cos x)
= 0.
y (0) = 2sin 0 + cos 0 = 1
y′(0) = 2 cos 0 − sin 0 = 2
The function satisfies the differential equation and its initial values. Hence
y = 2sin x + cos x is the solution.

Example 11 (Ref: page 6)


Given that y = Ae x + Be2 x is a general solution of the differential equation
d2y dy
2
−3 + 2y = 0 .
dx dx
Find the values of A and B such that it satisfies the initial condition
y (0) = 2 and y′(0) = −5 .

4 Linear Differential Equations

A differential equation in the form of


dy
+ Py = Q (4.1)
dx
is called a linear differential equation, where P and Q, are functions of x (but not of y).
Let U = y exp( ∫ P ( x) dx)
dU dy

dx dx
( ) (
= exp ∫ P ( x) dx + y exp ∫ P ( x) dx P ( x) ) (4.2)

Compare (4.1) and (4.2). Multiply both sides of (4.1) by exp ( ∫ P( x) dx ) .


exp ( ∫ P dx ) dy
dx
+ Py exp ( ∫ P dx ) = Q exp ( ∫ P( x) dx )
d

dx
( y exp(−∫ P dx) ) = Q exp ( ∫ P( x) dx ) (4.3)

Note : µ ( x) = exp ( ∫ P( x) dx ) is called the integrating factor (I.F.)

6
Sem. 1 Sesi 06/07

Example 12 (Ref: page 25)


Solve the equation y′ − y = e 4 x .

Integrating factor, µ ( x) = exp ( ∫ −1 dx ) = e −x

e− x y′ − ye− x = e 4 x e− x
d
From (4.3),
dx
( y e − x ) = e3 x
⇒ y e − x = ∫ e3 x dx
1 3x
= e +A
3
1
⇒ y = e 4 x + Ae x
3

Example 13 (Ref: page 25)


Solve the equation xy′ + y + 6 = 0 .
1 6
y′ + y = −
x x
 1 
Integrating factor, µ ( x) = exp  ∫ dx  = eln x = x
 x 

xy + y = −6
d
( xy ) = −6
dx
xy = −6 x + A
A
⇒ y = −6.
x

Example 14 (Ref: page 26)


Solve the initial value problem
y′ + y tan x = sin 2 x , y (0) = 1 .

Integrating factor, µ ( x) = exp ( ∫ tan x dx ) = e − ln cos x


= sec x .
2sin x cos x
sec xy′ + y tan x sec x = .
cos x
d
( sec x y ) = 2sin x
dx
y sec x = −2 cos x + A
When x = 0, y = 1 ⇒ 1 = −2 + A
y
⇒ = 3 − 2 cos x
cos x

7
Sem. 1 Sesi 06/07

Hence y = 3cos x − 2 cos 2 x .

Example 15 (Ref: page 26)


Solve the initial value problem
dy y
= , y (1) = 1 .
dx 2 x + 3 y 2 − 2

The differential equation is not linear in y.


dx 2 x + 3 y 2 − 2
=
dy y
2 3y2 − 2
= x+
y y
However the equation is linear in x , i.e.
dx 2 3y2 − 2
− x=
dy y y
 2  1
Integrating factor, µ ( y ) = exp  − ∫ dy  = e −2ln y = 2 .
 y  y
1 dx 2 3 y 2 − 2
− = .
y 2 dy y 3 y3
d  1  3 2
 x = −
dy  y 2  y y 3
x 1
2
= ∫ 3 y −1 − 2 y −3 dy = 3ln y + 2 + A
y y

When x = 1, y = 1 ⇒ 1 = 0 +1+ A
⇒ 2
x = 3 y ln y + 1 .

8
Sem. 1 Sesi 06/07

Example 16
An inductor of L = 2 henrys and a resistor of R = 10 ohms are connected in series with
an emf of E volt. At t = 0 the switch S is closed. Find the charge and current at any time
t > 0 if
(a) E = 40
(b) E = 20 exp(−3t )

Ignore the capacitor from the circuit so that ( 3.1 ) becomes


d 2q dq
L 2 +R = E (t )
dt dt
di
2 + 10i = E (t )
dt
di E
+ 5i =
dt 2
Integrating factor, ( )
µ (t ) = exp ∫ 5 dt = e5t .
d Ee5t

dt
( i e 5t ) =
2
1
i e5t = ∫ E (t )e5t dt
2

If E = 40 then i e5t = 20 ∫ e5t dt


= 4e 5 t + A
When t = 0, i = 0 ⇒ A = −4
Hence i (t ) = 4 (1 − e )
−5 t

t
q (t ) = 4 ∫ (1 − e −5τ ) dτ
0

9
Sem. 1 Sesi 06/07

If E = 20 exp(−3t ) then i e5t = 10 ∫ e 2t dt


= 5e2t + B
When t = 0, i = 0 ⇒ B = −5
⇒ i (t ) = 5e −3t − 5e −5t .
t
q (t ) = 5∫ (e −3τ − e−5τ ) dτ
0
t
 e −3τ e −5τ 
= 5 − 
 −3 −5  0
 −5e −3t 5 
=  + e −5 t + − 1 
 3 3 

2 5
= + e −5 t − e −3t .
3 3

5 Equations Reducible to the Linear Form (Bernoulli’s equation)

A differential equation of the form


dy
+ p( x) y = r ( x) y n (5.1)
dx
is called the Bernoulli’s differential equation.
If n = 0 or n = 1 then (5.1) is a linear differential equation. For any other value of n,
the equation can be reduced to the linear form by substituting v = y1− n and
dv dy
= (1 − n) y − n .
dx dx
Divide (5.1) by y n .
dy
y−n + p ( x) y1− n = r ( x)
dx
1 dv
⇒ + p ( x )v = r ( x )
(1 − n) dx

Example 17 (Ref: page 28)


dy
Solve the equation + 3 x 2 y = x exp( x3 ) y 2
dx

Not linear but Bernoulli’s with n = 2.


Divide the equation by y 2 .
1 dy 3x 2
2
+ = x exp( x 3 )
y dx y

10
Sem. 1 Sesi 06/07

1 dv 1 dy
Let v = . ⇒ =− 2
y dx y dx
dv
⇒ − + 3 x 2 v = x exp( x3 )
dx
dv
− 3 x 2 v = − x exp( x3 )
dx
Integrating factor, ( )
µ ( x) = exp ∫ −3x 2 dx = exp(− x3 ) .
d

dx
( v exp(− x3 ) ) = − x
x2
v exp(− x 3 ) = − ∫ x dx = − +A
2

1  x2   2 A − x2 
= exp( x 3 )  A −  = exp( x3 )  
y  2  2 
2 exp(− x3 )
⇒ y= where C = 2A.
(C − x 2 )

Example 18 (Ref: page 28)


dy
Solve the equation 3 + y = (1 − 2 x) y 4 .
dx

Bernoulli’s equation with n = 4.


1 dv 3 dy
Let v = 3 . ⇒ =− 4
y dx y dx
4
Divide the equation by y and substitute for v
dv
− v = 2x −1 .
dx
Integrating factor, ( )
µ ( x) = exp ∫ − dx = e− x .
d

dx
( v e − x ) = (2 x − 1)e − x

v e − x = ∫ (2 x − 1)e − x dx
= −2 xe− x − e− x + A
e− x
= e− x (−2 x − 1 + Ae x )
y3
1
⇒ y3 = x .
Ae − 2 x − 1

11
Sem. 1 Sesi 06/07

6 Variables Separable

If a differential equation can be written in the form


g ( y ) dy = f ( x) dx
we say that the variables are separable, y on the LHS and x on the RHS. We get the
solution by integrating both sides.

Example 19 (Ref: page 8)


dy
Solve the equation 9 y + 4 x = 0 .
dx

Separating the variables we get


9 y dy = − 4 x dx
9 y2
Integrating = −2 x 2 + A
2
4 x + 9 y 2 = C where C = 2A.
2

Example 20 (Ref: page 8)


Solve the equation y′ = 1 + y 2 .

Separating the variables we get


dy
= dx
1+ y2
Integrating tan −1 y = x + α
⇒ y = tan( x + α ) where α is an arbitrary constant.

Example 21 (Ref: page 9)


dy y + 1
Solve the equation = , y (6) = 0 .
dx x − 4

Separating the variables we get


dy dx
=
1+ y x − 4
Integrating ln 1 + y = ln x − 4 + ln A
⇒ 1 + y = A( x − 4)
1
Initial condition x = 6 , y = 0 ⇒ A =
2
Only positive A satisfies both y(6) = 0 and 1 + y = A( x − 4) .
x−4
⇒ y= −1
2
1
y = x−3
2

12
Sem. 1 Sesi 06/07

7 Homogeneous Differential Equations

A function f ( x, y ) is said to be homogeneous of degree n if for all λ


f ( λ x, λ y ) = λ n f ( x , y ) .

Example 22 (Ref: page 10)

(i) x 4 + xy 3 is homogeneous of degree 4.


f (λ x, λ y ) = (λ x) 4 + (λ x)(λ y )3 = λ 4 ( x 4 + xy 3 )
= λ 4 f ( x, y )

y − xe y / x
(ii) is homogeneous of degree 0.
y
λ y − (λ x)eλ y / λ x y − xe y / x
f (λ x, λ y ) = =
λy y
0
= λ f ( x, y )

(iii) y 2 − xy + 1 is not homogeneous since the term 1 is of degree 0 whereas the other
terms are of degree 2.

Definition:
A differential equation of the form
dy f ( x, y )
=
dx g ( x, y )
is called a homogeneous equation if both functions f ( x, y ) and g ( x, y ) are homogeneous
of the same degree.
In such cases, we set y = vx , then the reduced equation involves v and x in which the
variables are separable.

Example 23 (Ref: page 11)


dy
Solve 2 xy = y2 − x2
dx

dy y 2 − x 2
=
dx 2 xy
Both numerator and denominator are homogeneous of degree 2.
dy dv
Let y = vx ⇒ =v+x
dx dx
2 2 2
dv v x − x
⇒ v+ x =
dx 2vx 2

13
Sem. 1 Sesi 06/07

dv v 2 − 1
x = −v
dx 2v
−1 − v 2
=
2v
2v dv dx
2
=−
1+ v x
2
ln(1 + v ) = − ln x + ln A
A
⇒ 1 + v2 = , x>0
x
y y2 A
Substitute v = , 1+ 2 =
x x x
⇒ 2 2
x + y = Ax

8 Equations Reducible to Homogeneous Form

The equation of the form


dy a1 x + b1 y + c1
=
dx a2 x + b2 y + c2
can be reduced to the homogeneous form by a substitution depending on the values of the
constants a1 , b1 , a2 , b2 .

Case I
a1 b1 x = X +h
If ≠ 0 , choose the substitution where the pair constant (h , k )
a2 b2 y =Y +k
satisfies the simultaneous equations
a1h + b1k + c1 = 0
a2 h + b2 k + c2 = 0 .
The given differential equation reduces to homogeneous equation
dY a1 X + b1Y
= .
dX a2 X + b2Y

Case II
a b
If 1 1 = 0 , choose the substitution z = a1 x + b1 y .
a2 b2

14
Sem. 1 Sesi 06/07

Example 24 (Ref: page 13)


Solve ( x − 2 y + 4) dx + (2 x − y + 2) dy = 0 .

a1 b1 1 −2
= ≠ 0.
a2 b2 2 −1
The solution to the simultaneous equations
x − 2 y + 4 = 0 and 2 x − y + 2 = 0
is (h , k ) = (0 , 2) .
Put x = X , y =Y +2
⇒ dx = dX and dy = dY
The given differential equation reduces to
( X − 2Y − 4 + 4) dX + (2 X − Y − 2 + 2) dY = 0 .
dY X − 2Y
=− homogeneous equation
dX 2X −Y
dY dv
Let Y = vX ⇒ =v+ X
dX dX
dv X − 2vX
v+ X =−
dX 2 X − vX
dv 2v − 1
X = −v
dX 2 − v
Separate the variables and integrate
1 3
ln (1 − v ) − ln (1 + v ) = ln X + ln A
2 2
(1 − v)
ln = 2 ln X + 2 ln A
(1 + v)3
3
Y  Y 
1 − = BX 2  1 +  where B = A2
X  X
3
( X −Y ) = B( X +Y )
⇒ ( x − y + 2 ) = B( x + y − 2)3 .

Example 25 (Ref: page 14)


Solve (2 x − 4 y + 5) dy + ( x − 2 y + 3) dx = 0 .

a1 b1 1 −2
= = 0.
a2 b2 2 −4
dz dy
Let z = x − 2 y . ⇒ = 1− 2
dx dx
1  dz 
(2 z + 5) 1 −  = −( z + 3)
2  dx 

15
Sem. 1 Sesi 06/07

Separate the variables


 1 
∫ 1 − 4 z + 11  dz = ∫ 2 dx
1
⇒ z − ln 4 z + 11 = 2 x + A
4
⇒ 4( x − 2 y ) − ln 4( x − 2 y ) + 11 = 8 x + 8 A
⇒ 4 x + 8 y + ln 4 x − 8 y ) + 11 = c where the constant c = −8A.

9 Exact Differential Equations

A first order differential equation of the form


M ( x, y ) dx + N ( x, y ) dy = 0 (9.1)
is said to be an exact differential equation if it satisfies the following condition
∂M ∂N
= (9.2)
∂y ∂x

It is useful to note the following simple integrable combinations


• xdy + ydx = d ( xy )
ydx − xdy x
• 2
=d  (9.3)
y  y

Example 25 (Ref: page 16)


Solve the equation xy′ + y + 4 = 0 .

( y + 4) dx + x dy = 0
⇒ d ( x( y + 4) ) = 0
⇒ x( y + 4) = C
C
y = −4
x

Example 26 (Ref: page 17)


Solve the equation 2 x sin 3 y dx + (3 x 2 cos 3 y + 2 y ) dy = 0 .

∂M
M ( x, y ) = 2 x sin 3 y ⇒ = 6 x cos 3 y .
∂y

∂N
N ( x, y ) = 3 x 2 cos 3 y + 2 y ⇒ = 6 x cos 3 y .
∂x

16
Sem. 1 Sesi 06/07

∂M ∂N
Since = , the given equation is exact. There exist a function U ( x, y ) such that
∂y ∂x
∂U ∂U
dU = dx + dy = 0.
∂x ∂y
∂U ∂U
⇒ = 2 x sin y and = 3 x 2 cos 3 y + 2 y .
∂x ∂y
Hence U ( x, y ) = ∫ 2 x sin 3 y ∂x
= x 2 sin 3 y + f ( y )
∂U df
= 3x 2 cos 3 y +
∂y dy
⇒ f ′( y ) = 2 y or f ( y) = y 2 + A
⇒ d ( x 2 sin 3 y + y 2 ) = 0
x 2 sin 3 y + y 2 = C .

Sometimes a differential equation which is not exact, may become so, by multiplication
with a suitable function, known as the integrating factor.

Example 27 (Ref: page 18)


Solve the equation xdy − ydx = 0 .

∂M
M ( x, y ) = − y ⇒ = −1 .
∂y

∂N
N ( x, y ) = x ⇒ = 1.
∂x
∂M ∂N
Since ≠ , the given equation is not exact.
∂y ∂x
1
Multiply the equation by the integrating factor 2 ,
x
xdy − ydx
=0
x2
 y
⇒ d =0
x
y = Cx .

17
Sem. 1 Sesi 06/07

Example 28 (Ref: page 18)


y dx
Show that is the integrating factor of + 2 x dy = 0 . Hence solve the equation.
x y

∂M
M ( x, y ) = y −1 ⇒ = − y −2 .
∂y
∂N
N ( x, y ) = x ⇒ = 1.
∂x
∂M ∂N
Since ≠ , the given equation is not exact.
∂y ∂x
y dx ∂M ∂N
Multiply by the equation becomes + 2 y dy = 0 where = = 0.
x x ∂y ∂x
There exist a function U ( x, y ) such that dU = 0 and satisfies
∂U 1 ∂U
= and = 2y .
∂x x ∂y
Hence U ( x, y ) = ∫ x −1 ∂x
= ln x + f ( y )
∂U df
= 0+
∂y dy

⇒ f ′( y ) = 2 y or f ( y) = y 2 + A
⇒ d ( ln x + y 2 ) = 0
ln x + y 2 = C .

18

You might also like