Chapter 02 2nd-Order Linear ODEs
Chapter 02 2nd-Order Linear ODEs
y ′′ + p ( x) y ′ + q ( x) y = r ( x)
If r ( x) = 0 , y ′′ + p ( x) y ′ + q ( x) y = r ( x) reduces to
y ′′ + p ( x) y ′ + q ( x) y = 0
For a homogeneous linear ODE, 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:
Example:
The functions sin 2 x , cos 2 x are both solutions of the second-order linear ODE
y ′′ + 4 y = 0 . y = c1 sin 2 x + c 2 cos 2 x is also a solution.
Note that this conclusion does not hold for the non-homogeneous linear ODE.
1
※ Initial Value Problems. Basis. General Solution
y ( x0 ) = K 0 , y ′( x 0 ) = K 1
The conditions are used to determine the two arbitrary constants c1 and c 2 in a general
solution
y ( x) = c1 y1 ( x) + c 2 y 2 ( x)
It happens quite often that one solution can be found by inspection or in some other
way. Then a second linearly independent solution can be obtained by solving
first-order ODE. This is called the method of reduction of order (降階法). We first
show this method for example and then in general.
Example:
y ′′ − 2 y ′ + y = 0
y = e x u , y ′ = e x u + e x u ′ , y ′′ = e x u + 2e x u ′ + e x u ′′
e x u ′′ = 0 which implies u ′′ = 0 or u = x
※ General Derivation
2
y ′′ + p ( x) y ′ + q ( x) y = 0
This will reduce to y1u′′ + u′(2 y1′ + py1 ) = 0 since y1 is one solution. Now divide
this remaining ODE by y1 and set u′ = U , u′′ = U ′ . This leads to
2 y′
U ′ + 1 + p U = 0
y1
This is the desired first-order ODE, the reduced ODE. Separation of variables and
integration gives
= −(2 y1′ y1 + p ) dx
dU
and ln U = −2 ln y1 − ∫ pdx
U
1 − ∫ pdx
U= e
y12
y2 = y1u = y1 ∫ U dx
Example:
(1 − x 2 ) y ′′ − 2 xy ′ + 2 y = 0, y1 = x
Solution:
3
2(1 − 2 x 2 )
x(1 − x 2 )u ′′ + 2(1 − 2 x 2 )u ′ = 0 , or U′+ U =0
x(1 − x 2 )
−1 1 12 12
u ′ =2 2
U= =2 + −
x ( x − 1) x x +1 x −1
Integrating gives
1 1 x +1 1 x +1
u = − + ln , y 2 = ux = −1 + x ln
x 2 x −1 2 x −1
Example:
Reduce the order and solve the ODE yy ′′ = 4 ( y ′) 2
Solution:
du du dy du
Let y ′ = u , then y ′′ = = =u
dx dy dx dy
(alternative expression y ′′ = u ′ which does not work for non-linear ODEs)
Upon substation we have
du
yu = 4u 2
dy
Rearranging gives
du dy
=4
u y
dy
u = y′ = = cy 4 , y = (c1 + c2 x) −1 3
dx
4
2.2 Homogeneous Linear ODEs with Constant Coefficients
y′′ + ay′ + by = 0
y = e λx
y ′ = λ e λx and y ′′ = λ2 e λx
(λ2 + aλ + b)e λx = 0
λ 2 + aλ + b = 0
then the exponential function eλ x is a solution of the ODE with two possible constants
1 1
λ1 = (−a + a 2 − 4b ) , λ2 = (−a − a 2 − 4b )
2 2
The characteristic equation and its solutions will be basic because our derivation
shows that the functions
y1 = e λ1x and y 2 = e λ2 x
are solutions of the ODE. We can verify this by substituting both into the ODE.
From algebra we further know that the quadratic equation (二次方程) may have three
kinds of roots, depending on the sign of the discriminant a 2 − 4b , namely
5
Solve the initial value problem
y ′′ − 2 y ′ − 3 y = 0 , y (0) = 2 , y ′(0) = 14
Solution:
λ2 − 2λ − 3 = 0 , λ = 3, − 1
General solution:
y ( x) = c1e 3 x + c2 e − x
Particular solution:
y ′( x) = 3 c1e 3 x − c2 e − x
y (0) = c1 + c2 = 2 c = 4
ICs. ⇒ 1
y′(0) = 3c1 − c2 = 14 c2 =−2
y ( x) = 4e 3 x − 2e − x
y ′′ + 2 y ′ + y = 0
Solution:
λ 2 + 2λ + 1 = 0 , λ = −1, − 1
y ′′ + 2 y ′ + 5 y = 0
Solution:
λ2 + 2λ + 5 = 0 , λ = −1± 2i
General solution:
6
2.5 Euler-Cauchy Equations (尤拉-柯西方程式)
x 2 y ′′ + axy ′ + by = 0
We substitute
y = xm
and its derivatives y ′ = mx m−1 , y ′′ = m (m − 1) x m−2 into the ODE. This gives
m (m − 1) x m + amx m + bx m = 0 .
m (m − 1) + am + b = 0
(1 − a )
2
1− a
m= ± −b
2 4
y1 ( x) = x m1 , y 2 ( x ) = x m2
y ( x) = c1 x m1 + c2 x m2
Example:
x 2 y′′ + xy′ − y = 0
Solution:
Auxiliary equation:
m (m − 1) + m − 1 = m 2 − 1 = 0 , m = 1, − 1
General solution:
7
c2
y ( x) = c1 x +
x
x 2 y′′ + axy′ + (1 − a) 2 y 4 = 0
1
u = ∫ U dx where U= exp (− ∫ p dx)
y12
a
Note that p = is taken from the ODE written in the standard form, in our case
x
a
y′′ + y′ + (1 − a ) 2 y 4 x 2 = 0
x
y ( x) = (c1 + c2 ln x) x m
Example:
x 2 y′′ − xy′ + y = 0
Solution:
m (m − 1) − m + 1 = 0 , m = 1, 1
y = (c1 + c2 ln x) x
Example:
8
Solve the Euler-Cauchy equation
x 2 y′′ − xy′ + 2 y = 0
Solution:
m (m − 1) − m + 2 = m 2 − 2m + 2 = 0 , m =1± i
General solution:
9
2.6 Existence and Uniqueness of Solutions. Wronskian (朗斯基行列式)
In this section we shall discuss the general theory of homogeneous linear ODEs
y ′′ + p ( x) y ′ + q ( x) y = 0
with continuous, but otherwise arbitrary variable coefficients p and q. This will
concern the existence and form a general solution as well as the uniqueness of the
solution of initial value problem consisting of such an ODE and two initial conditions
y ( x 0 ) = K 0 , y ′( x 0 ) = K 1
If p (x) and q (x) are continuous functions on some interval I and x0 is in I, then
the initial value problem consisting of y ′′ + p ( x) y ′ + q ( x) y = 0 and y ( x 0 ) = K 0 ,
y ′( x 0 ) = K 1 has a unique solution y (x) on the interval I.
Let the ODE has continuous coefficients p (x) and q (x) on an open interval I.
Then two solutions y1 and y2 on I are linearly dependent on I if and only if their
Wronskian
W ( y1 , y2 ) = y1 y2′ − y2 y1′
If the ODE has continuous coefficients p (x) and q (x) on some open interval I, then
every solution y = Y (x) is of the form of
Y ( x) = C1 y1 ( x) + C2 y 2 ( x)
10
Hence y ′′ + p ( x) y ′ + q ( x) y = 0 does not have singular solutions (solutions not
obtainable from a general solution).
11
2.7 Nonhomogeneous ODEs
y ′′ + p ( x) y ′ + q ( x) y = r ( x)
where r ( x) ≠ 0 . We shall see that a “general solution” is the sum of a general solution
of the corresponding homogeneous ODE
y′′ + p ( x) y′ + q ( x) y = 0
※ Definition:
yh ( x) = c1 y1 + c2 y2
Associated with r (x) , can be obtained from the method of undetermined coefficients
Solution of ODE y ′′ + p ( x) y ′ + q ( x) y = r ( x)
y ( x) = yh ( x) + y p ( x)
- Particular solution:
(a) The sum of a solution y of NHODE on some open interval I and a solution ~
y of
a solution of NHODE on I.
L[ y + ~y ] = L[ y ] + L[ ~y ] = r + 0 = r
L[ y − y*] = L[ y ] − L[ y*] = r − r = 0
If the coefficients p (x) , q (x) , and the function r (x) are continuous on some open
interval I, then every solution of y ′′ + p ( x) y ′ + q ( x) y = r ( x) on I is obtained by
assigning suitable values to the arbitrary constants c1 and c2 in a general solution
y ( x) = yh ( x) + y p ( x) of y ′′ + p ( x) y ′ + q ( x) y = r ( x) on I.
solve the HODE and find any solution y p (x) of NHODE, so that we obtain a general
(a) Basic Rules. If r (x) is one of the functions in the first column in Table 2.1,
choose y p (x) in the same line and determine its undetermined coefficients by
13
(b) Modification Rules. If a term in your choice for y p happens to be a solution of the
(c) Sum Rule. If r (x) is a sum of functions in the first column of Table 2.1, choose
for y p the sum of the functions in the corresponding lines of the second column.
keλx Ce λx
kx n (n = 0, 1, … ) K n x n + K n−1 x n−1 + + K1 x + K 0
k cos ω x
K cos ω x + M sin ω x
k sin ω x
keαx cos ω x
eαx ( K cos ω x + M sin ω x)
αx
ke sin ω x
Example:
y ′′ − 5 y ′ + 6 y = 4e x
Solution:
y = c1e 2 x + c2 e 3 x + 2e x
Example:
y ′′ − 5 y ′ + 6 y = e 3 x
14
Solution:
Let y p ( x) = Cxe 3 x , C = 1 .
Example:
(1) y ′′ − 3 y ′ + 2 y = 4 x 2
(2) y ′′ − 5 y ′ + 6 y = 2e 2 x
(3) y ′′ − 4 y ′ + 4 y = 2e 2 x
(4) y ′′ − 5 y ′ + 6 y = e 2 x cos 3 x
(5) y ′′ − 2 y ′ + 2 y = 2e x cos x
Solution:
(1) y p ( x) = 2 x 2 + 6 x + 7
(2) y p ( x ) = −2 xe 2 x
(3) y p ( x) = x 2 e 2 x
1 2x
(4) y p ( x) = − e (3 cos 3 x + sin 3 x)
30
(5) y p ( x) = xe x sin x
15
2.10 Solution by Variation of Parameters
y ′′ + p ( x) y ′ + q ( x) y = r ( x)
To obtain y p (x) when r (x) is not too complicated, we can often use the method of
y h ( x) = c1 y1 ( x) + c2 y 2 ( x)
y p ( x) = u ( x) y1 ( x) + v ( x) y 2 ( x) 。
u ′y1 + v′y 2 = 0
y ′p = u y1′ + v y 2′
16
By differentiation, we obtain
u ′y1′ + v′y 2′ = r
u ′y1 + v′y 2 = 0
y2 r yr yr
u′ = − = − 2 , v′ = 1
y1 y 2′ − y 2 y1′ W W
By integration
y2 r y1r
u = −∫ dx , v=∫ dx .
W W
Example:
ex
y ′′ − 2 y ′ + y =
1− x
Solution:
y1 = e x , y 2 = xe x , W = y1 y 2′ − y 2 y1′ = e 2 x
y2 r x 1
u′ = − =− = 1− , u = x + ln 1 − x
W 1− x 1− x
y1r 1
v′ = = , v = − ln 1 − x
W 1− x
17
Particular solution:
y p = u y1 + v y 2 = e x ( x + ln 1 − x ) − xe x ln 1 − x
Example:
x 2 y ′′ − xy ′ + y = x ln x
Solution:
y1 = x , y 2 = x ln x , W = x
yr x ln x (ln x) 1 1
u′ =
− 2 =
− 2
=
− (ln x) 2 , u = − (ln x) 3
W x x 3
v′ =
y1r x(ln x) ln x
= = , v=
(ln x )2
W x2 x 2
1
y p ( x) = u ( x) y1 ( x) + v( x) y2 ( x) = x(ln x) 3
6
18