Additional Slides For ODE

Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Reduction of Order

• Used to solve homogeneous 2nd order ODEs when one of the linearly
independent solutions is given/known
Reduction of Order
Consider a 2nd order linear homogeneous ODE: General
solution
a ( x) y" ( x) + b( x) y ' ( x) + c( x) y ( x) = 0 y ( x) = Ay1 ( x) + By2 ( x)
Say we know one of the solutions: y1 = u1 ( x)

i.e. a ( x)u1" ( x) + b( x)u1 ' ( x) + c( x)u1 ( x) = 0

We want to find the second linearly independent solution: y2 = u2 ( x ) = ??


unknown function
Let’s guess u2 ( x ) = v( x)u1 ( x)
u2 ' ( x ) = v' ( x)u1 ( x) + v( x)u1 ' ( x)
u2 " ( x ) = v" ( x)u1 ( x) + 2v' ( x)u1 ' ( x) + v( x)u1" ( x)

Substitute in ODE: a (v" u1 + 2v' u1 '+vu1") + b(v' u1 + vu1 ') + c(vu1 ) = 0


Reduction of Order
a(v" u1 + 2v' u1 '+vu1") + b(v' u1 + vu1 ') + c(vu1 ) = 0
0
Rearrange v(au1"+bu1 '+cu1 ) + a(2v' u1 '+v" u1 ) + b(v' u1 ) = 0

a(2v' u1 '+v" u1 ) + b(v' u1 ) = 0

au1v"+(2au1 '+bu1 )v' = 0 2nd order ODE

Let’s make ψ ( x) = v' ( x) Reduction of


order

au1ψ '+(2au1 '+bu1 )ψ = 0 1st order ODE


Reduction of Order
ψ'  u ' b
au1ψ '+(2au1 '+bu1 )ψ = 0 = − 2 1 + 
ψ  u1 a 

ψ'  u1 ' b  b( x )
Integrate ∫ψ dx = − ∫  2 u1 + a  dx lnψ = −2 ln u1 − ∫ dx
a( x)
 1   − ∫
b( x)
dx 
lnψ = ln 2  + ln e a ( x ) 
 u1   
 
b( x)
1 −∫ dx
ψ ( x) = 2
e a( x)
= v' ( x)
u1
b( x)
1 − ∫ a ( x ) dx
Solve v(x) v( x) = ∫ 2 e dx The 2nd solution: y2 = u2 ( x ) = v( x)u1 ( x)
u1
Example
Consider

Given , find using the method of reduction of order

b( x)
Solution: 1 −∫ dx
u2 ( x ) = v( x)u1 ( x) where v( x) = ∫ 2 e a( x)
dx
u1
Note:
a( x) = x 2 −( x2 +2 x)
1 −∫ dx
ln x
( 2
b( x ) = − x + 2 x ) v( x) = ∫ 2 e
x
x2
dx e =x
2
1 ∫1+ x dx 1 x + ln x 2 ex x2
v( x) = ∫ 2 e dx = ∫ 2 e dx = ∫ 2 dx = e x
x x x

u2 (x ) = e x x General y ( x ) = Au1 ( x) + Bu2 ( x) = Ax + Be x x


solution:
Constant Coefficient 2 nd Order ODE

Auxiliary equation

If we have real − 2ba x


repeated roots b One of the λx
y1 ( x) = e = e
λ=− solutions is:
2a
b 2 = 4ac
b( x)
1 −∫ dx
The second y2 ( x ) = v( x) y1 ( x) where v( x) = ∫ 2 e a( x)
dx
solutions is: y1
(reduction of 1 − ba x
order) v( x) = ∫ − b x e dx = x
e a
∴ y2 ( x ) = xy1 ( x) = xe
− 2ba x
Constant Coefficient 2 nd Order ODE

Auxiliary equation

If we have complex y1 ( x) = e λ1x = e (α + jβ ) x


conjugate roots
λ = α ± jβ λ2 x (α − j β ) x
2
b < 4ac y2 ( x) = e =e

(α + j β ) x (α − j β ) x
General solution: y = Ae + Be Recall Euler’s formula:

=e αx
(Ae jβ x
+ Be − jβ x
) e jθ = cos θ + j sin θ
Constant Coefficient 2 nd Order ODE
y = Ae (α + jβ ) x + Be (α − jβ ) x Recall Euler’s formula:

=e αx
(Ae jβ x
+ Be − jβ x
) e jθ = cos θ + j sin θ

= eαx ( A cos( β x) + jA sin( β x) + B cos( β x) − jB sin( β x) )


= eαx (( A + B) cos( β x) + j ( A − B) sin( β x) )
= eαx (c1 cos( β x) + c2 sin( β x) )
αx αx
= c1e cos( β x) + c2 e sin( β x) General solution

y1 ( x) y2 ( x)
Homogeneous Euler
Equation
Homogeneous Euler Equation
x>0
a, b, c constant

n
Trial solution y=x
(guess)
n −1 −1
y ' = nx = nx y
n−2 −2
y" = n(n − 1) x = n(n − 1) x y
Substitute in ODE
to get auxiliary eq. (an 2
)
+ (b − a )n + c y = 0 ⇒ an 2 + (b − a )n + c = 0

− (b − a ) ± (b − a ) 2 − 4ac
n=
2a
Homogeneous Euler Equation
n − (b − a ) ± (b − a ) 2 − 4ac
y=x n=
2a
n1 n2
1) Real distinct roots n1 and n2 y = Ax + Bx
Things get a bit complicated when:
?
n n
2) Real repeated roots n y = Ax + Bx ⋅ x WRONG!!

n1, 2 = α ± jβ α + jβ α − jβ
3) Complex conjugate
roots
y = Ax + Bx
This is correct but not in a real form!
Homogeneous Euler Equation
For cases of real repeated roots and complex conjugate roots
dt 1
Transformation of variable x  t t = ln x =
dx x

Euler eq.

dy dy dt 1 dy 1
y' = = = = y
dx dt dx x dt x
d  1 dy 
y" = 
1 dy 1 d dy
=− 2 + dt dt 1
=− 2
( )
dy
+
1 d 2
y1
dx  x dt  x dt x dt dx x dt x dt 2 x
1 1
= − 2 y + 2 y
x x
Homogeneous Euler Equation
Original Euler Eq. (function of x) Constant coefficient Ordinary DE (function of t)

Aux.
Trial solution y=e λt
aλ + (b − a)λ + c = 0
2
eq.

2) Real repeated roots λ

y (t ) = Ae λt + Bte λt RECALL t = ln x
y ( x) = Ae λ (ln x ) + B(ln x)e λ (ln x )
= Ax λ + B(ln x) x λ
Homogeneous Euler Equation
Original Euler Eq. (function of x) Constant coefficient Ordinary DE (function of t)

Aux.
Trial solution y=e λt
aλ + (b − a)λ + c = 0
2
eq.

3) Complex conjugate roots λ1, 2 = α ± jβ See an example in the


main slides

αt αt
y (t ) = Ae cos( β t ) + Be sin( β t ) RECALL t = ln x
y ( x) = Aeα (ln x ) cos( β ln x) + Beα (ln x ) sin( β ln x)
= Axα cos( β ln x) + Bxα sin( β ln x) = Ax α + jβ
+ Bx α − jβ
Inhomogeneous 2nd order
ODE
• (1) Methods of undetermined coefficients
• (2) Variation of parameters
Inhomogeneous ODE
Note: The coefficient
of y” must be 1.
y"+ p( x) y '+ q( x) y = r ( x)
Source term/
Excitation input

General solution: y ( x) = Ay1 ( x) + By2 ( x) + y p ( x)


Complementary functions Particular integral

Complementary functions are the solution to the homogeneous ODE: y"+ p( x) y '+ q( x) y = 0
Particular integral is the solution to the inhomogeneous ODE: y"+ p ( x) y '+ q ( x) y = r ( x)
To find particular integral: (1) Method of undetermined coefficients
(2) Variation of parameters
(1) Methods of Undetermined Coefficients
• Limited to solving constant coefficients ODE: y"+by '+cy = r ( x)
• Only certain forms of r(x) are accepted:

The guessed yp(x) is then substituted in the inhomogeneous ODE to solve for the unknown coefficients.
Note: If terms in yp(x) have already appeared in the complementary functions, multiply yp(x) by xs, where
s is the smallest positive integer number such that they are different (see example in the main slides).
(2) Variation of Parameters
• A more systematic approach to solve the particular integral of a generic inhomogeneous ODE:

y"+ p( x) y '+ q( x) y = r ( x) Note: The coefficient


of y” must be 1.

Trial solution: y p ( x) = v1 ( x) y1 ( x) + v2 ( x) y2 ( x)
We impose:

Unknown Complementary v1 ' y1 + v2 ' y2 = 0 (1)


functions functions

y p ' = v1 ' y1 + v1 y1 '+ v2 ' y2 + v2 y2 ' Substitute in the


0 ODE
= (v1 y1 '+v2 y2 ' ) + (v1 ' y1 + v2 ' y2 )

y p " = v1 ' y1 '+v1 y1"+v2 ' y2 '+v2 y2 "


(2) Variation of Parameters
0 0
After substitution
and rearrangement:
v1 ( y1"+ py1 '+ qy1 ) + v2 ( y2 "+ py2 '+ qy2 ) + v1 ' y1 '+v2 ' y2 ' = r ( x)
(2)
Collecting (1) & (2):
v1 ' y1 + v2 ' y2 = 0  y1 y2   v1 '   0 
or
y '    =
v1 ' y1 '+v2 ' y2 ' = r ( x)  1 y2 ' v2 ' r ( x)
Wronskian
y1 y2 '− y1 ' y2
r ( x) y2 ( x) r ( x) y2 ( x)
v1 ' = − ⇒ v1 = − ∫ dx
y1 y2 '− y1 ' y2 y1 y2 '− y1 ' y2 y p ( x)
r ( x) y1 ( x) r ( x) y1 ( x) = v1 ( x) y1 ( x) + v2 ( x) y2 ( x)
v2 ' = ⇒ v2 = ∫ dx
y1 y2 '− y1 ' y2 y1 y2 '− y1 ' y2
Example
Solve x 2 y"−2 xy '+2 y = 2 x 3e x (Inhomogeneous Euler Eq.)

Auxiliary eq.
2
n − 3n + 2 = 0 ⇒ n = 1 , 2 y1 ( x) = x 2 y2 ( x) = x

Complementary yc = Ax 2 + Bx
function
To find the particular integral,
y p ( x) = v1 ( x) y1 ( x) + v2 ( x) y2 ( x)
2 2
Divide by x2 y"− y '+ 2 y = 2 xe x
x x r(x)
x
r ( x) y2 ( x) 2 xe ⋅ x
v1 = − ∫ dx = − ∫ dx = 2e x

y1 y2 '− y1 ' y2 − x2
Example (Cont.)
r ( x) y1 ( x) 2 xe x ⋅ x 2
v2 = ∫ dx = ∫ − x 2 dx = − ∫ 2 xe dx
x

y1 y2 '− y1 ' y2
[
= −2 xe − ∫ e dx
x x
]
= −2 xe x + 2e x
Particular integral

∴ y p ( x) = v1 ( x) y1 ( x) + v2 ( x) y2 ( x) General solution

= 2e x ⋅ x 2 + (−2 xe x + 2e x ) ⋅ x y ( x ) = yc ( x ) + y p ( x )
= 2 xe x 2 x
= Ax + Bx + 2 xe
Boundary Value Problems
Boundary Conditions
Boundary conditions are needed to give a unique solution to the differential equation. If the
problem is defined within x = [a,b], BCs are given at the ends (boundaries) of the problem
domain, i.e. at x=a and x=b.

There are 3 types of BCs:

(1) Dirichlet BCs: y (a) = f and y (b) = g

(2) Neumann BCs: y ' (a) = f and y ' (b) = g

(3) Robin BCs: y (a ) + c1 y ' (a ) = f and y (b) + c2 y ' (b) = g

You might also like