You are on page 1of 20

Advanced Engineering Mathematics 2.

Second-order Linear ODEs 1

2. Second-order Linear Ordinary


Differential Equations

2.1 Homogeneous linear ODEs


2.2 Homogeneous linear ODEs with constant coefficients
2.3 Differential operators
2.5 Euler-Cauchy equation
2.6 Existence and uniqueness theory
2.7 Nonhomogeneous ODEs
2.10 Solution by variation of parameters

Advanced Engineering Mathematics 2. Second-order Linear ODEs 2

2.1 Homogeneous linear ODEs

V A linear second-order DE is formed of


y’’ + p(x)y’ + q(x)y = r (x)

V If r (x) ≡ 0 (i.e., r (x) = 0 for all x considered),


then the DE is called homogeneous.
If r (x) ≡/ 0 , the DE is called nonhomogeneous.

V The functions p, q and r are called the coefficients of the equation.

V A solution of a second-order DE on some open interval a < x < b is a


function y(x) that satisfies the DE, for all x in that interval.
Advanced Engineering Mathematics 2. Second-order Linear ODEs 3

V At first we discuss the properties of solutions of second-order linear DE,


then we consider the solving strategies.

V Theorem 1 (Fundamental Theorem for homogeneous linear 2nd-order DE)


For a homogeneous linear 2nd-order DE, any linear
combination of two solutions on an open interval I is again a
solution on I. In particular, for such an equation, sums and
constant multiples of solutions are again solutions.

Proof.
Let y1 and y2 be solutions of y’’ + py’ + qy = 0 on I.
Substituting y = c1y1 + c2y2 into the DE, we get
y’’ + py’ + qy = (c1y1 + c2y2)’’ + p(c1y1 + c2y2)’ + q(c1y1 + c2y2)
= c1y1’’ + c2y2’’ + c1py1’ + c2py2’ + c1qy1 + c2qy2
= c1 (y1’’ + py1’ + qy1) + c2 (y2’’ + py2’ + qy2)
= 0.

Advanced Engineering Mathematics 2. Second-order Linear ODEs 4

V Ex.1.
y1 = e x and y2 = e -x are two solutions of y’’ – y = 0
y = -3y1 + 8y2 = -3e x + 8e -x is a solution of y’’ – y = 0
since (-3e x + 8e -x) – ( -3e x + 8e -x) = 0.

V Caution! The linear combination solutions does not hold for


nonhomogeneous or nonlinear DE.

V Ex.2.
y1 = 1 + cosx and y2 = 1 + sinx are solutions of nonhomogeneous DE
y’’ + y = 1.
but 2(1 + cosx) and (1 + cosx) + (1 + sinx) are not solutions of
y’’ + y = 1.

V Ex.3.
y1 = x 2 and y2 = 1 are solutions of nonlinear DE y’’y – xy’ = 0,
but -x 2 and x 2 + 1 are not solution of y’’y – xy’ = 0.
Advanced Engineering Mathematics 2. Second-order Linear ODEs 5

V A general solution of a 1st-order DE involved one arbitrary constant, a


general solution of a 2nd-order DE will involve two arbitrary constant,
and is of the form
y = c1y1 + c2y2 ,
where y1 and y2 are linear independent and called a basis of the DE.

V A particular solution is obtained by specifying c1 and c2.


V Two function y1(x) and y2(x) are linear independent, if
c1y1(x) + c2y2(x) = 0 implies c1 = c2 = 0 .

Advanced Engineering Mathematics 2. Second-order Linear ODEs 6

V Wronskian test for linear independent


Let y1(x) and y2(x) be solutions of y’’ + py’ + qy = 0 on an interval I
y1 y 2
Let W [y1, y2] = y ' y ' = y1y2’ – y1’y2 for x in I.
1 2

Then 1. Either W [ y1, y2] = 0 for all x in I


or W [y1, y2] ≠ 0 for all x in I .
2. y1(x) and y2(x) are linear independent on I
⇔ W [y1, y2] ≠ 0 for some x in I.

The proof will be given later.


Advanced Engineering Mathematics 2. Second-order Linear ODEs 7

V An initial value problem now consists of y’’ + py’ + qy = 0 and


two initial conditions y(x0) = k0 , y’(x0) = k1 .

V Ex.4.
Solve the initial value problem
y’’ – y = 0, y(0) = 4 , y’(0) = -2
y = c1e x + c2e -x
y’ = c1e x – c2e -x
y(0) = c1 + c2 = 4 c1 = 1
⇒ ⇒
y’(0) = c1 – c2 = -2 c2 = 3
⇒ solution y = e x + 3e –x.

V Problems of Section 2.1.

Advanced Engineering Mathematics 2. Second-order Linear ODEs 8

2.2 Homogeneous linear ODEs with constant coefficients


y’’ + ay’ + by = 0,
where coefficients a and b are constant.

Solution.
Assume y = e λx and substituting it into the original DE to get
(λ2 + a λ + b) e λx = 0
The equation λ2 + a λ + b = 0 is called the characteristic equation of the
1⎛ 1
DE. Its roots are λ 1 = ⎜ − a + a 2 − 4 b ⎞⎟ and λ 2 = ⎛⎜ − a − a 2 − 4 b ⎞⎟ .
2⎝ ⎠ 2⎝ ⎠
λ x λ x
Then the solutions are e 1 and e 2 .

Consider three cases:


case 1. two distinct real roots if a2 – 4b > 0.
case 2. a real double root if a2 – 4b = 0.
case 3. complex conjugate roots if a2 – 4b < 0.
Advanced Engineering Mathematics 2. Second-order Linear ODEs 9

V Case 1 (Two distinct real roots λ1 and λ2)


y1 = e λ1x and y2 = e λ 2 x are linear independent.
The solution is just y = c1e λ1x + c2e λ 2 x .

V Ex.2. Solving y’’ + y’ – 2y = 0 with


y(0) = 4 and y’(0) = -5.
Solution.
The characteristic equation λ2 + λ - 2 = 0, it’s roots are

− 1 + 9 = 1 and λ 2 = (− 1 − 9 ) = −2
( )
1 1
λ1 =
2 2
Then y = c1e x + c2e -2x
Since y(0) = 4 = c1 + c2
y’(0) = -5 = c1 - 2c2
⇒ c1 = 1 and c2 = 3
⇒ y = e x + 3e -2x.

Advanced Engineering Mathematics 2. Second-order Linear ODEs 10


a
V Case 2 (Real double root λ = − )
a 2 x3-6x2+11x-6 = 0, x1 = 1.
− x
Assume y1 = e 2
Use the “method of reduction of order” to find another solution.
step 1. Set y2 = uy1, and try to determine the function u such
that y2 is an independent solution.
y2’ = u’y1 + uy1’ and y2’’ = u’’y1 + 2u’y1’ + uy1’’
step 2. Substituting y2 in the original DE
(u’’y1 + 2u’y1’ + uy1’’) + a (u’y1 + uy1’) + buy1 = 0
⇒ u’’y1 + u’(2y1’ + ay1) + u (y1’’ + ay1’ + by1) = 0
Since y1 is a solution, y1’’ + ay1’ + by1 = 0
a a
a − x − x
Since 2y1' = 2 ( − ) e 2 = −a e 2 = −a y1
2
⇒ 2y1’ + ay1 = 0
⇒ u’’y1 = 0
Advanced Engineering Mathematics 2. Second-order Linear ODEs 11

⇒ u” = 0
⇒ u’ = c (This is the order reduced equation.)
⇒ u = c1x + c2
Simply taking c1 = 1 and c2 = 0
We get y2 = xy1 , y1 and y2 are linear independent.
Thus the general solution
a
− x
y = (c1 + c2x) e 2 .

V Warning.
If λ is a simple root of y’’ + py’ + qy = 0 ,
then (c1 + c2x) e λx is not a solution of the DE. (Explanation on page 17)

V Ex. (omitted)

Advanced Engineering Mathematics 2. Second-order Linear ODEs 12

V Case 3
Complex exponential function
2 3 4 5
ix (ix ) (ix ) (ix ) (ix )
e = 1 + ix + + + + + ...
2! 3! 4! 5!
2 4 3 5
= (1 − x + x + ...) + i ( x − x + x + ...)
2! 4! 3! 5! Euler formula
= cos x + i sin x e ±ix = cos x ± i sin x

λ = − 21 a ± 21 a 2 − 4b , where a 2 − 4b < 0
⇒ λ = − 21 a ± iω where ω = b − 41 a 2 > 0
Then e λ1x and e λ 2 x are complex solutions of the original DE.
The solution can be derived further.
a a
− x
z1= e λ1x
= iωx = − 2 x (cos ωx + i sin ωx) and
e 2 e e
a a
− x − x
z2 = e λ 2 x = e 2 − iωx =
e 2 (cos ωx - i sin ωx).
e
Advanced Engineering Mathematics 2. Second-order Linear ODEs 13

A basis of real solution of the DE is


a a
+ − x − − x
y1 = z1 z 2 = e 2 cos ωx and y 2 = z1 z 2 = e 2 sin ωx.
2 2i

Testing for linear independen ce of y 1 and y 2

−1ax −1ax
e2 cos ωx e2 sin ωx
−1ax −1ax −1ax −1ax
− 21 a e 2 cos ωx − ω e 2 sin ωx − 21 a e 2 sin ωx + ω e 2 cos ωx

= 2e −ax (cos ωx )2 + ω e −ax (sin ωx )2 = ω e −ax ≠ 0.

Then the general solution becomes


a
− x
y= e 2 (A cos ωx + B sin ωx).

Advanced Engineering Mathematics 2. Second-order Linear ODEs 14

V Summary of cases 1, 2, and 3

case 1. real λ1 ≠ λ2 ⇒ y = c1e λ1x + c2e λ 2 x .


− ax
case 2. double real λ1 = λ 2 = − 21 a ⇒ y = (c1 + c2 x ) e 2 .

case 3. complex conjugate


λ1 = − 21 a + iω ,

λ 2 = − 21 a − iω , ω = b − 41 a 2
− 21 ax
⇒ y =e ( A cos ωx + B sin ωx ).
Advanced Engineering Mathematics 2. Second-order Linear ODEs 15

V Initial value problem = a DE + initial conditions.


For example, y” + 2y’ + 5y = 0, y(0) = 1, y’(0) = 5.

V Ex.4. (Boundary value problem)


A boundary value problem = a DE + boundary conditions
y” + y = 0 and two boundary conditions
y(0) = 3
y(π) = -3.
Characteristic function λ2+1 = 0, λ = ± i
y = c1 cos x + c2 sin x.
Since y(0) = 3 = c1 ⇒ c1 = 3
y(π) = -3 = -c1 ⇒ c1 = 3
Thus y = 3cos x +c2sin x.

V Problems of Section 2.2.

Advanced Engineering Mathematics 2. Second-order Linear ODEs 16

2.3 Differential operator


V Introduce a method for solving DE, say operational method.
Let D denote differentiation with respect to x, write Dy = y’ .
D is an operator, it transforms y into its derivative y’.
For example,
D (x2) = 2x , D (sin x) = cos x
D (Dy) = Dy’ = y”,
D3y = y”’, …….

V Define another operator L, L = P (D) = D2+ aD +b , call a 2nd-order


differential operator. Here a and b are constant, P means polynomial,
and L means linear.
L [y] = P(D) [y] = (D2+ aD +b) y = y” + ay’ + by.
Advanced Engineering Mathematics 2. Second-order Linear ODEs 17

V L is linear operator; i.e., L [α y + β z] = α L[y] + β L[z] ,


P (D) [e λ1x] = (λ12 + aλ1+ b) e λ1x = P (λ1) e λ1x = 0

e λ1x is a solution of y”+ay’ +by = 0


c
P (λ1) = 0 ( λ1 is a root of λ2 + aλ +b = 0)

If P (λ) has two different roots, we obtain a basis.


If P (λ) has a double root, we need a second independent solution.
Differentiate both sides of P (D) [e λx] = P (λ) e λx w.r.t. λ to get
P (D) [x e λx] = P’ (λ) e λx + P (λ) x e λx
⇒ P (D) [x e λ1x] = P’ (λ1) e λ1x + P (λ1) x e λ1x = 0
x e λ1x is a solution of y”+ay’ +by = 0
c
P’ (λ1) = 0 and P (λ1) = 0
(That is, λ1 is a double root of λ2 + aλ +b = 0)
P (λ) / (λ - λ1) = P’ (λ) (reduction of order)

Advanced Engineering Mathematics 2. Second-order Linear ODEs 18

V How to use differential operator to solve DE ?

V Ex.1. Solving y "+ y '− 6 y = 0


⇒ (D 2 + D − 6 ) y = 0
⇒ (D + 3)(D − 2) y = 0
(D + 3 ) y = 0
⇒ ⎧⎨
⎩ (D − 2) y = 0
y '+3 y = 0
⇒ ⎧⎨
⎩ y '−2y = 0

⇒ ⎨λ + 3 = 0
⎩λ − 2 = 0
= −3
⇒ ⎧⎨ λ1
⎩ λ2 = 2
⎧ y 1 = e −3 x
⇒ ⎨ 2x
⎩y2 = e V Problems of Section 2.3.
−3 x 2x
⇒ y = c1 e + c2 e .
Advanced Engineering Mathematics 2. Second-order Linear ODEs 19

2.5 Euler-Cauchy equation


x2y” + axy’ + by = 0 …………………………………………… (1)
Solution.
Substituting y = xm into Eq.(1), to get
x 2m (m − 1) x m − 2 + axmx m −1 + bx m = 0
⇒ m (m − 1) + am + b = 0 if x ≠ 0
⇒ m 2 + (a − 1) m + b = 0 (auxiliary equation)

Consider three cases

case 1. Distinct real roots m = 21 ⎡⎢(1 − a ) ± (a − 1)2 − 4b ⎤⎥


⎣ ⎦
m1
Then the general solution is y = c1x + c 2 x m2 .

Advanced Engineering Mathematics 2. Second-order Linear ODEs 20

case 2. Double root


1−a
m= 1
2
(1 − a ) ⇒ y1 = x 2
using the method of reduction of order to find another solution.
Substituting y2= uy1 into Eq.(1). We obtain
x2(u”y1 + 2u’y1’ + uy1”) + ax(u’y1 + uy1’) + buy1 = 0
⇒ u”x2y1 + u’x(2xy1’ + ay1) + u(x2y1” + axy1’ + by1) = 0
Since y1 is a solution, x2y1” + axy1’ + by1 = 0
1− a
= 2 x (1−2a ) x
1−a − 2 1−a
Since y1 = x 2 , 2 xy1'+ay1 2 +a x 2
1−a 1−a
= (1 − a ) x 2 +a x 2
1−a
= x 2 = y1
⇒u”x2y1 + u’xy1 = 0
⇒u”x + u’ = 0.
Advanced Engineering Mathematics 2. Second-order Linear ODEs 21

⇒ u" = − 1
u' x
⇒ ln u ' = − ln x, for x > 0
⇒ u' = 1
x
⇒ u = ln x
⇒ y 2 = ln x x m , m = 1-2a .
1−a
Thus the general solution y = (c1 + c2 ln x ) x 2 .

The following derivation is wrong,


since ln x, x < 0 is not defined.
ln u ' = ln x , if x < 0
⇒ u' = x
x2
⇒ u=
2
⇒ y 2 = x m+2 It is wrong.

Advanced Engineering Mathematics 2. Second-order Linear ODEs 22

case 3. Complex conjugate roots

m = 1− a ±
(a − 1) −4b ,
2
where (a − 1) − 4b < 0
2
2 2

⇒ m = 1 − a ± i 4b − a − 1
( ) 2

2 2
m = μ + iν
⇒ ⎧⎨ 1
⎩ m2 = μ − iν
⎧z1 = x m1 = x μ x iν = x μ e iν ln x

⎪ = x [cos(ν ln x ) + i sin(ν ln x )]
μ
⇒ ⎨
⎪z2 = x m2 = x μ x −iν = x μ e − iν ln x

⎩ = x [cos(ν ln x ) − i sin(ν ln x )]
μ

⎧ y1 = x μ cos(ν ln x )
⇒ ⎨ μ
⎩ y 2 = x sin(ν ln x )
The general solution y = (a cos(ν ln x ) + b sin(ν ln x )) x μ .
V Problems of Section 2.5.
Advanced Engineering Mathematics 2. Second-order Linear ODEs 23

2.6 Existence and uniqueness theory


V Theorem 1 (Existence and uniqueness theory for initial value problems)
For an initial values problem
y” + py’ +qy = 0
y(x0) = k0, y’(x0)= k1,
if p(x) and q(x) are continues functions on some open interval
I and x0 is in I, then the initial value problem has a unique
solution y(x) on the interval I.

V We will discuss the existence of a general solution for a DE.

V For a 2nd-order DE, existing a general solution c1y1 + c2y2 means y1 and
y2 are linear independent; that is, k1y1 + k2y2 = 0 ⇒ k1= k2= 0.

y1 y 2
V We know that the Wronskian ≠ 0 ⇔ y1 and y 2 are linear
y1' y 2 '
independent.

Advanced Engineering Mathematics 2. Second-order Linear ODEs 24

V Now we want to prove the statement

V Theorem 2 (Wronskian test for linear independent)


Let y1(x) and y2(x) be solution of y” + py’ + qy = 0 on an
interval I
y y
W [y1, y 2 ] = 1 2 = y1y 2′ − y1′y 2 for all x in I
y1′ y 2′
Then (a) Either W [y1,y2] = 0 for all x in I,
or W [y1,y2] ≠ 0 for all x in I,
(b) y1 and y2 are linear independent on I
⇔ W [y1,y2] ≠ 0 for some x in I .
Proof
(a) Calculate W’ = y1’ y2’ + y1y2” - y1” y2 - y1’ y2’
= y 1y 2” - y 1” y 2
y1” + py1’ + qy1 = 0
Since
y2” + py2’ + qy2 = 0
Advanced Engineering Mathematics 2. Second-order Linear ODEs 25

-y2y1” - py2y1’ - qy2y1 = 0


⇒ y1y2” + py1y2’ + qy1y2 = 0

⇒ -y2y1” + y1y2” + p (-y2y1’ + y1y2’ ) = 0


⇒ W’ + p W = 0 (A linear 1st-order DE)
⇒ W = ce -∫pdx
if c = 0 ⇒ W = 0 for all x in I,

if c ≠ 0 ⇒ W ≠ 0 for all x in I

(b) “ ⇐ “ (independent ⇐ W ≠ 0)
Prove by showing “dependent ⇒ W = 0”.
If y1 and y2 are linear dependent, then y2 = ky1 for
some constant k. Thus
W[y1,y2] = y1y2’ - y1’y2 = ky1y1’ - ky1y1’ = 0 .

Advanced Engineering Mathematics 2. Second-order Linear ODEs 26

“ ⇒ “ (independent ⇒ W ≠ 0)
prove by showing “W = 0 ⇒ dependent”.
Assume y1 ≠ 0 , y2 ≠ 0. Consider the linear system of equations
k1y1(x0) + k2y2(x0) = 0
k1y1’(x0) + k2y2’(x0) = 0,
where k1 and k2 are unknown.
⎡ y ( x ) y 2 ( x0 )⎤ ⎡ k1 ⎤
⇒⎢ 1 0 ⎥ ⎢k ⎥ = 0
y ′
⎣ 1 0 ( x ) y ′ x
2 0 ⎦⎣ 2 ⎦
( )
y1 y 2
By Cramer’s theorem, if = 0 (i.e., W = 0),
y1′ y 2′
then the system has a non-trivial solution; that is, k1 and k2 are
not both zero. Using these k1 and k2 to construct a function
y(x) = k1y1(x) + k2y2(x), then y(x) = k1y1 + k2y2 is a solution of
y” + py’ + qy = 0, and y satisfies the initial conditions
y(x0) = 0 and y’(x0) = 0
Advanced Engineering Mathematics 2. Second-order Linear ODEs 27

By the existence and uniqueness theorem, we known that the


solution is unique such that k1y1 + k2y2 = 0 on I. Since k1 and k2
are not both zero, y1 and y2 are linear dependent.

V A general solution of y” + py’ + qy = 0 includes all solutions;


that is, exist a solution of form c1y1 + c2y2.

V Theorem 3 (Existence of a gereral solution)


If the coefficients p(x) and q(x) of y” + py’ + qy = 0 are
continuous on some open interval I, then the DE has a
general solution on I.

V Theorem 4 (General solution)


If the coefficients p(x) and q(x) of y” + py’ + qy = 0 are
continuous on some open interval, then every solution
y = y(x) on I is of the form y(x) = c1y1(x) + c2y2(x).

Advanced Engineering Mathematics 2. Second-order Linear ODEs 28

V How to obtain a solution basis when only one solution is known ?


Let y1 be a solution of y” + py’ + qy = 0 on some interval I. Substitute
y2 = uy1 into the DE to get y2’ = u’y1 + uy1’ and y2” = u”y1 + 2u’y1’ + uy1”.
Then u”y1 + 2u’y1’ + uy1” + p(u’y1 + uy1’) + quy1 = 0
⇒ u”y1 + u’(2y1’ + py1) + u(y1” + py1’ + qy1) = 0
⇒ u”y1 + u’(2y1’ + py1) = 0
Let v = u’
2y '
⇒ v '+v ( 1 + p ) = 0
y1
v' 2y '
⇒ =− 1 −p
v y1
⇒ ln v = −2 ln y 1 − ∫ pdx
1
⇒ v = 2 e − ∫ pdx ≠ 0
y1
⇒ y 2 = uy 1 = y 1 ∫ vdx
Since ∫v dx = u can’t be a constant, y1 and y2 form a basis of solution.
Advanced Engineering Mathematics 2. Second-order Linear ODEs 29

V Ex. Find a basis of solution for the DE


x2y” – xy’ + y = 0
Solution.
One solution is y1 = x
1
−∫ (− )dx
1 x 1 1
v= e = 2 eln x =
x2 x x
1
y 2 = x ∫ dx = x ln x, x > 0.
x

V Problems of Section 2.6.

Advanced Engineering Mathematics 2. Second-order Linear ODEs 30

2.7 Nonhomogeneous ODEs

V Given a nonhomogeneous equation


y” + p(x)y’ + q(x)y = r(x) , r(x)≠0 …………………………………... (1)
Consider the corresponding homogenous equation
y” + p(x)y’ + q(x)y = 0 ……………………………………………...… (2)

V Theorem 1 (Relation between solutions of Eqs.(1) and (2))


(a) The difference of two solutions of Eq.(1) on some open
interval I is a solution of Eq.(2) on I.
(b) The sum of a solution of Eq.(1) on I and a solution of
Eq.(2) on I is a solution of Eq.(1) on I.
Advanced Engineering Mathematics 2. Second-order Linear ODEs 31

Proof.
(a) Let y1(x) and y2(x) be two solutions of y” + py’ + qy = r.
⇒ y1” + py1’ + qy1 = r and y2” + py2’ + qy2 = r
⇒ (y1” + py1’ + qy1) – (y2” + py2’ + qy2) = r – r = 0
⇒ (y1 - y2)” + p(y1 - y2)’ + q(y1 - y2) = 0.
(b) Let
y1 be a solution of Eq.(1), then y1"+ py1'+qy1 = r , and
y 2 be a solution of Eq.(2), then y 2 "+ py 2 '+qy 2 = 0
⇒ ( y1 + y 2 )′′ + p( y1 + y 2 )′ + q( y1 + y 2 ) = r .

V A general solution of the nonhomogeneous equation (1) on some open


interval I is a solution of the form
y(x) = yh(x) + yp(x) ………………………………………………..… (3)
where yh(x) = c1y1(x) + c2y2(x) is a general solution of the homogeneous
equation (2) on I and yp(x) is any solution of Eq.(1) on I containing no
arbitrary constants.

Advanced Engineering Mathematics 2. Second-order Linear ODEs 32

V Theorem2 (General solution)


Suppose that p(x), q(x) and r(x) in Eq.(1) are continuous on
some open interval I. Then every solution of Eq.(1) on I is
obtained by assigning suitable values to the arbitrary constant
in a general solution (3) of Eq.(1) on I.

V Conclusion
a general solution of nonhomogeneous equation

a general solution of corresponding homogeneous equation
+
a particular solution of the nonhomogeneous equation.
Advanced Engineering Mathematics 2. Second-order Linear ODEs 33

Solution by undetermined coefficients


V A simple method for finding the particular solution of
y” + py’ + qy = r …………………………………………….………. (1)

V Principle:
Choose for yp a form similar to that of r(x) and involving unknown
coefficient to be determined by substituting that choice for yp into Eq.(1).

V How to choose the solution form:


(a) Basic rule: Table 2.1 on page 105
r (x) yp(x)

k evx c evx
k xn knxn + kn-1xn-1 + … + k1x + k0
k cosωx, k sinωx m cosωx + n sinωx
k e αxcosωx, k e αxsinωx e αx (m cosωx + n sinωx)

Advanced Engineering Mathematics 2. Second-order Linear ODEs 34

(b) Modification rule:


If cr (x) = a solution of the corresponding homogeneous equation,
then choose yp(x) = kxr(x) or kx2r(x), …
(c) Sum rule:
If r(x) is a linear combination of functions listed in the left column of
Table 2.1, then yp(x) is taken as linear combination of the
corresponding functions listed in the right column of Table 2.1.

V The properties of the method


(a) The method corrects itself in the same that a false choice of yp.
(b) One choice with too few terms will lead to a contradiction.
(c) A choice of too many terms will give a correct result, with superfluous
coefficients coming out zero.
Advanced Engineering Mathematics 2. Second-order Linear ODEs 35

V Ex.1 ~ 4.
(1) r (x) = 8x2 ⇒ yp(x) = k2x 2 + k1x + k0.
If you choose yp(x) = k2x 2 would fail, why ?
y” + 4y = 8x 2
2k2 + 4k2x 2 = 8x 2
If you choose yp(x) = k2x 2 +k1x + k0
2k2 + 4k2x 2 + 4k1x + 4k0 = 8x 2

(2) r (x) = e x, yh(x) = c e x ⇒ yp(x) = cxe x.

(3) r (x) = e x + x, yh(x) = (c1 + c2x) e x ⇒ yp(x) = cx 2 e x + k1x + ko .

(4) r (x) = 16e x + sin 2x, yh(x) = e –x (A cos2x + B sin2x)


⇒ yp(x) = ke x + M cos2x + N sin2x.

V Problems of Section 2.7.

Advanced Engineering Mathematics 2. Second-order Linear ODEs 36

2.10 Solution by variation of parameters

V A general method to solve nonhomogeneous DE without special right


side r(x). For example
3
y ′′ − 2y ′ + y = x 2 e x

V For the DE y” + p(x) y’ + q(x) y = r(x). The method “variation of


parameters” gives a particular solution yp in the form
y 2r yr
y p ( x ) = − y1 ∫ dx + y 2 ∫ 1 dx,
w w
where y1 and y2 form a basis of solutions of the corresponding equation
y” + p(x) y’ + q(x) y = 0
and w = y1y2’ – y1’y2 is the Wronskian of y1 and y2.
Advanced Engineering Mathematics 2. Second-order Linear ODEs 37

V Ex.1. Solving y”+ y = secx.


y1 = cosx, y2 = sinx, and W [y1, y2] = 1.

y p = − cos x ∫ sin x sec x dx + sin x ∫ cos x sec x dx


sin x cos x
= − cos x ∫ dx + sin x ∫ dx
cos x cos x
cos′ x
= − cos x ∫ − ( ) dx + x sin x
cos x
= cos x ln cos x + x sin x
⇒ y = y h + y p = c1 cos x + c2 sin x + cos x ln cos x + x sin x
= (c1 + ln cos x ) cos x + (c2 + x ) sin x.

Advanced Engineering Mathematics 2. Second-order Linear ODEs 38


y 2r yr
V How to get y p (x ) = − y1∫
dx + y 2 ∫ 1 dx ?
w w
For a nonhomogeneous DE and the corresponding homogeneous DE:
y” + p(x) y’ + q(x) y = r(x) ………………………………………….. (1)
and y” + p(x) y’ + q(x) y = 0.
If p and q are continuous in an open interval I, the homogeneous DE
has a general solution
yh(x) = c1y1(x) + c2y2(x) on I.
Now we replace c1 and c2 by functions u(x) and v(x) and to determine
u(x) and v(x) functions such that
yp(x) = u(x)y1(x) + v(x)y2(x) ………………………………………. (2)
Differentiating Eq.(2) to obtain
yp‘(x) = u’y1 + uy1’ + v’y2 + vy2’ ………...…………………………. (3)
We need two conditions to determine u(x) and v(x); one condition is that
yp(x) satisfies Eq(1). Now we assume another condition u′y1 + v ′y 2 = 0.
Advanced Engineering Mathematics 2. Second-order Linear ODEs 39

This reduce yp’(x) to the form yp’(x) = uy1’ + vy2’


Differentiating the equation, we have
y p " = u ' y1'+uy1"+v ' y 2 '+vy 2 " .......... .......... .......... .......... ..... ( 4)
Substituting Eqs.(2), (3) and (4) into Eq.(1), we obtain
u ' y1'+uy 1"+v ' y 2 '+vy 2 "+ puy 1'+ pvy 2 '+quy 1 + qvy 2 = r
⇒ u (y1"+ py 1'+qy 1 ) + v ( y 2 "+ py 2 '+qy 2 ) + u ' y1'+v ' y 2 ' = r
⇒ u ' y1'+v ' y 2' = r

⎧u ' y + v ' y 2 = 0
⇒ ⎨ 1
⎩u ' y1'+v ' y 2 ' = r
− r y2 r y1
⇒ u' = and v ' = .
W [ y1, y 2 ] W [ y1, y 2 ]

Advanced Engineering Mathematics 2. Second-order Linear ODEs 40

Since W [ y 1, y 2 ] ≠ 0

r y2 ry
⇒ u = −∫ dx and v = ∫ 1 dx
w w
ry ry
⇒ y p = − y 1 ∫ 2 dx + y 2 ∫ 1 dx .
w w

V Problems of Section 2.10.

You might also like