I x

SECOND-ORDER LINEAR ODEs
f ′′ + p(x)f ′ + q(x)f = h(x)
♦ Generalities
♦ Structure of general solution
♦ Equations with constant coefficients
Second order linear equations
General form :
d2 f
df
+
p
(
x
)
+ q ( x) f = h( x).
2
dx
dx
Integrating factor? Suppose
! I ( x)
dI
2 =. Ip and
dx
such that
d 2 If
= Ih
dx 2
d2 I
= Iq.
2
dx
These equations are incompatible in most cases….
Structure of the general solution (GS)
f ′′ + p(x)f ′ + q(x)f = h(x)
♠ The general solution f is the sum of a particular solution f0 (the
“particular integral”, PI) and the general solution f1 of the associated
homogeneous equation (the “complementary function”, CF):
f = f0 + f1 ,
i.e.,
GS = PI + CF .
♠ The complementary function CF is given by linear combination of
two linearly independent (֒→ see next) solutions u1 and u2 :
CF = c1 u1 (x) + c2 u2 (x)
c1 and c2 arbitrary constants
♠ Two functions u1 (x) and u2 (x) are linearly independent if
the relation αu1 (x) + βu2 (x) = 0 implies α = β = 0.
Let αu1 (x) + βu2 (x) = 0.
Differentiating ⇒ αu′1 (x) + βu′2 (x) = 0.
u1 u2 = u1 u′2 − u2 u′1 6= 0
• If W (u1 , u2 ) = ′
u1 u′2 then α = β = 0, and u1 and u2 are linearly independent.
• If W (u1 , u2 ) = u1 u′2 − u2 u′1 = 0
then u2 = constant × u1 ⇒ u1 and u2 not linearly independent
W (u1 , u2 ) = wronskian determinant of functions u1 and u2
♠ n functions u1 (x), . . . , un (x) are linearly independent if
α1 u1 (x) + . . . + αn un (x) = 0 =⇒ α1 = . . . = αn = 0.
Example: The functions u1 (x) = sin x and u2 (x) = cos x are linearly
independent.
Let
α sin x + β cos x = 0 .
Differentiating ⇒ α cos x − β sin x = 0 .
sin x
⇒ β
So α = β
cos x
2
sin x
1
+ cos x = 0 ⇒ β
=0 ⇒ β=0.
cos x
cos x
Thus α = β = 0.
• Alternatively:
W (u1 , u2 ) = u1 u′2 − u2 u′1 = − sin2 x − cos2 x = −1 ⇒ linear independence
Homework
Determine whether the following sets of functions
are linearly independent.
x2 , x , 1
1 − x , 1 + x , 1 − 3x
ex , e−x
ex , xex , x2 ex , x3 ex
sin x , cos x , sin(x + α)
[Answ.: linearly independent]
[Answ.: linearly dependent]
[Answ.: linearly independent]
[Answ.: linearly independent]
[Answ.: linearly dependent]
Homogeneous equation:
f ′′ + p(x)f ′ + q(x)f = 0
♠ Any solution u can be written as a linear combination of
linearly independent solutions u1 and u2 .
Since u, u1 and u2 all solve the homogeneous eq., with nonzero coefficients of the
second-derivative, first-derivative and no-derivative terms, we must have det = 0
u u1 u2 ′
u u′1 u′2 = 0
u′′ u′′ u′′ 1
2
W (u, u1 , u2 ) = 0 for solutions u, u1 , u2
⇒ αu + βu1 + γu2 = 0 for α, β and γ not all zero.
Solving for u expresses the solution u as a linear combination of u1 and u2 .
⇒ CF = c1 u1 (x) + c2 u2 (x)
• solutions span whole set of linear combinations of two independent u1 , u2
Example: The general solution of the 2nd-order linear ODE
y ′′ + y = 0
is A sin x + B cos x.
(simple harmonic oscillator)
To show this, it is sufficient to show that
i) sin x and cos x solve the equation (e.g. by direct computation) and
ii) sin x and cos x are linearly independent (see previous Example).
Then general theorem CF = c1 u1 (x) + c2 u2 (x) yields the result.
• Useful reference for this part of the course,
with worked problems and examples, is
Schaum’s Outline Series
Differential Equations
R. Bronson and G. Costa
McGraw-Hill (Third Edition, 2006)
♦ See chapters 8 to 14.
2nd-order linear ODEs with constant coefficients:
• general methods of solution available
• arise in many physical applications
Second order linear equation with constant coefficients
d2 f
df
Lf = a2
+ a1
+ a0 f = h( x).
2
dx
dx
Second order linear equation with constant coefficients
d2 f
df
Lf = a2 2 + a1
+ a0 f = h( x).
dx
dx
Complementary function
Solution
The number of independent
complementary functions is
the number of integration
constants – equal to the order
of the differential equation
1) Construct f 0 the general solution to the homogeneous equation Lf 0 = 0
2) Find a solution, f1 , to the inhomogeneous equation Lf1 = h
Particular integral
General solution : f 0 + f1
For a nth order differential equation need n independent solutions to Lf=0 to
specify the complementary function
Second order linear equation with constant coefficients
d2 f
df
Lf = a2 2 + a1
+ a0 f = h( x).
dx
dx
Complementary function
d2 f
df
Lf = a2 2 + a1
+ a0 f = 0.
dx
dx
a2 m 2 + a1m + a0 = 0.
Try y = e mx
!a1 ± a12 ! 4a2 a0
m± "
,
2a2
Complementary function
“Auxiliary” equation
a12 ! 4a2 a0 " +, 0, !
y = A+ e m+ x + A! e m! x .
Two constants of integration
Ex 1
d2 y
dy
+
4
+ 3 y = 0.
2
dx
dx
Auxiliary eq. (m + 3)(m + 1) = 0
" CF is y = Ae !3 x + Be ! x
.
If y(0)=2, y'(0)=0 !
A=-1, B=3
"
A + B = 2, " 3 A " B = 0
y = !e !3 x + 3e ! x
Initial
conditions
Ex 2
.
d2 y
dy
Ly = 2 + 2 + 5 y = 0.
dx
dx
2
Complex?
Auxiliary eq. m + 2m + 5 = 0
i.e.
.
m = 12 (!2 ± 4 ! 20) = !1 ± 2i
" CF is y = Ae( !1+ 2i) x + Be( !1! 2i) x
But L is a real operator ! 0 = "e( Ly ) = L["e( y )]
i.e. !e( y ) is a solution (as is "m( y )) $ #e( y ) = e ! x [ A" cos(2 x) + B" sin(2 x)].
Find the solution for which
y (0) = 5
and
(dy /dx)0 = 0
Initial
conditions
5 = A"
0 = ! A" + 2 B" # B" =
5
2
#
y = e ! x [5cos(2 x) + 52 sin(2 x)].
Factorisation of operators
We wish to solve
d2 f
df
Lf = a2 2 + a1
+ a0 f = 0.
dx
dx
We did this by trying y = e mx
a2 m 2 + a1m + a0 = a2 (m ! m+ )(m ! m! ) = 0.
!a1 ± a12 ! 4a2 a0
m± =
2a2
This is equivalent to factorising the equation
d
d
d2 f
df
( ! m! )( ! m+ ) f = 2 ! (m! + m+ ) + m! m+ f
dx
dx
dx
dx
d 2 f a1 df a0 Lf
= 2 +
+ "
dx
a2 dx a2 a2
Now we can see why the CF is made up of exponentials …. because :
(
d
d
! m! )e m! x = 0 ; ( ! m+ )e m+ x = 0.
dx
dx
Factorisation of operators and repeated roots
d2 f
df
Lf = a2 2 + a1
+ a0 f = 0.
dx
dx
!a1 ± a12 ! 4a2 a0
m± =
2a2
d
d
( ! m! )( ! m+ ) f = 0
dx
dx
a12 ! 4a2 a0 = 0 and m+ = m! = m ?
What happens if
Lf = (
d
d
! m)( ! m) f .
dx
dx
e mx gives one solution : L(e mx ) = (
d
d
! m)( ! m)e mx = 0
dx
dx
xe mx gives the second independent solution :
L( xe mx ) = (
d
d
d
! m)( ! m) xe mx = ( ! m)e mx = 0,
dx
dx
dx
y = Ae mx + Bxe mx
d2 y
dy
+
+ y = 0.
2
dx 2
dx
Ex 4
Auxiliary equation (m + 1) 2 = 0
y = Ae ! x + Bxe ! x
.
Ex 5
d4 y
d3 y
d2 y
dy
!
2
+
2
!
2
+ y = 0.
dx 4
dx 3
dx 2
dx
Auxiliary equation
(m ! 1) 2 (m ! i)(m + i) = 0
y = e x ( A + Bx) + C cos x + D sin x.
Summary
2nd order linear ODEs: f ′′ + p(x)f ′ + q(x)f = h(x)
• General solution = PI + CF
• CF = c1 u1 + c2 u2
u1 and u2 linearly independent solutions
of the homogeneous equation
• Equations with constant coefficients:
⊲ Solve auxiliary equation to find complementary function CF
♦ distinct real roots
♦ repeated roots
♦ complex roots
⊲ Next: methods to find the particular integral PI