Second Order ODE
Second Order ODE
Equation
Example
Verify that y = cos x and y = sin x are solutions of the homogeneous
linear ODE
′′
y +y =0
for all x.
Example
Verify that y = cos x and y = sin x are solutions of the homogeneous
linear ODE
′′
y +y =0
for all x.
′′ ′ ′′ ′
y + p(x)y + q(x)y = (c1 y1 + c2 y2 ) + p(c1 y1 + c2 y2 )
+ q(c1 y1 + c2 y2 )
′′ ′′ ′ ′
= c1 y1 + c2 y2 + p(c1 y1 + c2 y2 ) + q(c1 y1 + c2 y2 )
′′ ′ ′′ ′
= c1 (y1 + py1 + qy1 ) + c2 (y2 + py2 + qy2 )
= 0 Since y1 and y2 are solutions, by assumption
y = c1 cos x + c2 sin x
y = c1 y1 + c2 y2 (B)
Example
′′
cos x and sin x form a basis of solutions od the ODE y + y = 0 for
all x because their quotient is cot x ̸= constant(or tan x ̸= constant).
Hence y = c1 cos x + c2 sin x is a general solution. The solution
y = 3.0 cos x − 0.5 sin x of the initial value problem is a particular
solution.
′′ ′ ′ ′′ ′
(x 2 − x)(u x + 2u ) − x 2 u = 0, (x 2 − x)u + (x − 2)u = 0
dv x −2 1 2
=− 2 dx = ( − )dx (8)
v x −x x −1 x
(λ2 + aλ + b)e λx = 0.
y 1 = e λ1 x and y2 = e λ2 x
λ2 + λ − 2 = 0.
y = c1 e x + c2 e −2x .
′
Now, y (x) = c1 e x − 2c2 e −2x , so from the initial conditions and
general solution we have,
y (0) = c1 + c2 = 4,
′
y (0) = c1 − 2c2 = −5
y = e x + 3e −2x .
e λ1 x = e (α+iβ)x = e αx e iβx
= e αx [cos βx + i sin βx]
= e αx cos βx + ie α x sin βx
Similarly, e λ2 x = e αx [cos βx − i sin βx]
e λ1 x + e λ2 x
Then = e αx cos βx = y1
2
e λ1 x − e λ2 x
= e αx sin βx = y2
2i
y = c1 e αx cos βx + c2 e αx sin βx
or
y = (c1 cos βx + c2 sin βx)e αx
Sol.
y = c1 x m1 + c2 x m2 (c1 , c2 arbitrary)
1
y = (c1 + c2 lnx)x m , m = (1 − a)
2
′′ ′ 1
x 2 y + axy + (1 − a)2 y = 0 (15)
4
or
′′ a ′ (1 − a)2
y + y + y =0 (16)
x 4x 2
−a
R
−pdx
From (16), p = xa . Hence e = e (−alnx) = e lnx = x −a
Divide by y12 = x 1−a gives U = 1/x so that u = lnx by integration.
Thus, y2 = uy1 = y1 lnx = ln x x (1−a)/2 .
y1 = x α cos (β ln x)
y2 = x α sin (β ln x)
are two linearly independent solutions and hence the general solution
is
y = x α c1 cos (β ln x) + c2 sin (β ln x)
y1 y2 ′ ′
W (y1 , y2 ) = ′ ′ = y1 y2 − y2 y1 (17)
y1 y2
cos ωx sin ωx
W (y1 , y2 ) =
−ω sin ωx ω cos ωx
= ω cos2 ωx + ωsin2 ωx
=ω
Theorem
′′ ′
If the ODE y + p(x)y + q(x)y = 0 has continuous coefficients p(x)
and q(x) on some special interval I , then every solution y = Y (x) of
it on I is of the form
′′ ′
y + p(x)y + q(x)y = r (x) (20)
Theorem
Relations of Solutions (A) to those of (B)
1 The sum of a solution y of (A) on some open interval I and a
solution ỹ of (B) on I is a solution of (A). In particular, (C) is
a solution of (A) on I .
2 The difference of two solutions of (A) on I is a solution of (B)
on I .
ke γx Ce γx
kx n (n = 0, 1, 2, . . .) Kn x n + Kn−1 x n−1 + . . . K1 x + K0
)
k cos ωx
Kcos ωx + M sin ωx
k sin ωx
)
ke αx cos ωx
eαx (K cos ωx + M sin ωx)
ke αx sin ωx
Basic Rule
Is r (x) in (23) is one of the functions in the first column in the
Table, choose yp in the same line and determine its undetermined
coefficients by substituting yp and its derivatives into the (23).
yh = A cos x + B sin x.
yp = K2 x 2 + K1 x + K0 .
′′
Then, yp + yp = 2K2 + K2 x 2 + K1 x + K0 = 0.001x 2
Equating the coefficients of x 0 , x, x 2 on both sides, we have
K2 = 0.001, K1 = 0, K2 + K0 = 0. Hence K0 = −2, K2 = −0.002.
The solution yp = −5x 2 e −1.5x . Hence the ODE has a general solution
yh = c1 e −x/2 + c2 e −3x/2
hence K = 0 and M = 1.
Substituting of yp2 into the given ODE and comparing the x and x 0
terms gives,
.
Second Order Ordinary Differential Equation 57 / 61
Solution by Variations of Parameters I
′′ ′
y + p(x)y + q(x)y = r (x) (24)
Z Z
y2 r y1 r
yp (x) = −y1 dx + y2 dx (25)
W W
where y1 , y2 form a basis of solution of the corresponding
homogeneous ODE
′′ ′
y + p(x)y + q(x)y = 0
′ ′
W = y1 y2 − y2 y1
Second Order Ordinary Differential Equation 59 / 61
Solve the nonhomogeneous ODE
′′ 1
y + y = sec x =
cos x
Z Z
yp = − cos x sin x sec xdx + sin x cos x sec xdx
y = yh + yp
= (c1 + ln| cos x|) cos x + (c2 + x) sin x.