0% found this document useful (0 votes)
35 views27 pages

MA 108 - Ordinary Differential Equations: Suresh Kumar

Uploaded by

icarus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views27 pages

MA 108 - Ordinary Differential Equations: Suresh Kumar

Uploaded by

icarus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

MA 108 - Ordinary Differential Equations

Suresh Kumar

Department of Mathematics,
Indian Institute of Technology Bombay,
Powai, Mumbai 76
[email protected]

March 28, 2024

1/27
Outline of the lecture Week 4

Method of variation of parameters


Method of undetermined coefficients

2/27
Method of Variation of Parameters - a method to obtain
yp (x)
Method of variation of parameters is a powerful method to find a
particular solution of non homogeneous linear ODE if we know a
basis of solutions of the corresponding homogeneous ODE.
The method is due to Lagrange.
Here, we vary the constants c1 , c2 in the general solution (in
otherwords complementary function)
y (x) = c1 y1 (x) + c2 y2 (x), x ∈ I
of the corresponding homogeneous equation
Ly ≡ y 00 + p(x)y 0 + q(x)y = 0, x ∈ I
where I is an interval on which the functions p, q, and r are
continuous. That is, we replace the constants c1 , c2 by suitable
functions v1 (x), v2 (x), so that
yp (x) = v1 (x)y1 (x) + v2 (x)y2 (x), x ∈ I
is a solution of
3/27
Method of Variation of Parameters : Deriving a formula
for v1 , v2

Differentiate yp we get,

yp0 = v1 y10 + v2 y20 + v10 y1 + v20 y2 .

Look for v1 , v2 using the following Lagrange’s Ansatz


v10 y1 + v20 y2 = 0.
Thus yp0 = v1 y10 + v2 y20 and so

yp00 = v1 y100 + v10 y10 + v2 y200 + v20 y20 .

Substituting yp , yp0 , yp00 in the given non-homogeneous ODE and


rearranging the terms, we get

v1 (y100 + py10 + qy1 ) + v2 (y200 + py20 + qy2 ) + v10 y10 + v20 y20 = r (x).

4/27
Method of Variation of Parameters : Deriving a formula
for v1 , v2

Thus,
v10 y10 + v20 y20 = r (x).
Recall that we also have (Ansatz)

v10 y1 + v20 y2 = 0.

Thus, we have:

v10
    
y1 y2 0
= , x ∈I
y10 y20 v20 r (x)

5/27
Method of Variation of Parameters: Deriving a formula for
v1 , v2

Using Cramer’s rule,

0 y2 y1 0
0 0
r (x) y2 y1 r (x)
v10 = , v20 = .
W (y1 , y2 ) W (y1 , y2 )

Thus, for a fixed x0 ∈ I


Z x Z x
y2 (t)r (t) y1 (t)r (t)
v1 (x) = − dt, v2 = dt.
x0 W (y1 , y2 )(t) x0 W (y1 , y2 )(t)

Hence,
Z x Z x
y1 (t)r (t) y2 (t)r (t)
yp (x) = y2 (x) dt − y1 (x) dt, x ∈ I .
x0 W (y1 , y2 )(t) x0 W (y1 , y2 )(t)

6/27
Method of Variation of Parameters

Hence Z x
yp (x) = K (x, t)r (t)dt, x ∈ I
x0

where
y2 (x)y1 (t) − y1 (x)y2 (t)
K (x, t) = .
W (y1 , y2 )(t)
The general solution of the non-homogeneous equation is
y = c1 y1 + c2 y2 + yp

7/27
Method of Variation of Parameters

Let us try to understand the Lagrange’s Ansatz.


The function
yp = v1 y1 + v2 y2
be the particular solution we are looking for the non homogeneous
linear ODE
y 00 + p(x)y 0 + q(x)y = r (x)
Modify the non homogeneous ODE by ’removing’ r (x) from x = ξ
onwards.
Then the solution Y (x, ξ) for x ≥ ξ of the modified ODE is

Y (x, ξ) = v1 (ξ)y1 (x) + v2 (ξ)y2 (x), x ≥ ξ.

8/27
Method of Variation of Parameters

Observe that the original solution yp and the modified solution


Y (, ξ) are tangential at x = ξ.
This leads to

Y (x, ξ) = yp (x), Y 0 (x, ξ) = yp0 (x)

at x = ξ. i.e.

v1 (ξ)y1 (ξ) + v2 (ξ)y2 (ξ) = yp (ξ), (1)


v1 (ξ)y10 (ξ) + v2 (ξ)y20 (ξ) = yp0 (ξ). (2)

This must hold for all ξ, since ξ chosen arbitrarily.


Differentiate eq. (1) w.r.to ξ and substract from eq. (2), we get

v10 (ξ)y1 (ξ) + v20 (ξ)y2 (ξ) = 0

the Lagrange’s Ansatz.


9/27
Example 1
Geometric meaning :yp (x) is the ’envelop’ of the family {Y (x, ξ)}ξ
and Lagrange’s Ansatz is the tangency condition.
Example 1: Find a particular solution of
y 00 + y = csc x, x ∈ (0, π)

Step I : Find a basis of solutions for the associated homogeneous


equation
y 00 + y = 0.
Following is a basis of solution:
y1 (x) = sin x, y2 (x) = cos x.
The general solution (complementary function) is
y (x) = c1 y1 + c2 y2 .
Step II : Calculate the Wronskian W (y1 , y2 ):
sin x cos x
W (y1 , y2 ) = = −1.
cos x − sin x 10/27
Now,
Z x Z x
y2 (t)r (t) cos t csc t
v1 (x) = − dt = − dt = ln | sin x|,
π W (y1 , y2 )(t) π −1
2 2

and
Z x Z x
y1 (t)r (t) sin x csc x π
v2 (x) = dt = dx = −x + .
π W (y1 , y2 )(t) π −1 2
2 2

Hence, a particular solution is given by

yp (x) = sin x ln | sin x| − x cos x, x ∈ (0, π).

(How ?)
What about the general solution ?

11/27
Example 2
Find the general solution of

y 00 − y 0 − 2y = e −x .

A basis of solutions of the corresponding homogeneous equation is

y1 = e 2x , y2 = e −x .

Now,
e 2xe −x
W (y1 , y2 ) = = −3e x .
−e −x
2e 2x
Z Z −x −x
y2 r (x) e e 1
v1 = − dx = − x
dx = − e −3x ,
W (y1 , y2 ) −3e 9
and
e 2x e −x
Z Z
y1 r (x) 1
v2 = dx = x
dx = − x.
W (y1 , y2 ) −3e 3

12/27
Hence,
1 1 1 1
yp = − e −3x e 2x − xe −x = − e −x − xe −x .
9 3 9 3
The general solution is
1 1 1
y = C1 e 2x + C2 e −x − e −x − xe −x = C1 e 2x + C2 e −x − xe −x .
9 3 3

13/27
Example 3

Find a particular solution of

y 00 + 4y = 3 cos 2t.

A basis of solutions of the corresponding homogeneous equation is

y1 = cos 2t, y2 = sin 2t,

and
sin 2t · 3 cos 2t
Z
3
v1 = − dt = cos 4t,
2 16
cos 2t · 3 cos 2t
Z
3 3
v2 = dt = sin 4t + t.
2 16 4
Thus, a particular solution is

yp = v1 y1 + v2 y2 Complete it!

14/27
Method of Undetermined Coefficients

Method of variation of parameters can be used whenever a


basis of solutions is known. But is not always an easy method
to execute.
Introduce another method called the method of undetermined
coefficients which is easier to excute for many cases.
In the method of undetermined coefficients, we assume that a
particular solution is known upto some unknown constants.
i.e. method works if we know the ’form’ of particular solution
of the non homogeneous ODE.

15/27
Method of Undetermined Coefficients

How to find the form of the particular solution of

Ly = r (x) ?

Let A be a linear differential operator (annihilator for r (x))


such that
Ar = 0.
If {y1 , y2 } is a basis for Ly = 0, then y = c1 y1 + c2 y2 + yp ,
[where yp is a particular solution of Ly = r (x)] is a solution of
the homogeneous linear ODE

ALy = 0.

16/27
Method of Undetermined Coefficients

Recall that y = c1 y1 + c2 y2 + yp is the general solution of


Ly = r (x).
Hence, if we know the basis of solution of

ALy = 0,

then we can get yp upto some undetermined coefficients by


looking at the basis of ALy = 0 and Ly = 0.

17/27
Method of Undetermined Coefficients

ALy = 0,
is a higher order linear ODE !
What is a basis of solutions of

ALy = 0 ?

A basis of nth order linear homogenous ODE

Gy := y (n) + p1 (x)y (n−1) + · · · + pn (x)y = 0, x ∈ I ,

is a set of n linear independent solutions y1 , y2 , · · · , yn of the


ODE.

18/27
Method of Undetermined Coefficients

We say that the functions y1 , y2 , · · · yn defined on an interval I are


said to be linearly independent if

c1 y1 (x) + c2 y2 (x) + · · · + cn yn (x) = 0 ∀ x ∈ I

=⇒ c1 = c2 = · · · cn = 0.
For eaxmple x, x 2 , x 3 are linearly independent in R

19/27
Method of Undetermined Coefficients
Consider nth order linear ODE with constant coefficients
y (n) + p1 y (n−1) + . . . + pn y = 0.
As in the 2nd order linear ODE with constant coefficients, we start
with a trial solution y = e rx and can see that
y = e rx is a solution if r is a root of the characteristic equation
P(r ) := r n + p1 r n−1 + · · · + pn = 0.
If r is a root (real or complex) of the characteristic function
with mulitplicity m, then e rx , xe rx , · · · , x m−1 e rx are linearly
independent solutions.
Observe that P(r ) = P 0 (r ) = · · · = P (m−1) (r ) = 0 and
∂ rx ∂ ∂
G(xe rx ) = G( e ) = G(e rx ) = (P(r )e rx )
∂r ∂r ∂r
= P(r )xe rx + P 0 (r )e rx = 0.
i.e., xe rx is a solution. Similarly we can see the other solutions.
20/27
Example 1

Particular solution of the DE:

y 00 − 3y 0 − 4y = 3e 2x .

Observe that Ar = (D − 2)(3e 2x ) = 0, and {e −x , e 4x } form a


basis for Ly = y 00 − 3y 0 − 4y = 0.
ALy = (D + 1)(D − 4)(D − 2)y .
Hence {e −x , e 4x , e 2x } form a basis for ALy = 0.
For y1 = c1 e −x + c2 e 4x + yp ,

ALy1 = (D − 2)(D 2 − 3D − 4)y1 = 0.

21/27
Example 1
Consider

(D 2 − 3D − 4)(c1 e −x + c2 e 4x + Ae 2x ) = (D 2 − 3D − 4)(Ae 2x ).

Hence, look for yp = Ae 2x and determine A, the


undetermined coefficient of such that

(D 2 − 3D − 4)yp = 3e 2x .

(Ae 2x )00 − 3(Ae 2x )0 − Ae 2x = 3e 2x .


1
=⇒ 4Ae 2x − 6Ae 2x − 4Ae 2x = 3e 2x =⇒ A = − .
2
1
Therefore, yp (x) = − e 2x is a particular solution of the DE.
2
How do you get the general solution? General solution is
1
y = c1 e 4x + c2 e −x − e 2x .
2
22/27
Example 2

Find the general and a particular solution of the DE:

y 00 + 5y 0 + 6y = e −3x .

(D + 3)e −3x = 0
Basis for Ly = y 00 + 5y 0 + 6y = 0 is {e −2x , e −3x }.
Basis for
ALy = (D 2 + 5D + 6)(D + 3)y = 0
is {e −2x , e −3x , xe −3x }.
General solution of Ly = e −3x is a part of the general solution of
ALy = 0. So look for yp = Axe −3x .
We get: A = −1. Write down the general solution.

23/27
Example 3

Find a particular solution of

Ly = y 00 − 3y 0 − 4y = 2 sin x.

Observe
Ar = (D 2 + 1) sin x = 0.
The basis for Ly = 0 is {e −x , e 4x }.

AL = (D 2 + 1)(D + 1)(D − 4).


{e −x , e 4x , cos x, sin x} is a basis for ALy = 0.
General solution of Ly = 2 sin x is a part of the general solution of
ALy = 0.

24/27
Example 3

So look for yp in the form, yp = A cos x + B sin x. Thus,

yp0 = −A sin x + B cos x; yb00 = −A sin x − B cos x.

Substituting, we get:

(−5B + 3A − 2) sin x + (−3B − 5A) cos x = 0.

Thus,
−5B + 3A = 2; 3B + 5A = 0
5 5
Thus, A = , B = − , and a particular solution is
6 18
5 5
yp (x) = − sin x + cos x.
18 6

25/27
Method of Undetermined Coefficients-Working Rules
r (x) = yp =
n ax ax ax
x e , a ∈ R and a is not A0 e + A1 xe + · · · + An x n e ax
a root of the charact. eq.
x n e ax , a ∈ R and a is x µ (A0 e ax + A1 xe ax + · · · + An x n e ax )
a root of the charact. eq.
with multiplicity µ
n
X n
X 
x n e ax cos bx / x n e ax sin bx e ax Ak x k cos bx + Bk x k sin bx
k=0 k=0
a + ıb is not a root
the charact. eq.
n
X n
X 
x n e ax cos bx / x n e ax sin bx x µ e ax Ak x k cos bx + Bk x k sin bx
k=0 k=0
a + ıb is a root of
charact. eq.
with multiplicity µ

26/27
Method of Undetermined Coefficients

If
r (x) = r1 (x) + r2 (x) + . . . + rn (x),
where ri (x) are e ax or sin ax or cos ax or polynomials in x, consider
the n subproblems

y 00 + py 0 + qy = ri (x).

If yi (x) is a particular solution of this problem, then,

yp (x) = y1 (x) + y2 (x) + . . . + yn (x)

is a particular solution of

y 00 + py 0 + qy = r (x).

27/27

You might also like