IM DE Chapter 4 Lect 18 VARIATION OF PARAMETERS Revised

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

LECTURE 18

VARIATION OF PARAMETERS

Consider the second-order differential equation

𝑎(𝑥)𝑦" + 𝑏(𝑥)𝑦′ + 𝑐(𝑥)𝑦 = 𝑓(𝑥) (∗)

the method of undetermined coefficients works only when the coefficients a, b, and c are
constants and the right‐hand term f(x) is of a special form. If these restrictions do not apply to
a given nonhomogeneous linear differential equation, then a more powerful method of
determining a particular solution is needed: the method known as variation of parameters.
The first step is to obtain the general solution of the corresponding homogeneous equation,
which will have the form
𝑦𝑐 = 𝐶1 𝑦1 + 𝐶2 𝑦2
where 𝑦1 and 𝑦2 are known functions.
The next step is to vary the parameters; that is, to replace the constants 𝐶1 and 𝐶2 by (as yet
unknown) functions 𝑣1 and 𝑣2 to obtain the form of a particular solution 𝑦 of the given
nonhomogeneous equation:
ȳ = 𝑣1 𝑦1 + 𝑣2 𝑦2

The goal is to determine these functions 𝑣1 and 𝑣2 . Then, since the functions 𝑦1 and 𝑦2 are
already known, the expression above for 𝑦 yields a particular solution of the nonhomogeneous
equation. Combining 𝑦 with 𝑦𝑐 then gives the general solution of the non‐homogeneous
differential equation.

Since there are two unknowns to be determined, 𝑣1 and 𝑣2 , two equations or conditions are
required to obtain a solution. One of these conditions will naturally be satisfying the given
differential equation. But another condition will be imposed first. Since 𝑦 will be substituted
into equation (∗), its derivatives must be evaluated. The first derivative of 𝑦 is

ȳ′ = 𝑣1 𝑦′1 + 𝑣′1 𝑦1 + 𝑣2 𝑦′2 + 𝑣′2 𝑦2

Now, to simplify the rest of the process—and to produce the first condition on 𝑣1 and 𝑣2 — set

𝑣′1 𝑦1 + 𝑣′2 𝑦2 = 0

This will always be the first condition in determining 𝑣1 and 𝑣2 ; the second condition will be
the satisfaction of the given differential equation (*).

ES208 – DIFFERENTIAL EQUATIONS


Engr. Dennis E. Ganas
Mechanical Engineering Department MECHANICAL ENGINEERING
For third-order differential equation,
𝑑3 𝑦 𝑑 2 𝑦 𝑑𝑦
+ + + 𝑏𝑦 = 𝑓(𝑥)
𝑑𝑥 3 𝑑𝑥 2 𝑑𝑥
If 𝑦𝑐 = 𝐶1 𝑦1 + 𝐶2 𝑦2 + 𝐶3 𝑦3 then set 𝑦𝑝 = 𝑣1 𝑦1 + 𝑣2 𝑦2 + 𝑣3 𝑦3 so that

𝑣1′ 𝑦1 + 𝑣2′ 𝑦2 + 𝑣3′ 𝑦3 = 0


𝑣1′ 𝑦1′ + 𝑣2′ 𝑦2′ + 𝑣3′ 𝑦3′ = 0
𝑣1′ 𝑦1′′ + 𝑣2′ 𝑦2′′ + 𝑣3′ 𝑦3′′ = 𝑓(𝑥)
Solve for the 𝑣1′ , 𝑣2′ and 𝑣3′ by integration. Then substitute the values to
𝑦𝑝 = 𝑣1 𝑦1 + 𝑣2 𝑦2 + 𝑣3 𝑦3

Finally, the general solution is 𝒚 = 𝑪𝟏 𝒚𝟏 + 𝑪𝟐 𝒚𝟐 + 𝑪𝟑 𝒚𝟑 + 𝒗𝟏 𝒚𝟏 + 𝒗𝟐 𝒚𝟐 + 𝒗𝟑 𝒚𝟑

EXAMPLES:
1. Solve the differential equation 𝑦" + 𝑦 = 𝑡𝑎𝑛𝑥.
Because the characteristic equation 𝑚2 + 1 = 0 has solutions 𝑚 = ±𝑖, the
homogeneous (or complementary) solution is
𝑦𝑐 = 𝐶1 𝑐𝑜𝑠𝑥 + 𝐶2 𝑠𝑖𝑛𝑥
Replacing 𝐶1 and 𝐶2 by 𝑣1 and 𝑣2 produces
𝑦𝑝 = 𝑣1 𝑐𝑜𝑠𝑥 + 𝑣2 𝑠𝑖𝑛𝑥

The resulting system of equation is


𝑣1′ 𝑐𝑜𝑠𝑥 + 𝑣2′ 𝑠𝑖𝑛𝑥 = 0 (1)
−𝑣1′ 𝑠𝑖𝑛𝑥 + 𝑣2′ 𝑐𝑜𝑠𝑥 = 𝑡𝑎𝑛𝑥 (2)
Multiplying the (1) by 𝑠𝑖𝑛𝑥 and (2) by 𝑐𝑜𝑠𝑥 then adding these two equations, we obtain
𝑣1′ 𝑠𝑖𝑛𝑥𝑐𝑜𝑠𝑥 + 𝑣2′ 𝑠𝑖𝑛2 𝑥 = 0
−𝑣1′ 𝑠𝑖𝑛𝑥𝑐𝑜𝑠𝑥 + 𝑣2′ 𝑐𝑜𝑠 2 𝑥 = 𝑠𝑖𝑛𝑥
𝑣2′ (𝑠𝑖𝑛2 𝑥 + 𝑐𝑜𝑠 2 𝑥) = 𝑠𝑖𝑛𝑥
𝑣2′ = 𝑠𝑖𝑛𝑥 (3)
From (1)
𝑣1′ 𝑐𝑜𝑠𝑥 + 𝑣2′ 𝑠𝑖𝑛𝑥 = 0 (1)

ES208 – DIFFERENTIAL EQUATIONS


Engr. Dennis E. Ganas
Mechanical Engineering Department MECHANICAL ENGINEERING
𝑣1′ 𝑐𝑜𝑠𝑥 + (𝑠𝑖𝑛𝑥)𝑠𝑖𝑛𝑥 = 0
𝑠𝑖𝑛2 𝑥
𝑣1′ = −
𝑐𝑜𝑠𝑥
𝑐𝑜𝑠 2 𝑥 − 1
=
𝑐𝑜𝑠𝑥
= 𝑐𝑜𝑠𝑥 − 𝑠𝑒𝑐𝑥 (4)
Integrating (4)
𝑣1 = ∫(𝑐𝑜𝑠𝑥 − 𝑠𝑒𝑐𝑥)𝑑𝑥
= 𝑠𝑖𝑛𝑥 − ln(𝑠𝑒𝑐𝑥 + 𝑡𝑎𝑛𝑥)
Integrating (3)
𝑣2 = ∫ 𝑠𝑖𝑛𝑥 𝑑𝑥
= −𝑐𝑜𝑠𝑥
So that
𝑦𝑝 = 𝑣1 𝑐𝑜𝑠𝑥 + 𝑣2 𝑠𝑖𝑛𝑥
= [𝑠𝑖𝑛𝑥 − ln(𝑠𝑒𝑐𝑥 + 𝑡𝑎𝑛𝑥)]𝑐𝑜𝑠𝑥 + [−𝑐𝑜𝑠𝑥 𝑠𝑖𝑛𝑥]
= 𝑠𝑖𝑛𝑥 𝑐𝑜𝑠𝑥 − 𝑐𝑜𝑠𝑥 ln(𝑠𝑒𝑐𝑥 + 𝑡𝑎𝑛𝑥) − 𝑠𝑖𝑛𝑥 𝑐𝑜𝑠𝑥
= −𝑐𝑜𝑠𝑥 ln(𝑠𝑒𝑐𝑥 + 𝑡𝑎𝑛𝑥)
Finally, the general solution is
𝒚 = 𝑪𝟏 𝒄𝒐𝒔𝒙 + 𝑪𝟐 𝒔𝒊𝒏𝒙 − 𝒄𝒐𝒔𝒙 𝐥𝐧(𝒔𝒆𝒄𝒙 + 𝒕𝒂𝒏𝒙)

2. Solve 𝑦 ′ − 5𝑦 = 𝑒 2𝑥 .
The complementary solution is 𝑦𝑐 = 𝐶1 𝑒 5𝑥 , so we assume 𝑦𝑝 = 𝑣1 𝑒 5𝑥 . Here 𝑦1 = 𝑒 5𝑥
and 𝑓(𝑥) = 𝑒 2𝑥 , and it follows that
𝑣1′ 𝑒 5𝑥 = 𝑒 2𝑥 or 𝑣1′ = 𝑒 −3𝑥
Integrating, we get

𝑣1 = ∫ 𝑒 −3𝑥 𝑑𝑥
1
𝑣1 = − 𝑒 −3𝑥
3
Therefore, the general solution is
𝟏
𝑦 = 𝑦𝑐 + 𝑦𝑝 = 𝑪𝟏 𝒆𝟓𝒙 − 𝒆−𝟑𝒙
𝟑

ES208 – DIFFERENTIAL EQUATIONS


Engr. Dennis E. Ganas
Mechanical Engineering Department MECHANICAL ENGINEERING
3. Solve 𝑦 ′ + 2𝑥𝑦 = 4𝑥.
The solution to the associated homogeneous equation (using solution for Linear
2
Equation) is found to be 𝑦𝑐 = 𝐶𝑒 −𝑥 , so we assume a particular solution of the form
2
𝑦𝑝 = 𝑣1 𝑒 −𝑥 .
2
Since 𝑦1 = 𝑒 −𝑥 and 𝑓(𝑥) = 4𝑥, it follows that
2
𝑣1′ 𝑒 −𝑥 = 4𝑥,
2
𝑣1′ = 4𝑥𝑒 𝑥 .
Integrating we get
𝑣1 = ∫ 𝑣1′ 𝑑𝑥,
2
= ∫ 4𝑥𝑒 𝑥 𝑑𝑥
2
= 2𝑒 𝑥
2 2 2
Since 𝑦𝑝 = 𝑣1 𝑒 −𝑥 then 𝑦𝑝 = 2𝑒 𝑥 (𝑒 −𝑥 ) = 2, and the general solution is
𝟐
𝒚 = 𝒚𝒄 + 𝒚𝒑 = 𝑪𝒆−𝒙 + 𝟐.

4. Solve 𝑦 ′′ − 7𝑦′ = −3𝑥.


The complementary solution is found to be 𝑦𝑐 = 𝐶1 + 𝐶2 𝑒 7𝑥 . We assume 𝑦𝑝 =
𝑣1 + 𝑣2 𝑒 7𝑥 . It follows that
𝑣1′ + 𝑣2′ 𝑒 7𝑥 = 0 (1)
𝑣1′ (0) + 𝑣2′ (7𝑒 7𝑥 ) = −3𝑥 (2)

Multiplying (1) by -7 then combining with (2) gives

− 7 𝑣1′ − 7𝑣2′ 𝑒 7𝑥 = 0 -7(1)


𝑣2′ (7𝑒 7𝑥 ) = −3𝑥
− 7 𝑣1′ = −3𝑥
𝟑
𝒗′𝟏 = 𝟕 𝒙
Therefore,
𝟑
𝒗′𝟐 = − 𝟕 𝒙𝒆−𝟕𝒙
Integrating both will produce

3 3
𝑣1 = ∫ 7 𝑥 𝑑𝑥 and 𝑣2 = ∫ − 7 𝑥 𝑒 −7𝑥 𝑑𝑥
3 3 3
= 14 𝑥 2 = 49 𝑥𝑒 −7𝑥 + 343 𝑒 −7𝑥

Thus,
3 2 3 3 −7𝑥 7𝑥
𝑦𝑝 = 𝑥 + ( 𝑥𝑒 −7𝑥 + 𝑒 )𝑒
14 49 343
3 2 3 3
𝑦𝑝 = 𝑥 + 𝑥+
14 49 343

ES208 – DIFFERENTIAL EQUATIONS


Engr. Dennis E. Ganas
Mechanical Engineering Department MECHANICAL ENGINEERING
The general solution is then
𝟑 𝟐 𝟑 𝟑
𝒚 = 𝑪𝟏 + 𝑪𝟐 𝒆𝟕𝒙 + 𝒙 + 𝒙++
𝟏𝟒 𝟒𝟗 𝟑𝟒𝟑

5. Solve 𝑦 ′′′ + 𝑦 ′ = 𝑠𝑒𝑐𝑥.


The complementary solution is found to be 𝑦𝑐 = 𝐶1 + 𝐶2 𝑐𝑜𝑠𝑥 + 𝐶3 𝑠𝑖𝑛𝑥 so we assume
a particular solution of the form 𝑦𝑝 = 𝑣1 + 𝑣2 𝑐𝑜𝑠𝑥 + 𝑣3 𝑠𝑖𝑛𝑥. Here 𝑦1 = 1, 𝑦2 =
𝑐𝑜𝑠𝑥, 𝑦3 = 𝑠𝑖𝑛𝑥 and 𝑓(𝑥) = 𝑠𝑒𝑐𝑥. Thus,
𝑣1′ + 𝑣2′ 𝑐𝑜𝑠𝑥 + 𝑣3′ 𝑠𝑖𝑛𝑥 = 0 (1)
𝑣1′ (0) − 𝑣2′ 𝑠𝑖𝑛𝑥 + 𝑣3′ 𝑐𝑜𝑠𝑥 = 0 (2)
𝑣1′ (0) − 𝑣2′ 𝑐𝑜𝑠𝑥 − 𝑣3′ 𝑠𝑖𝑛𝑥 = 𝑠𝑒𝑐𝑥 (3)
Combining (1) and (3) yields
𝑣1′ + 𝑣2′ 𝑐𝑜𝑠𝑥 + 𝑣3′ 𝑠𝑖𝑛𝑥 = 0 (1)
𝑣1′ (0) − 𝑣2′ 𝑐𝑜𝑠𝑥 − 𝑣3′ 𝑠𝑖𝑛𝑥 = 𝑠𝑒𝑐𝑥 (3)
𝑣1′ = 𝑠𝑒𝑐𝑥 (4)
Dividing (2) by 𝑐𝑜𝑠𝑥 gives
𝑣1′ (0)− 𝑣2′ 𝑠𝑖𝑛𝑥+𝑣3′ 𝑐𝑜𝑠𝑥 0
= 𝑐𝑜𝑠𝑥 (2/𝑐𝑜𝑠𝑥)
𝑐𝑜𝑠𝑥

−𝑣2 𝑡𝑎𝑛𝑥 + 𝑣3′ = 0
𝑣3′ = 𝑣2′ 𝑡𝑎𝑛𝑥 (5)
Substituting (5) to (2) and simplifying obtains
𝑣1′ (0) − 𝑣2′ 𝑠𝑖𝑛𝑥 + 𝑣3′ 𝑐𝑜𝑠𝑥 = 0 (2)
𝑣1′ (0) − 𝑣2′ 𝑠𝑖𝑛𝑥 + (𝑣2′ 𝑡𝑎𝑛𝑥)𝑐𝑜𝑠𝑥 = 0
𝑣2′ = −1 (6)
Substituting (6) to (5) thus yields
𝑣3′ = −𝑡𝑎𝑛𝑥 (7)
Integrating (4), (6) and (7) obtain

∫ 𝑣1′ = ∫ 𝑠𝑒𝑐𝑥 𝑑𝑥 (∫ 4)
𝑣1 = ln(𝑠𝑒𝑐𝑥 + 𝑡𝑎𝑛𝑥)

∫ 𝑣2′ = ∫ − 𝑑𝑥 (∫ 6)
𝑣2 = −𝑥
∫ 𝑣3′ = ∫ −𝑡𝑎𝑛𝑥 (∫ 7)
𝑣3 = ln(𝑐𝑜𝑠𝑥)
Finally, the general solution is
𝒚 = 𝑪𝟏 + 𝑪𝟐 𝒄𝒐𝒔𝒙 + 𝑪𝟑 𝒔𝒊𝒏𝒙 + 𝐥𝐧(𝒔𝒆𝒄𝒙 + 𝒕𝒂𝒏𝒙) − 𝒙𝒄𝒐𝒔𝒙 + 𝐥𝐧(𝒄𝒐𝒔𝒙)𝒔𝒊𝒏𝒙

ES208 – DIFFERENTIAL EQUATIONS


Engr. Dennis E. Ganas
Mechanical Engineering Department MECHANICAL ENGINEERING
SOLVING USING WRONSKIAN METHOD:
Consider the second order differential equation,

𝑎(𝑥)𝑦" + 𝑏(𝑥)𝑦′ + 𝑐(𝑥)𝑦 = 𝑓(𝑥) (Eq.1)

Assume that 𝑦1 and 𝑦2 are a fundamental set of solutions (homogeneous) for Equation 1. Then
a particular solution to the nonhomogeneous differential equation is,
𝑦2 𝑓(𝑥) 𝑦1 𝑓(𝑥)
𝑦𝑝 = −𝑦1 ∫ 𝑑𝑥 + 𝑦2 ∫ 𝑑𝑥
𝑊(𝑦1 , 𝑦2 ) 𝑊(𝑦1 , 𝑦2 )
where the Wronskian, 𝑊(𝑦1 , 𝑦2 ) 𝑜𝑟 𝑊 is,
𝑦1 𝑦2
𝑊(𝑦1 , 𝑦2 ) = |𝑦′ 𝑦′2 | = 𝑦1 𝑦′2 − 𝑦2 𝑦′1 (𝑊 ≠ 0)
1

Example 1. Solve 𝑦 ′′ + 𝑦 = 𝑡𝑎𝑛𝑥.


The complementary solution to this equation is 𝑦𝑐 = 𝐶1 𝑐𝑜𝑠𝑥 + 𝐶2 𝑠𝑖𝑛𝑥. Therefore,
𝑦1 = 𝑐𝑜𝑠𝑥 and 𝑦2 = 𝑠𝑖𝑛𝑥 and
𝑐𝑜𝑠𝑥 𝑠𝑖𝑛𝑥
𝑊=| | = 𝑐𝑜𝑠𝑥 𝑐𝑜𝑠𝑥 − (−𝑠𝑖𝑛𝑥)𝑠𝑖𝑛𝑥 = 𝑐𝑜𝑠 2 𝑥 + 𝑠𝑖𝑛2 𝑥 = 1
−𝑠𝑖𝑛𝑥 𝑐𝑜𝑠𝑥
Thus, the particular solution is
𝑠𝑖𝑛𝑥 𝑡𝑎𝑛𝑥 𝑐𝑜𝑠𝑥 𝑡𝑎𝑛𝑥
𝑦𝑝 = −𝑐𝑜𝑠𝑥 ∫ 1
𝑑𝑥 + 𝑠𝑖𝑛𝑥 ∫ 1
𝑑𝑥
= −𝑐𝑜𝑠𝑥[ln(𝑠𝑒𝑐𝑥 + 𝑡𝑎𝑛𝑥) − 𝑠𝑖𝑛𝑥] +[𝑠𝑖𝑛𝑥(−𝑐𝑜𝑠𝑥)]
= −𝑐o𝑠𝑥 ln(𝑠𝑒𝑐𝑥 + 𝑡𝑎𝑛𝑥)
Finally,
𝒚 = 𝑪𝟏 𝒄𝒐𝒔𝒙 + 𝑪𝟐 𝒔𝒊𝒏𝒙 −𝒄𝐨𝒔𝒙 𝐥𝐧(𝒔𝒆𝒄𝒙 + 𝒕𝒂𝒏𝒙)

2. Solve 𝑦 ′′ − 7𝑦′ = −3𝑥.


The complementary solution is found to be 𝑦𝑐 = 𝐶1 + 𝐶2 𝑒 7𝑥 . Therefore, 𝑦1 = 1 and
𝑦2 = 𝑒7𝑥 and the Wronskian
7𝑥
𝑊 = |1 𝑒 7𝑥 | = (1)(7𝑒7𝑥 ) − (𝑒7𝑥 )(0) = 7𝑒7𝑥
0 7𝑒
The particular solution is found to be
𝑒7𝑥 (−3𝑥) 1 (−3𝑥)
𝑦𝑝 = −1 ∫ 7𝑥
𝑑𝑥 + 𝑒7𝑥 ∫ 𝑑𝑥
7𝑒 7𝑒7𝑥
(−3𝑥) (−3𝑥)(𝑒−7𝑥 )
= −1 ∫ 𝑑𝑥 + 𝑒7𝑥 ∫ 𝑑𝑥
7 7
3 2 3 3
= 𝑥 + 𝑥+
14 49 343

The general solution is


𝟑 𝟑 𝟑
𝑦 = 𝑪𝟏 + 𝑪𝟐 𝒆𝟕𝒙 + 𝒙𝟐 + 𝒙+
𝟏𝟒 𝟒𝟗 𝟑𝟒𝟑

ES208 – DIFFERENTIAL EQUATIONS


Engr. Dennis E. Ganas
Mechanical Engineering Department MECHANICAL ENGINEERING
𝑒𝑥
3. Solve 𝑦 ′′ − 2𝑦 ′ + 𝑦 = 𝑥 2 +1.
The complementary solution for this differential equation is 𝑦𝑐 = 𝐶1 𝑒 𝑥 + 𝐶2 𝑥𝑒 𝑥 .
So, we have
𝑦1 = 𝑒𝑥 and 𝑦2 = 𝑥𝑒𝑥

The Wronskian of these two functions is


𝑊=| 𝑥
𝑒𝑥 𝑥𝑒𝑥 | = (𝑒𝑥 )(𝑒𝑥 + 𝑥𝑒𝑥 ) − (𝑥𝑒𝑥 )(𝑒𝑥 ) = 𝑒2𝑥
𝑒 𝑒𝑥 + 𝑥𝑒𝑥

The particular solution is then,


𝑒𝑥 𝑒𝑥
𝑥𝑒𝑥 ( 2 ) 𝑒𝑥 ( 2 )
𝑥
𝑦𝑝 = −𝑒 ∫
𝑥 + 1 𝑥
𝑑𝑥 + 𝑥𝑒 ∫
𝑥 + 1 𝑑𝑥
𝑒2𝑥 𝑒2𝑥
𝑥 1
𝑦𝑝 = −𝑒𝑥 ∫ 2 𝑑𝑥 + 𝑥𝑒𝑥 ∫ 2 𝑑𝑥
𝑥 +1 𝑥 +1
1
𝑦𝑝 = − 𝑒𝑥 ln(𝑥2 + 1) + 𝑥𝑒𝑥 tan−1 𝑥
2
The general solution is,
𝟏
𝒚 = 𝑪𝟏 𝒆𝒙 + 𝑪𝟐 𝒙𝒆𝒙 − 𝒆𝒙 𝐥𝐧(𝒙𝟐 + 𝟏) + 𝒙𝒆𝒙 𝐭𝐚𝐧−𝟏 𝒙
𝟐

EXERCISES 18.1
1. Solve 𝑦 ′ − 3𝑥 2 𝑦 = 12𝑥 2 .
2. Solve 2𝑦 ′ − 5𝑦 = 2𝑥 2 − 5.
𝑒𝑥
3. Solve 𝑦 ′′ − 2𝑦 ′ + 𝑦 = . (Use both methods)
𝑥

4. Solve 𝑦 ′′′ + 4𝑦 ′ = 4𝑐𝑜𝑡2𝑥.

ES208 – DIFFERENTIAL EQUATIONS


Engr. Dennis E. Ganas
Mechanical Engineering Department MECHANICAL ENGINEERING

You might also like