You are on page 1of 46

Differential Equations & Complex Variables

Saraswati Acharya, PhD


Department of Mathematics
School of Science, Kathmandu University
Kavre, Dhulikhel

Chapter 2: Second Order Differential Equation


Lecture 1, 2, 3

April, 2020
Second Order Linear Differential Equation:
y 00 + py 0 + qy = r

Characteristic features:
p, q and r are functions of x alone or constants.
If r = 0,

y 00 + py 0 + qy = 0,

the equation is homogeneous; otherwise it is non-homogeneous.


Linear in y , y 0 and y 00 .
IVP: y 00 + py 0 + qy = r , y (x0 ) = k0 , y 0 (x0 ) = k1 .

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
2 / 46 K
A General Solution of an Homogeneous Linear
Equation

A general solution of an equation

y 00 + p(x)y 0 + q(x)y = 0

on an open interval I is a solution y = c1 y1 + c2 y2 with y1 and y2 not


proportional solutions of the equation on I and c1 , c2 arbitrary constants.
The y1 and y2 are then called a basis (or fundamental system) of the
equation on I .
A particular solution of the equation is obtained if we assign specific
values to c1 , c2 .

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
3 / 46 K
Theorem
Superposition principle or Linearity principle

If y1 , y2 are solutions of equation

y 00 + py 0 + qy = 0 (∗)

and c1 , c2 are constants, then the function y (x) = c1 y1 + c2 y2 is also a


solution of (∗) equation.
Proof: Let y1 and y2 are solution of (∗). Then by substitution
y = c1 y1 + c2 y2 and its derivatives into (∗).
Now,
y 0 = c1 y1 0 + c2 y2 0 and y 00 = c1 y1 00 + c2 y2 00
Therefore, y 00 + py 0 + qy implies
c1 (y1 00 + py1 0 + qy1 ) + c2 (y2 00 + py2 0 + qy2 ) = 0

Remark
1.The theorem holds for homogeneous linear ODEs only not for
non-homogeneous linear or non-linear ODEs.

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
4 / 46 K
Linearly Independent, Linearly dependent, Basis

Linearly Independent Two functions y1 (x) and y2 (x) are linear


independent on an interval I where they are defined if

k1 y1 (x) + k2 y2 (x) = 0 ⇒ k1 = 0, k2 = 0.

Linearly dependent
Two functions y1 (x) and y2 (x) are linear dependent on an interval I where
they are defined if
k1 y1 (x) + k2 y2 (x) = 0
also holds for some constants k1 , k2 not both zero. Then, if k1 6= 0 or
k2 6= 0, we can divide and solve, obtaining
k2 k1
y1 = − y2 or y2 = − y1 .
k1 k2
Hence, then y1 and y2 are proportional, where as in the case of linearly
independence, they are not proportional.

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
5 / 46 K
Basis

A basis of solution of

y 00 + p(x)y 0 + q(x)y = 0 (1)

on an open interval I is a pair y1 , y2 of linearly independent solutions of


(3) on I.
Example We can easily verify that y1 = cos x and y2 = sin x are solutions
of the differential equation

y 00 + y = 0. (2)

Now cos x and sin x are not proportional, y1 /y2 = cot x 6= const. Hence
they form a basis of equation (2) for all x, and a general solution is

y = c1 cos x + c2 sin x.

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
6 / 46 K
How to obtain a Basis if One Solution is Known ?
Method of Reduction Order
y 00 + p(x)y 0 + q(x)y = 0 (3)
Given y1
Find y2
R
e− p(x)dx
Z
y2 = y1 dx (4)
y12
Proof Let y2 = uy1 , Then y20 = u 0 y1 + uy10 and y200 = u 00 y1 + 2u 0 y10 + uy100
Then equation (3) becomes
u 00 y1 + 2u 0 y10 + uy100 + p(u 0 y1 + uy10 ) + quy1 = 0. (5)
Collecting the terms in u 00 , u 0 , and u, we have
u 00 y1 + u 0 (2y10 + py1 ) + u(y100 + py10 + qy1 ) = 0
2y 0 + py1 0
or, u 00 + 1 u =0
y1
Saraswati Acharya (Department MATH207
of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
7 / 46 K
Let U = u 0 , Then 2y10 + py1
U0 + U=0
y1
dU −2y10 − py1
= dx
U y1
Z
ln |U| = −2 ln |y1 | − pdx

By taking exponential, we obtain,


1 − R p(x)dx
U= e dx (6)
y12

Here, U = u 0 , so that u = Udx.


R
Hence the required solution is y2 = uy1
R
e− p(x)dx
Z
y2 = y1 dx (7)
y12

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
8 / 46 K
Reduce to the first order and find basis solution of
(1 − x 2 )y 00 − 2xy 0 + 2y = 0, y1 = x
Given ODE (1 − x 2 )y 00 − 2xy 0 + 2y = 0 can be written as

2x 2
y 00 − 2
y0 + y =0
1−x 1 − x2
2x R
− pdx
R 2x
dx 2 1
Here, p = − , e = e 1−x 2 = e − ln |1−x | =
1 − x2 |1 − x 2 |
y1 = x
Z − R p(x)dx
e
Using y2 = y1 dx
y12
Z Z  
1 1 1/2 1/2
=x dx = x + − dx
x 2 (1 − x 2 ) x2 x + 1 x − 1
 
1 1 1 1 x +1
= x − + ln |x + 1| − ln |x − 1| = −1 + ln .
x 2 2 2 x −1

So, y1 and y2 are basis solution.


Saraswati Acharya (Department MATH207
of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
9 / 46 K
1 Find a basis solution of x 2 y 00 − xy 0 + y = 0, y1 = x.
2 Verify by substitution that the given functions form a basis. Solve the
given IVP:
1 y 00 − 16y = 0, e 4x , e −4x , y (0) = 3, y 0 (0) = 8.
2 y 00 − 6y 0 + 9y = 0, e 3x , xe 3x , y (0) = −1.4, y 0 (0) = 4.6.
Here, y1 = e 3x , y2 = xe 3x
y2 xe 3x
= 3x = x 6= constant.
y1 e
Therefore y1 and y2 are linearly independent solutions, so they form a
basis on any interval.
The corresponding general solution is y = (c1 x + c2 )e 3x , where c1 and
c2 are arbitrary constants. So, y 0 = (c1 + 3c1 x + 3c2 )e 3x
Using
y (0) = −1.4 =⇒ −1.4 = c2
∴c2 = −1.4
y 0 (0) = 4.6 =⇒ 4.6 = c1 + 3c2
4.6 = c1 − 4.2
∴c1 = 8.8.

∴ Required Particular solution is y = (8.8x − 1.4)e 3x .


Saraswati Acharya (Department MATH207
of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
10 / 46 K
Existence and Uniqueness Theory

Second Order ODE y 00 + p(x)y 0 + q(x)y = 0


General Solution y = c1 y1 + c2 y2
Initial Conditions y (x0 ) = k0 , y 0 (x0 ) = k1

If p(x) and q(x) are continuous function on some open interval I and x0 is
in I , then the initial value problem consisting of first and third has a
unique solution y (x) on the interval I .

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
11 / 46 K
Homogeneous Linear ODEs with Constant Coefficients
00
y + ay 0 + by = 0

Trial solution: y = e λx ,
y 0 = λe λx , y 00 = λ2 e λx

λ2 e λx + aλe λx + be λx = 0
e λx (λ2 + aλ + b) = 0
λ2 + aλ + b = 0, ∵ e λx 6= 0
√ √ √
−a ± a2 − 4b −a + a2 − 4b −a − a2 − 4b
λ= say, λ1 = , λ2 =
2 2 2
λ2 + aλ + b = 0 may have three kinds of roots, depending on the sign
of discriminant, a2 − 4b, namely
1 Two real roots if a2 − 4b > 0,
2 A real double root if a2 − 4b = 0,
3 Complex conjugate roots if a2 − 4b < 0.

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
12 / 46 K
Cont . . .

I. Two real distinct roots, λ1 and λ2


Basis solution of y 00 + ay 0 + by = 0 on any interval is
y1 = e λ1 x , y2 = e λ2 x
General solution is y = c1 e λ1 x + c2 e λ2 x
II. Real double root, λ1 = λ2 = λ = − 2a
Here, One solution is y1 = e −ax/2 , y12 = e −ax , p(x) = a
Another basis solution is Z − R p(x)dx
e
y2 = y1 dx
y12
Z − adxR
e
= y1 dx = y1 x
e −ax

y1 = e λx and y2 = xe λx are basis solution.


General solution is y = (c1 + c2 x)e λx

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
13 / 46 K
III. Complex conjugate roots, if a2 − 4b < 0

−a ± a2 − 4b −a
q
λ= = ± i b − a2 /4
2 2
−a
q
= α ± iβ, where α = , β = b − a2 /4
2
∗ αx+iβx αx
So, y1 = e = e (cos βx + i sin βx),
y2∗ = e αx−iβx = e αx (cos βx − i sin βx)

Basis solution is obtained by


y1∗ + y2∗
y1 = = e αx cos βx
2
y ∗ − y2∗
y2 = 1 = e αx sin βx
2i
General solution is y = e αx (c1 cos βx + c2 sin βx).

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
14 / 46 K
Example
Solve y 00 + 4y 0 + 4y = 0, y (0) = 2, y (1) = 0

Solution

Characteristic equation is
λ2 + 4λ + 4 = 0
(λ + 2)2 = 0
λ = −2, −2.
So, required solution is y = (c1 + c2 x)e −2x .
Using y (0) = 2, we get c1 = 2
Again, using y (1) = 0,
0 = (c1 + c2 )e −2
0 = 2e −2 + c2 e −2
∴c2 = −2.
Therefore required solution is y = 2e −2x (1 − x).
Saraswati Acharya (Department MATH207
of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
15 / 46 K
Solve y 00 + y 0 − 6y = 0, y (0) = 1, y 0 (0) = 0.
Characteristic equation is λ2 + λ − 6 = 0
∴λ = 2, −3.
y = c1 e 2x + c2 e −3x .
So, required solution is
Using y (0) = 1, we get 1 = c1 + c2
Again, using y 0 (0) = 0,
0 = 2c1 e 2x − 3c2 e −3x when x = 0
0 = 2c1 − 3c2
3c2 = 2c1
To find c1 and c2 , solving 1 = c1 + c2 and 3c2 = 2c1
3
3 = 3c1 + 2c1 =⇒ 5c1 = 3 =⇒ c1 =
5
3 2
again 1 = + c2 =⇒ c2 =
5 5
3 2
Therefore required solution is y = e 2x + e −3x .
5 5
Saraswati Acharya (Department MATH207
of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
16 / 46 K
Higher Order Linear ODEs

y n + pn−1 (x)y (n−1) + · · · + p1 (x)y 0 + p0 (x)y = r (x)


Homogeneous: y n + pn−1 (x)y (n−1) + · · · + p1 (x)y 0 + p0 (x)y = 0
General solution:
y = c1 y1 + c2 y2 + · · · cn yn , where y1 , y2 , · · · yn are basis or
fundamental system of solutions on I.
Initial Value Problem:
y n + pn−1 (x)y (n−1) + · · · + p1 (x)y 0 + p0 (x)y = r (x) together with
y (x0 ) = k0 , y 0 (x0 ) = k1 , · · · y (n−1) (x0 ) = kn−1
Homogeneous linear ODEs with constant coefficients
y n + an−1 y (n−1) + · · · + a1 y 0 + a0 y = 0

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
17 / 46 K
Trial solution: y = e λx
I. Distinct real roots
Basis solutions: y1 = e λ1 x , y2 = e λ2 x , · · · yn = e λn x
General solution is y = c1 e λ1 x + c2 e λ2 x + · · · + cn e λn x
II. Multiple real root, λ1 = λ2 = · · · = λn = λ
General solution is y = (c1 + c2 x + c3 x 2 + · · · + cn−1 x n−1 )e λx
III. Multiple complex roots, say, λ = α ± iβ is a complex double roots
Solution is e αx (cos βx), e αx (sin βx), xe αx (cos βx), xe αx (sin βx)
General solution is y = e αx [(c1 + c2 x) cos βx + (c3 + c4 x) sin βx).

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
18 / 46 K
Solve: y v − 3y iv + 3y 000 − y 00 = 0

Characteristic equation is λ5 − 3λ4 + 3λ3 − λ2 = 0

or, λ2 (λ3 − 3λ2 + 3λ − 1) = 0


or, λ2 (λ − 1)3 = 0
∴ λ = 0(multiplicity by 2), 1(multiplicity by 3)

General solution is y = (c1 + c2 x) + (c3 + c4 x + c5 x 2 )e x .

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
19 / 46 K
Solve: y iv + 3y 00 − 4y = 0

Characteristic equation is λ4 + 3λ2 − 4 = 0

or, λ4 + 4λ2 − λ2 − 4 = 0
or, (λ2 + 4)(λ2 − 1) = 0
∴ λ = ±2i, 1, −1

General solution is y = c1 e x + c2 e −x + c3 cos 2x + c4 sin 2x.

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
20 / 46 K
Solve the fourth-order ODE y iv − 5y 00 + 4y = 0.

• Characteristic Equation: λ4 − 5λ2 + 4 = 0

Put λ2 = α, then α2 − 5α + 4 = 0 (quadratic in α)

On solving; α = 1, 4. So, λ = −2, −1, 1, 2.

General solution:

y = c1 e −2x + c2 e −x + c3 e x + c4 e 2x

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
21 / 46 K
Euler Cauchy Equation x 2 y 00 + axy 0 + by = 0

Trial solution: y = x m ,
y 0 = mx m−1 , y 00 = m(m − 1)x m−2

m(m − 1)x m + max m + bx m = 0


x m (m(m − 1) + am + b) = 0
m2 + (a − 1)m + b = 0, ∵ x m 6= 0
p
−(a − 1) ± (a − 1)2 − 4b
m=
2
p p
−(a − 1) + (a − 1)2 − 4b −(a − 1) − (a − 1)2 − 4b
say, m1 = , m2 =
2 2
Auxiliary equation, m2 + (a − 1)m + b = 0 may have three kinds of
roots, depending on the sign of discriminant, (a − 1)2 − 4b, namely
1 Two real roots if (a − 1)2 − 4b > 0,
2 A real double root if (a − 1)2 − 4b = 0,
3 Complex conjugate roots if (a − 1)2 − 4b < 0.

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
22 / 46 K
Contd . . .

I. Two real distinct roots, m1 and m2


Basis solution of x 2 y 00 + axy 0 + by = 0 on any interval is
y1 = x m1 , y2 = x m2
General solution is y = c1 x m1 + c2 x m2
II. Real double root, m1 = m2 = m = − (a−1) 2
Here, One solution is y1 = x −(a−1)/2 , y12 = x −(a−1) , p(x) = a
x
Another basis solution isZ − R p(x)dx Z − R a dx
e e x
y2 = y1 2
dx = y1 −(a−1)
dx
y1 x
Z −a ln x
x −a
Z
e
= y1 dx = y 1 dx
x −(a−1) x −(a−1)
= y1 ln x

y1 = x m and y2 = x m ln x are basis solution.


General solution is y = (c1 + c2 ln x)x m

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
23 / 46 K
III. Complex conjugate roots, if (a − 1)2 − 4b < 0
p
−(a − 1) ± (a − 1)2 − 4b
m==
2
−(a − 1)
q
= ± i b − (a − 1)2 /4
2
−(a − 1)
q
= α ± iβ, where α = , β = b − (a − 1)2 /4
2
∗ α+iβ α iβ α ln x iβ
So, y1 = x =x x =x e = x α e iβ ln x
= x α (cos(β ln x) + i sin(β ln x)),
y2∗ = x α−iβ = x α (cos(β ln x) − i sin(β ln x))
Basis solution is obtained by
y1∗ + y2∗
y1 = = x α cos(β ln x)
2
y ∗ − y2∗
y2 = 1 = x α sin(β ln x)
2i
General solution is y = x α (c1 cos(β ln x) + c2 sin(β ln x)).
Saraswati Acharya (Department MATH207
of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
24 / 46 K
Solve: x 2 y 00 + 0.6xy 0 + 16.04y = 0

Characteristic equation is

m2 − 0.4y + 16.04 = 0
p
0.4 ± (−0.4)2 − 4 × 16.04
m=
2
0.4 ± 8i
=
2
= 0.2 ± 4i (∴ α = 0.2, β = 4)

So, required solution is


y = x 0.2 (c1 cos(4 ln x) + c2 sin(4 ln x))

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
25 / 46 K
Examples: Euler - Cauchy Equations

Problem: Solve x 2 y 00 + 2xy 0 − 12y = 0.

The Auxiliary Equation is

m2 + (2 − 1)m − 12 = 0

Its two roots are m1 = 3, m2 = −4 (Real distinct)


So, the general solution:

y (x) = c1 x 3 + c2 x −4

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
26 / 46 K
Problems: Euler - Cauchy Equations

1 x 2 y 00 − 2y = 0

Ans: y (x) = c1 + c2 x 3

2 5x 2 y 00 + 23xy 0 + 16.2y = 0

Ans: y (x) = (c1 + c2 ln |x|)x −9/2


3 (x 2 D 2 − 4xD + 6)y = 0, y (1) = 0.4, y 0 (1) = 0

Ans:
General solution: y (x) = c1 x 2 + c2 x 3
Particular solution: y (x) =????

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
27 / 46 K
Higher order Euler - Cauchy Equations

Real Roots:

Complex Roots:

Multiple Roots:

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
28 / 46 K
Solve: x 3 y 000 − 3x 2 y 00 + 6xy 0 − 6y = 0,
y (1) = 2, y 0 (1) = 1, y 00 (1) = −4.
General Solution: Put y = x m , then

m(m − 1)(m − 2)x m − 3m(m − 1)x m + 6mx m − 6x m = 0

Characteristic equation:

m(m − 1)(m − 2) − 3m(m − 1) + 6m − 6 = 0


m3 − 6m2 + 11m − 6 = 0
m = 1, m = 2, m = 3

So, y = c1 x + c2 x 2 + c3 x 3
Particular Solution: Using initial equations y (1) = c1 + c2 + c3 = 2
y 0 (1) = c1 + 2c2 + 3c3 = 1, y 00 (1) = 2c2 + 6c3 , (c1 , c2 , c3 ) = (2, 1, −1)
Therefore,
y = 2x + x 2 − x 3

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
29 / 46 K
Wronskian
There is a simple test which enables us to tell whether the solutions are
linearly dependent or not. It involves a determinant called Wronskian.
The Wronskian of y1 and y2 of the differential equation

y 00 + ay 0 + by = 0

y1 y2
W (y1 , y2 ) =
y10 y20
The Wronskian of y1 , y2 , · · · , yn is
y1 y2 ··· yn
y10 y20 ··· yn0
W (y1 , y2 , · · · , yn ) = y100 y200 ··· yn00
.. .. .. ..
. . . .
(n−1) (n−1) (n−1)
y1 y2 ··· yn
If W 6= 0, then Linearly Independent and If W = 0, then Linearly
dependent
Saraswati Acharya (Department MATH207
of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
30 / 46 K
Wronskian
There is a simple test which enables us to tell whether the solutions are
linearly dependent or not. It involves a determinant called Wronskian.
The Wronskian of y1 and y2 of the differential equation

y 00 + ay 0 + by = 0

y1 y2
W (y1 , y2 ) =
y10 y20
The Wronskian of y1 , y2 , · · · , yn is
y1 y2 ··· yn
y10 y20 ··· yn0
W (y1 , y2 , · · · , yn ) = y100 y200 ··· yn00
.. .. .. ..
. . . .
(n−1) (n−1) (n−1)
y1 y2 ··· yn
If W 6= 0, then Linearly Independent and If W = 0, then Linearly
dependent
Saraswati Acharya (Department MATH207
of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
31 / 46 K
Extra Problems
1 Show that the Wronskian of y1 and y2 of the differential equation
y 00 + ay 0 + by = 0
, W = 0 if y1 and y2 are linearly dependent and W 6= 0 if if y1 and y2
Linearly Independent.
00 0
2 Find the general solution of y + 0.2y + 4.01y = 0,
0
y (0) = 0, y (0) = 2.
0
3 Find the general solution (D 2 − D − 2)y = 0, where Dy = y
4 Find the Wronskian if y1 = cos(ωx) and y2 = sin(ωx) are the solution
00
of y + ω 2 y = 0
00 0
5 Find the solution of y − 2y + y = 0 and also show that solutions y1
and y2 linearly independent.
6 y v − 3y iv + 3y 000 − y 00 = 0
7 y 000 + 9y 0 = 0
8 y iv + 16y 00 = 0
9 (D 4 + 10D 2 + 9)y = 0
10 x 3 y 000 − 6y = 0
Saraswati Acharya (Department MATH207
of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
32 / 46 K
Non-homogeneous Linear Equations with Constant
Coefficients: Higher Order but Degree One

y (n) + pn−1 y (n−1) + · · · + p1 y 0 + p0 y = r (x) (1)


Here, r (x) 6= 0, p0 , p1 ,· · · ,p(n−1) are functions of x or constants.

• called linear equation with constant coefficients if each pi is constant.

Second order non-homogeneous linear ODEs with constant


coefficients
y 00 + ay 0 + by = r (x) (2)

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
33 / 46 K
Second order non-homogeneous linear ODEs with constant
coefficients

Every solution y of y 00 + ay 0 + by = r (x) on I can be written as

y (x) = yh (x) + yp (x)


where yh (x) = c1 y1 (x) + c2 y2 (x) is a general solution of homogeneous
ODE y 00 + ay 0 + by = 0,
yp (x) is any particular solution of nonhomogeneous equation.

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
34 / 46 K
How to find particular solution yp ?

Various Methods

1. Method of undetermined coefficients


2. Method of Variation of parameters

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
35 / 46 K
Method of Undetermined Coefficients

y 00 + ay 0 + by = r (x)

This method is applicable in a linear differential equation in case of


constant coefficients. General solution of y 00 + ay 0 + by = r (x) can be
written as

y (x) = yh (x) + yp (x)

Term in r (x) Choice for yp


ke γx Ce γx
kx n K0 + K1 x + K2 x 2 + · · · Kn x n
k sin ωx K sin ωx + M cos ωx
k cos ωx K cos ωx + M sin ωx
ke αx sin ωx e αx (K sin ωx + M cos ωx)
ke αx cos ωx e αx (K cos ωx + M sin ωx)

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
36 / 46 K
Basic rule: If r (x) is one of the functions in the first column in Table,
choose the corresponding function yp in the second column and
determine its undetermined coefficients by substituting yp and its
derivatives into given equation.
Modification: If any term of yp is a solution of the complementary
equation, multiply yp by x (or by x 2 or by x 3 if necessary).
Product rule: If r (x) is a product of functions in several lines of first
column of Table, then we take the trial solution to be a product of
functions of the same type.
Sum Rule: If r (x) is a sum of functions in the first column of the
above table, choose for yp (x) the sum of functions in the
corresponding lines of second column.
For example, if r (x) = x 2 + e 2x + sin 3x, then choose yp (x) as
yp (x) = K0 + K1 x + K2 x 2 + Ce 2x + K sin 3x + M cos 3x.

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
37 / 46 K
Example 1: Solve the initial value problem
y 00 + y = 0.001x 2 , y (0) = 0, y 0 (0) = 1.5.

General Solution of homogeneous ODE, yh


Characteristic equation: λ2 + 1 = 0 → λ = 0 ± 1i → α = 0, β = 1.

yh = A cos x + B sin x

Solution yp of the non-homogeneous ODE.


yp = k2 x 2 + k1 x + k0 → yp00 + yp = 2k2 + k2 x 2 + k1 x + k0 = 0.001x 2
So, k2 = 0.001, k1 = 0, 2k2 + k0 = 0 → ko = −2k2 = −0.002 and
y = yh + yp = A cos x + B sin x + 0.001x 2 − 0.002
Using initial conditions, y (0) = 0 and y 0 (0) = 1.5 → A = 0.02, B = 1.5

y = 0.002 cos x + 1.5 sin x + 0.001x 2 − 0.002

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
38 / 46 K
Example 2

Solve y 00 + 2y 0 + y = 2x sin x using method of undetermined coefficients.


The general solution of y 00 + 2y 0 + y = 0 is yh (x) = (c1 + xc2 )e x .
Here, r (x) = 2x sin x
We guess the particular solution as

yp (x) = (K0 + K1 x)(K cos x + M sin x)


= Q1 cos x + Q2 sin x + Q3 x cos x + Q4 x sin x
= (Q1 + xQ2 ) cos x + (Q3 + xQ4 ) sin x

Using yp and its derivatives in the equation y 00 + 2y 0 + y = 2x sin x, we


obtain Q1 = 1, Q2 = 1. Q3 = 1, Q4 = 0.
Thus, yp (x) = cos x + sin x − x cos x

Therefore, the required solution is


y (x) = yh (x) + yp (x) = (c1 + c2 x)e x + cos x + sin x − x cos x.

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
39 / 46 K
Let’s Try Some Problems
Solve the following ODEs.
1. y 00 + 4y = 8x 2 , Ans: y = Acos2x + Bsin2x + 2x 2 − 1
2. y 00 − 3y 0 + 2y = e x , Ans: y = c1 e x + c2 e 2x − xe x
3. y 00 + 5y 0 + 6y = 2e −x
Ans: y = c1 e −2x + c2 e −3x + e −x
9
4. (D 2 − 4D + 3)y = e x − x
2
1
Ans: y = c1 e + c2 e − x(e x + 3) − 2
x 3x
2
5. y 00 + 2y 0 + y = e −x , y (0) = −1, y 0 (0) = 1.
Ans: y = ( 12 x 2 − 1)e −x
6. (y 00 − 2y 0 + 5y ) = 1.25e 0.5x + 40cos4x − 55sin4x, y (0) = 0.2, y 0 (0) =
60.1
Hints: yh = e −x (Acos2x + Bsin2x)
yp = Ce 0.5x + Kcos4x + Msin4x
Ans:y = 20e −x sin2x + 0.2e 0.5x + 5sin4x

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
40 / 46 K
Method of Variation of Parameters
Theorem Let y1 , y2 be two linearly independent solutions of the equation
y 00 + ay 0 + by = 0 on an open interval I . Then the non-homogeneous
equation
y 00 + ay 0 + by = r (x)
has a particular solution yp (x) given by
Z Z
y2 (x)r (x) y1 (x)r (x)
yp (x) = −y1 dx + y2 dx
W (y1 , y2 )(x) W (y1 , y2 )(x)
Proof: Let us consider u, v such that the combination yp = uy1 + vy2 will
satisfy the equation
y 00 + ay 0 + by = r (x)
. Then yp0 = (uy10 + vy20 ) + (u 0 y1 + v 0 y2 )
To simplify the expression (i.e., to avoid appearance of u 00 and v 00 ),
Set u 0 y1 + v 0 y2 = 0 then yp0 = uy10 + vy20
Differentiating once again, we obtain yp00 = uy100 + u 0 y10 + vy200 + v 0 y20
Saraswati Acharya (Department MATH207
of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
41 / 46 K
Method of Variation of Parameters (contd.)
So, from
y 00 + ay 0 + by = r (x)
: yp00 + ayp0 + byp = u 0 y10 + v 0 y20 = r (x)
u and v can be determined by system of two linear equations
u 0 y1 + v 0 y2 = 0 and u 0 y10 + v 0 y20 = r (x)
To solve for u 0 and v 0 using Cramer’s Rule

y1 y2 0
y10 y20 r
y1 y2
D= = W (y1 , y2 )(x)
y10 y20
0 y2 y 0
D1 = = −ry2 , D2 = 10 = ry1
r y20 y1 b
D1 −ry2 D2 ry1
u0 = = , v0 = =
D W (y1 , y2 )(x) D W (y1 , y2 )(x)
Saraswati Acharya (Department MATH207
of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
42 / 46 K
Method of Variation of Parameters (contd.)

Z Z
y2 (x)r (x) y1 (x)r (x)
u=− dx, v= dx
W (y1 , y2 )(x) W (y1 , y2 )(x)
y1 y2
Here, W (y1 , y2 )(x) = 6= 0 (Wronskian ??)
y10 y20
Hence, the particular solution;
Z Z
y2 (x)r (x) y1 (x)r (x)
yp = u1 y1 + u2 y2 = −y1 dx + y2 dx
W (y1 , y2 )(x) W (y1 , y2 )(x)
y2 r
+ y2 yW1 r dx, where
R
Finally, yp = −y1 W dx

y1 y2
W = = W (y1 , y2 )(x)
y10 y20

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
43 / 46 K
Solve: x 2 y 00 − 2xy 0 + 2y = x 3 cos x
For homogeneous part: x 2 y 00 − 2xy 0 + 2y = 0
Auxillary equation is m2 − 3m + 2 = 0 or, m = 1, 2
∴ yh = c1 x + c2 x 2
y1 = x, y2 = x 2
y y x x2
Wronskian W (y1 , y2 ) = 10 20 = = x 2 6= 0.
y1 y2 1 2x
Writing the given ODE in standard form y 00 − x2 y 0 + x22 y = x cos x
Z Z 3 Z
ry2 x cos x
Now, dx = dx = x cos xdx =
Z W Z Z x2 
dx
x cos xdx − cos xdx dx = x sin x + cos x
dx
Z Z 2 Z
ry1 x cos x
dx = dx = cos xdx = sin x
W x2
Z Z
ry2 ry1
yp = −y1 dx + y2 dx
W W
= −x(x sin x + cos x) + x 2 sin x =⇒ yp = −x cos x.
∴ y = c1 x + c2 x 2 − x cos x.
Saraswati Acharya (Department MATH207
of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
44 / 46 K
Example: Solve y 00 − 5y 0 + 4y = 4t

For yh :
Z
y2 (t)r (t)dt
Again, u1 = −
Homogeneous Equation: W (y1 , y2 )(t)
y 00 − 5y 0 + 4y = 0; Z
(e t )(4t)dt 1
Characteristic Equation: =− 5t
= − (4t + 1)e −4t
−3e 12
λ2 − 5λ + 4 = 0 So, λ = 4, 1 Z
y1 (t)r (t)dt
u2 =
and yh = c1 e 4t + c2 et W (y1 , y2 )(t)
(e 4t )(4t) 4
Z
For yp : = = (t + 1)e −t
−3e 5t 3
We have yp = u1 y1 + u2 y2
5
y y e 4t et So, yp = u1 y1 + u2 y2 = t + and
W = 10 20 = 4
y1 y2 4e 4t et
5
=−3e 5t 6= 0 y = yh + yp =c1 e 4t + c2 e t + t +
4

Saraswati Acharya (Department MATH207


of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
45 / 46 K
Let’s try to solve these problems
1. y 00 + y = Rsecx, yh =?
yp = −y1 yW2 r dx + y2 yW1 r dx, where
y1 y2
W = = W (y1 , y2 )(x)
y10 y20
2. y 00 + y = 1 + tan t
Ans: y = c1 cos t + c2 sin t + [1 − cos t ln(sec t + tan t)]
12e x
3. y 00 − 2y 0 + y = 3
x
6e x
Ans: y = (c1 + xc2 )e x +
x
4. Solve the non-homogeneous Euler-Cauchy equation
x 3 y 000 − 3x 2 y 00 + 6xy 0 − 6y = x 4 ln x
Ans: 1st step: General Solution Substitute y = x m and the
derivatives into the given homogeneous equation.
m(m − 1)(m − 2) − 3m(m − 1) + 6m − 6 = 0
The roots are 1, 2, 3 and give as a basis of the homogeneous equation
y1 = x, y2 = x 2 , y3 = x 3
2nd step:??
Saraswati Acharya (Department MATH207
of Mathematics[2mm]School of Science, Kathmandu
April, 2020
University[2mm]
46 / 46 K

You might also like