MA 108 - Ordinary Differential Equations: Suresh Kumar
MA 108 - Ordinary Differential Equations: Suresh Kumar
Suresh Kumar
Department of Mathematics,
Indian Institute of Technology Bombay,
Powai, Mumbai 76
[email protected]
1/27
Outline of the lecture Week 4
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,
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
0 y2 y1 0
0 0
r (x) y2 y1 r (x)
v10 = , v20 = .
W (y1 , y2 ) W (y1 , y2 )
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
8/27
Method of Variation of Parameters
at x = ξ. i.e.
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
(How ?)
What about the general solution ?
11/27
Example 2
Find the general solution of
y 00 − y 0 − 2y = e −x .
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
y 00 + 4y = 3 cos 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
15/27
Method of Undetermined Coefficients
Ly = r (x) ?
ALy = 0.
16/27
Method of Undetermined Coefficients
ALy = 0,
17/27
Method of Undetermined Coefficients
ALy = 0,
is a higher order linear ODE !
What is a basis of solutions of
ALy = 0 ?
18/27
Method of Undetermined Coefficients
=⇒ 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
y 00 − 3y 0 − 4y = 3e 2x .
21/27
Example 1
Consider
(D 2 − 3D − 4)(c1 e −x + c2 e 4x + Ae 2x ) = (D 2 − 3D − 4)(Ae 2x ).
(D 2 − 3D − 4)yp = 3e 2x .
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
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 }.
24/27
Example 3
Substituting, we get:
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).
is a particular solution of
y 00 + py 0 + qy = r (x).
27/27