AEM-Chapter03-higher Order Linear Diff Eq
AEM-Chapter03-higher Order Linear Diff Eq
Equations
(Chun-Hsin Wang)
Fall 2002
Outline
Second-Order Homogeneous Linear Equations
Second-Order Homogeneous Equations with
Constant Coefficients
Modeling: Mass-Spring Systems, Electric Circuits
Euler-Cauchy Equation
Wronskian
Second-Order Nonhomogeneous Linear
Equations
Higher Order Linear Differential Equations
Page 2
Outline
-
Page 3
Second-Order ODE
F ( x, y , y , y ) 0
Explicit Form
y p( x ) y q( x ) y r ( x )
Page 4
Second-Order Homogeneous
Linear Equations
Second-Order Homogeneous Linear ODE
y p( x ) y q( x ) y 0
(1 x ) y 2 xy 6 y 0
2
Page 5
Examples of Nonlinear differential
equations
x( yy y ' ) 2 y ' y 0
2
y' y ' 1
2
Page 6
A linear combination of Solutions for
homogeneous linear equation
Example:
y " y 0
x
y e ,y e
x
x
y 3e 5e
x
Page 7
Second-Order Homogeneous
Linear Equations
Linear Principle (Superposition Principle)
y p( x ) y q( x ) y 0
y = c1y1+ c2y2 is also a solution
(c1, c2 arbitrary constants)
y is called the linear combination of y1 and y2
Page 8
Second-Order Homogeneous
Linear Equations
Proof:
Let y c1 y1 c2 y2
y p( x ) y q( x ) y
(c1 y1 c2 y2 ) p( x )( c1 y1 c2 y2 ) q( x )( c1 y1 c2 y2 )
c1 y1 p( x ) y1 q( x ) y1 c2 y2 p( x ) y2 q( x ) y2 0
Note ( cy ) cy ( y1 y2 ) y1 y2
Page 9
Does the Linearity Principle hold for
nonhomogeneous linear or nonlinear equations ?
Example: A nonhomogeneous linear differential
equation
y 1 cos x, y 1 sin x
y " y 1
(1 cos x ) (1 sin x )
Example: A nonlinear differential equation
y x ,y 1
2
y" y xy' 0
x 1
2
Page 10
Initial Value Problem for Second-
Order homogeneous linear equations
For second-order homogeneous linear equations,
y p( x ) y q( x ) y 0
a general solution will be of the form
y c1 y1 c2 y2
, a linear combination of two solutions involving two
arbitrary constants c1 and c2
An initial value problem consists two initial
conditions.
y ( x0 ) k0 , y ' ( x0 ) k1
Page 11
Initial Value Problem
Example:
x
y" y 0, y c1e c2e x
Example
y1 cos x, y2 sin x
y " y 0
Page 14
How to obtain a Bass if One
Solution is Known ?
Method of Reduction Order
y p( x ) y q( x ) y 0
Given y1
Find y2
e
p ( x ) dx
y2 y1 2
dx
y1
Page 15
Second-Order Homogeneous
Linear Equations
Proof:
Let y2 uy1
y2 uy1 uy1, y2 uy1 2uy1 uy1
y p( x ) y q( x ) y 0
(uy1 2uy1 uy1) p( x )( uy1 uy1 ) q( x )( uy1 ) 0
uy1 u( 2 y1 p( x ) y1 ) u( y1 p( x ) y1 q( x ) y1 ) 0
2 y1 p( x ) y1
u u 0, Let U u
y1
2 y1 p( x ) y1
U U 0
y1
Page 16
Second-Order Homogeneous
Linear Equations
Proof:
dU 2 y1 p ( x ) y1
dx
U y1
ln U 2 ln y1 p ( x )dx
e
p ( x ) dx
U
y12
e
p ( x ) dx
y2 y1 Udx y1 2
dx
y
1
Page 17
Second-Order Homogeneous
Linear Equations
Example 3-1:
x 2 y xy y 0, y1 x, Find y2
Sol: 1 1
y y 2 y 0
x x
1
e
p ( x ) dx dx
x
e
y2 y1 2
dx x 2
dx
y
1 x
eln x 1
x 2 dx x dx
x x
x ln x
Page 18
Second-Order Homogeneous
Linear Equations
Exercise 3-1: Basic Verification and
Find Particular Solution
Basis cos( 3x ), sin( 3x )
y 9 y 0
Initial Condition y (0) 4, y (0) 6
Basis e x , xe-x
y 2 y y 0
Initial Condition y (0) 1, y (0) 0
Basis x 1/ 2 , x 3/2
4 x 2 y 3 y 0
Initial Condition y (1) 3, y (1) 2.5
Page 19
Exercise: Reduce of order if a solution
is known.
x y"5xy'9 y 0, y1 x
2 3
Page 20
Second-Order Homogeneous
Equations with Constant Coefficients
General Form of Second-Order
Homogeneous Equations with Constant
Coefficients
y ay by 0
whose coefficients a and b are constant.
Page 21
Second-Order Homogeneous
Equations with Constant Coefficients
Sol: y ay by 0
x
Try y e
x x x
( e ) a ( e ) be 0
e 2 x
ae x
be x
0
( a b ) e
2 x
0
Characteristic
Equation a b 0
2
Page 22
Second-Order Homogeneous
Equations with Constant Coefficients
Case 1: 1, 2
1 x 2 x
a 4b 0
2
y c1e c2e
Case 2: 1 , 1
1 x
a 4b 0
2
y (c1 c2 x )e
Case 3: m ni
a 4b 0
2
y emx ( A cos nx B sin nx)
Page 23
Second-Order Homogeneous
Equations with Constant Coefficients
Example 3-2:
y y 2 y 0, y (0) 4, y (0) 5
Sol:
Step 1: Find General Solution
2 0,
2
1,2
y c1e x c2e 2 x
Page 24
Second-Order Homogeneous
Equations with Constant Coefficients
Step 2: Find Particular Solution
y c1e x c2 e 2 x
y c1e 2c2 e
x 2 x
y (0) c1 c2 4
y (0) c1 2c2 5
c1 1, c2 3
2 x
y e 3e
x
Page 25
Second-Order Homogeneous
Equations with Constant Coefficients
Step 3: Plot Particular Solution
MATLAB Code
x=[0:0.01:2];
y=exp(x)+3*exp(-2*x);
plot(x,y)
Page 26
Case 2 Real Double Root = -a/2
ax 2
a 2
4b 0, y1 e
Let y2 uy1
y2 uy1 uy1, y2 uy1 2uy1 uy1
y ay by 0
(uy1 2uy1 uy1) a (uy1 uy1 ) b(uy1 ) 0
uy1 u( 2 y1 ay1 ) u ( y1 ay1 by1 ) 0
y1 ay1 by1 0
2 y '1 ae ax 2 ay1 , 2 y '1 ay1 0
u" y1 0, u" 0
u c1 x c2
take u x, y2 xy1 xe ax 2
y ( c1 c2 x )e ax 2
Page 27
Second-Order Homogeneous
Equations with Constant Coefficients
Example 3-3:
y 4 y 4 y 0, y (0) 3, y (0) 1
Sol:
Step 1: Find General Solution
4 4 0,
2
2,2
y ( c1 c2 x )e 2 x
Page 28
Second-Order Homogeneous
Equations with Constant Coefficients
Step 2: Find Particular Solution
y ( c1 c2 x )e 2 x
y c2 e 2x
2( c1 c2 x )e 2x
y (0) c1 3
y (0) c2 2c1 1
c1 3, c2 5
y (3 5 x )e 2x
Page 29
Second-Order Homogeneous
Equations with Constant Coefficients
Step 3: Plot Particular Solution
MATLAB Code
x=[0:0.01:2];
y=(3-5*x).*exp(2*x);
plot(x,y)
Page 30
Euler Formula
Euler Formula
e cos x i sin x
ix
Proof: x 2
x 3
x n
ex 1 x
2! 3! n 0 n!
x2 x4 x6
( 1)n x 2 n
Maclaurin cos( x ) 1
Series 2! 4! 6! n 0 (2n)!
x 3 x5 x 7
( 1)n x 2 n 1
sin( x ) x
3! 5! 7! n 0 ( 2n 1)!
Page 31
Euler Formula
Proof:
2 3 n
( ix ) ( ix ) ( ix )
e 1 ix e cos xi sin x
ix ix
2! 3! n 0 n!
x 2 ix 3 x 4 ix 5 x 6 ix 7
1 ix
2! 3! 4! 5! 6! 7!
x2 x4 x6 x3 x5 x7
1 i x
2! 4! 6! 3! 5! 7!
cos( x ) i sin( x )
Page 32
Euler Formula
i
e 1
Page 33
Complex Exponential Function
z s it
s it
e e
z
e e e (cos t i sin t )
s it s
Page 34
Case 3 a 2 4b 0
a a
1 iw, 2 iw,
2 2
1 2
w b a
4
1x ( a 2 ) x iwx (a 2) x
e e e (cos wx i sin wx)
e 2x e ( a 2 ) x iwx e ( a 2 ) x (cos wx i sin wx)
ax 2 ax 2
y1 e cos wx, y2 e sin wx
ax 2
y e ( A cos wx B sin wx)
Page 35
Second-Order Homogeneous
Equations with Constant Coefficients
Example 3-4:
y 0.2 y 4.01 y 0, y (0) 0, y (0) 2
Sol:
Step 1: Find General Solution
0.2 4.01 0,
2
0.1 2i
y e 0.1 x ( A cos 2 x B sin 2 x )
Page 36
Second-Order Homogeneous
Equations with Constant Coefficients
Step 2: Find Particular Solution
0.1 x
ye ( A cos 2 x B sin 2 x )
y 0.1e 0.1 x ( A cos 2 x B sin 2 x )
0.1 x
e ( 2 A sin 2 x 2 B cos 2 x )
y (0) A 0
y (0) 2 B 2
A 0, B 1
y e 0.1 x sin 2 x
Page 37
Second-Order Homogeneous
Equations with Constant Coefficients
Step 3: Plot Particular Solution
MATLAB Code
x=[0:0.1:30];
y=exp(-0.1*x).*sin(2*x);
plot(x,y)
Page 38
Second-Order Homogeneous
Equations with Constant Coefficients
Exercise 3-2: Find General Solution
4 y 4 y 3 y 0
2 y 9 y 0
y 4 y 4 y 0
9 y 30 y 25 y 0
y 2 y 2 y 0
4 y 4 y 10 y 0
Page 39
Modeling: Mass-Spring Systems
my cy ky 0
Page 40
Modeling: Electric Circuits
1
LI RI I 0
C
Capacitor
Resistor (farads)
Inductor
(ohms) (heries)
Page 41
Modeling my cy ky 0
my cy ky 0
c k
2
0
m m
c 1
1, 2 c 4mk
2
2m 2m
c 1
, c 4mk
2
2m 2m
1 , 2
Page 42
( ) t ( ) t
Modeling y (t ) c1e c2e
Overdamping c 4mk 0
2
Page 43
Modeling y (t ) (c1 c2t )e t
Page 44
Modeling c 4mk 0
2
Page 45
Euler-Cauchy Equation
Euler-Cauchy Equation
x y axy by 0
2
Sol : Substitute y x m , y mx m 1 , y m( m 1) x m 2
x 2 m( m 1) x m 2 axmxm 1 bx m 0
m( m 1) x m amx m bx m 0
The Auxiliary Equation
m (a 1)m b 0
2
Page 46
Euler-Cauchy Equation
y c1 x m1
c2 x m2
y (c1 c2 ln x ) x m
Page 48
Euler-Cauchy Case 2 :Example
Example x 2 y 3xy 4 y 0
m 2, 2
y ( c1 c2 ln x ) x 2
Page 49
Euler-Cauchy Equation
y x A cos(b ln x ) B sin( b ln x )
a
Page 50
Euler-Cauchy Case 3 :Example
Example x y 7 xy 13 y 0
2
m 3 2i
y x 3
A cos( 2 ln x ) B sin( 2 ln x )
Page 51
Existence and Uniqueness Theory
y p ( x ) y q( x ) y 0 (1)
y c1 y1 c2 y2 (2)
y ( x0 ) k0 , y ' ( x0 ) k1 (3)
Page 52
Wronskian
c1 y1 ( x ) c2 y2 ( x ) cn yn ( x ) 0
Otherwise the set of functions is said to
be linearly independent
Page 53
Wronskian
A set of n functions y1(x), y2(x), , yn(x), is
linearly independent over an interval I if and
only if the determinant (Wronski determinant, or
Wronskian)
y1 y2 yn
y1 y2 yn
W ( y1 , y2 ,, yn )
y1( n ) y2( n ) yn( n )
0
Page 54
Wronskian
Page 56
Illustration of Theorem 2
Example 1
y1 coswx, y2 sinwx
y " w 2 y 0
Example 2
y"2 y ' y 0,
y ( c1 c2 x )e x
Page 57
A General Solution of (1) includes All
Solutions
y p ( x ) y q( x ) y 0 (1)
Theorem 3 (Existence of a general solution)
If p(x) and q(x) are continuous on an open interval , then (1)
has a general solution on .
Theorem 4 (General solution)
Suppose that (1) has continuous coefficients p(x) and q(x) on
some open interval . Then every solution y=Y(x) of (1) is of the
form
Y c1 y1 ( x) c2 y2 ( x)
Page 58
Nonhomogeneous Equations
y p ( x ) y q( x ) y r ( x ) (1)
y p ( x ) y q( x ) y 0 ( 2)
Theorem
(a) The difference of two solutions of (1)
on some open interval is a solution of (2)
on
(b) The sum of a solution of (1) and a
solution of (2) on is a solution of (1) on
Page 59
y p ( x ) y q( x ) y r ( x ) (1)
y p ( x ) y q( x ) y 0 ( 2)
Page 60
Practical Conclusion
y p ( x ) y q( x ) y r ( x ) (1)
y p ( x ) y q( x ) y 0 ( 2)
Page 61
Initial value problem for a
nonhomogeneous equation
Example
Page 62
Solution by Undetermined
Coefficients
Method of Undetermined Coefficients
y ay by r ( x )
General Solution: y = y h + yp
yh : Homogeneous Solution
yp : Particular Solution
Page 63
Solution by Undetermined
Coefficients
r (x ) yp
nx nx
ke ke
kx n Kn xn Kn1xn1 K1x K0
k cos x K1 cos x K 2 sin x
k sin x K1 cos x K 2 sin x
ke cos x e ( K1 cos x K 2 sin x )
nx nx
Page 64
Rules for the Method of
Undetermined Coefficients
Basic Rule
Modification Rule
Sum Rule
Page 65
Solution by Undetermined
Coefficients
Example 3-9: y 4 y 8 x , Find y p
2
Sol:
y p K 2 x K1 x K 0
2
y p 2 K 2
2 K 2 4( K 2 x 2 K1 x K 0 ) 8 x 2
4 K 2 x 4 K1 x ( 2 K 2 4 K 0 ) 8 x
2 2
K 2 2, K1 0, K 0 1
y p 2 x2 1
Page 66
Example for Modification Rule
y 3 y'2 y e , Find y p
x
y p( x ) y q( x ) y r ( x )
Particular Solution:
y2 r y1r
y p ( x ) y1 dx y2 dx
W W
y1, y2 : Homogeneous Solutions
W : Wronskian of y1 and y2
Page 68
Second-Order Non-homogeneous
Linear Equations
Example 3-10: y 4 y 8 x , Find y p
2
y ( n ) pn 1 ( x ) y ( n 1) p1 ( x ) y p0 ( x ) y 0
y (n)
pn 1 ( x ) y ( n 1)
p1 ( x ) y p0 ( x ) y 0
y ( n ) pn 1 ( x ) y ( n 1) p1 ( x ) y p0 ( x ) y r ( x )
General Solution: y = y h + yp
yh : Homogeneous Solution
yp : Particular Solution
Page 71