Differential Equations

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

Mathematics II Differential Equation 2nd year

Differential Equations

 First order differential equations of first degree

Definition: D. E. is an eq. that involves one or more derivative, or differential.


A differential equations of first order and first degree can always be but into form
𝑴𝒅𝒙 + 𝑵𝒅𝒚 = 𝟎 − − − − − − − − − (𝟏)
Where 𝑴 & 𝑵 represent functions of 𝑥 & 𝑦 . when these functions satisfy certain
conditions, the solution is relatively easy to find and can be written as
𝒇(𝒙, 𝒚) = 𝑪 − − − − − − − − − (𝟐)
The special types of first order, first degree equations we consider are designated
separable, homogeneous, linear and exact.

 Separable Equations:-
When M is a function of x alone and N is a function of Y alone then eq. (1) has the
form
𝑴(𝒙)𝒅𝒙 + 𝑵(𝒚)𝒅𝒚 = 𝟎 − − − − − − − − − − − −(𝟑)
This is the standard form of a first order separable equation, we can find its solution
by direct integration of each term, giving us

∫ 𝑴(𝒙)𝒅𝒙 + ∫ 𝑵(𝒚)𝒅𝒚 = 𝑪 − − − − − − − − − − − −(𝟒)

𝒅𝒚
Example:- solve the differential equations = (𝟏 + 𝒚𝟐 )𝒆𝒙
𝒅𝒙

Solution:- We rewrite the equation in differentiable form, groping all the (y) term
with dy and the (x) terms with dx,

Page 1
Mathematics II Differential Equation 2nd year

𝑑𝑦 𝑑𝑦
= 𝑒 𝑥 𝑑𝑥 𝑜𝑟 𝑒 𝑥 𝑑𝑥 − =0
1 + 𝑦2 1 + 𝑦2
Integration first part with respect to (x) and the second part with respect to (y) gives
the solution
𝑒 𝑥 − tan−1 (𝑦) = 𝐶 solve for (y)
𝑒 𝑥 − 𝑐 = tan−1 𝑦 → 𝑦 = tan(𝑒 𝑥 − 𝑐)

 Homogeneous Equation:-
Occasionally a differentiable equation whose variables cannot be separable can be
transformed by a change of variable into an equation whose variables can be
separated. That is the case with any equations that can be put into the form
𝒅𝒚 𝒚
= 𝑭 ( ) − − − − − − − − − − − − − (𝟓)
𝒅𝒙 𝒙
Such an equation is called homogeneous.
To transform Eq. (5) into an equation whose variables may be separable, we
introduce the new variable
𝒚
𝒗= − − − − − − − − − − − − − − − (6)
𝒙
𝑑𝑦 𝑑𝑣
Then, 𝑦 = 𝑣𝑥 , =𝑣+𝑥
𝑑𝑥 𝑑𝑥
𝒅𝒗
And Eq. (5), becomes 𝒗 + 𝒙 = 𝑭(𝒗) − − − − − − − − − − − − − (𝟕)
𝒅𝒙

Equation (7) can be solved by separation of variables


𝑣𝑑𝑥 + 𝑥𝑑𝑣 − 𝐹(𝑣)𝑑𝑥 = 0 𝑜𝑟 𝑑𝑥(𝑣 − 𝐹(𝑣)) + 𝑥𝑑𝑣 = 0
𝑑𝑥 𝑑𝑣
Or 𝑑𝑥(𝑣 − 𝐹(𝑣)) = −𝑥𝑑𝑣 → =−
𝑥 𝑣−𝐹(𝑣)

𝒅𝒙 𝒅𝒗
→ + = 𝟎 − − − − − −(𝟖)
𝒙 𝒗−𝑭(𝒗)

Page 2
Mathematics II Differential Equation 2nd year

Example:- Show that the equation (𝒙𝟐 + 𝒚𝟐 )𝒅𝒙 + 𝟐𝒙𝒚 𝒅𝒚 = 𝟎 is homogeneous


and solve it.
𝑦
𝑑𝑦 𝑥 2 +𝑦 2 1+( )2
2 2
Solution:- (𝑥 + 𝑦 )𝑑𝑥 = −2𝑥𝑦 𝑑𝑦 → =− =− 𝑥
𝑦
𝑑𝑥 2𝑥𝑦 2( )
𝑥

1+𝑣 2 𝑦
𝐹(𝑣) = − , where 𝑣 = ,
2𝑣 𝑥

then,
𝑑𝑥 𝑑𝑣 𝑑𝑥 2𝑣𝑑𝑣
+ 1+𝑣2
= 0, or + =0
𝑥 𝑣+ 𝑥 1+3𝑣 2
2𝑣

1
ln|𝑥| + ln(1 + 3𝑣 2 ) = 𝐶, 𝑡ℎ𝑎𝑡 3 ln|𝑥| + ln(1 + 3𝑣 2 ) = 3𝐶
3
ln|𝑥 3 | + ln(1 + 3𝑣 2 ) = 3𝐶, 𝑥 3 (1 + 3𝑣 2 ) = ∓𝑒 3𝑐 = 𝐶 ′
𝑦2
In the terms of y and x, the solution is 𝑥 3 (1 + 3 ) = 𝑥(𝑥 2 + 3𝑦 2 ) = 𝐶 ′
𝑥2

 Linear Equations:-
A Linear differential equation of first order can always be put into the standard form
𝒅𝒚
+ 𝒑𝒚 = 𝑸(𝒙) − − − − − − − − − − − − − −(𝟗)
𝒅𝒙

Where P & Q are function of (x)

𝝆 (𝒓𝒉𝒐) = 𝒆∫ 𝒑𝒅𝒙 , integrating factor, 𝝆𝒚 = ∫ 𝝆𝑸𝒅𝒙 + 𝒄

𝒅𝒚
Example:- Solve the differential equation + 𝒚 = 𝒆𝒙
𝒅𝒙

Solution:- 𝑝 = 1 & 𝑄 = 𝑒 𝑥
Integrating factor 𝜌 = 𝑒 ∫ 𝑝𝑑𝑥 = 𝑒 ∫ 𝑑𝑥 = 𝑒 𝑥
1
𝑒 𝑥 𝑦 = ∫ 𝑒 𝑥 𝑒 𝑥 𝑑𝑥 = ∫ 𝑒 2𝑥 𝑑𝑥 = 𝑒 2𝑥 + 𝑐
2

Page 3
Mathematics II Differential Equation 2nd year

1 𝑒 2𝑥 𝑐 1
𝑦= + → 𝑦 = 𝑒 𝑥 + 𝑐𝑒 −𝑥
2 𝑒𝑥 𝑒𝑥 2

𝒅𝒚
Example: Solve the equation 𝒙 − 𝟑𝒚 = 𝒙𝟐
𝒅𝒙
𝑑𝑦 3 3
Solution:- − 𝑦 = 𝑥, 𝑝 = − , 𝑄=𝑥
𝑑𝑥 𝑥 𝑥

−3 ∫
𝑑𝑥 1 1 1
𝜌= 𝑒 ∫ 𝑝𝑑𝑥 =𝑒 𝑥 = 𝑒 −3 ln 𝑥 = = ln 𝑥 3
=
𝑒 +3 ln 𝑥 𝑒 𝑥3
1 𝑥 1
𝑦 = ∫ 𝑑𝑥 = − +𝐶
𝑥3 𝑥3 𝑥
𝑦 = −𝑥 2 + 𝑐𝑥 3

 Exact Equations:-
An equation that can be written in the form
𝑴(𝒙, 𝒚)𝒅𝒙 + 𝑵(𝒙, 𝒚)𝒅𝒚 = 𝟎
𝜕𝑀 𝜕𝑁
And having the property that = is said to be exact.
𝜕𝑦 𝜕𝑥

𝑑𝑓 = 𝑀𝑑𝑥 + 𝑁𝑑𝑦 − − − − − (∗) 𝑑𝑓 = 0 𝑎𝑛𝑑 𝑓(𝑥, 𝑦) = 𝐶 where C is an


arbitrary constant.
To find a function 𝑓(𝑥, 𝑦) that satisfies Eq(∗) we require that
𝝏𝒇 𝝏𝒇
= 𝑴(𝒙, 𝒚), = 𝑵(𝒙, 𝒚)
𝝏𝒙 𝝏𝒚
Integrating the first of these with respect to (x) holding (y) constant, we get

𝒇(𝒙, 𝒚) = ∫𝒙 𝑴(𝒙, 𝒚)𝒅𝒙 + 𝒈(𝒚) − − − − − − − (∗)′

Where 𝑔(𝑦) represent an unknown function of (y) the plays the role of arbitrary
constant of integration. the integral ∫𝒙 𝑴(𝒙, 𝒚)𝒅𝒙

Page 4
Mathematics II Differential Equation 2nd year

Is an ordinary indefinite integral with respect to (x) with (y) hold constant. The f
𝜕𝑓
produced by (∗)′ satisfies the condition = 𝑀(𝑥, 𝑦)
𝜕𝑥

For any choice of the function 𝑔(𝑦), because 𝑔(𝑦) is constant under partial
differentiation with respect to (x).
𝜕𝑓
To satisfies the second condition = 𝑁(𝑥, 𝑦), we differentiate both side of (∗)′
𝜕𝑦
with respect to (y) and set the result equal to 𝑁(𝑥, 𝑦):-

𝝏𝒇 𝝏 𝝏𝒈(𝒚)
= ∫ 𝑴(𝒙, 𝒚)𝒅𝒙 + = 𝑵(𝒙, 𝒚). --------------------------------------(∗)′′
𝝏𝒚 𝝏𝒚 𝒙 𝝏𝒚

Becomes 𝑔(𝑦) is a function of (y) alone, we can write

𝒅𝒈 𝝏
𝒅𝒚
= 𝑵(𝒙, 𝒚)
𝝏𝒚 𝒙
∫ 𝑴(𝒙, 𝒚)𝒅𝒙. ---------------------------------------------------(∗)′′ ′

Then substitute this value of 𝑔(𝑦) in Eq.(∗)′ .We have the solution of the Equation.

Example:- Show that the equation (𝒙𝟐 + 𝒚𝟐 )𝒅𝒙 + (𝟐𝒙𝒚 + 𝐜𝐨𝐬 𝒚)𝒅𝒚 = 𝟎 , is
exact and solve it.
𝜕𝑀
Solution:- we have 𝑀(𝑥, 𝑦) = 𝑥 2 + 𝑦 2 , = 2𝑦 𝑁(𝑥, 𝑦) = 2𝑥𝑦 +
𝜕𝑦
𝜕𝑁
cos 𝑦, = 2𝑦
𝜕𝑥

So, the condition 𝜕𝑀⁄𝜕𝑦 = 𝜕𝑁⁄𝜕𝑥 is satisfied because 2𝑦 = 2𝑦. Next to find
𝑓(𝑥, 𝑦) such that
𝜕𝑓 𝜕𝑓
= 𝑥2 + 𝑦2 , = 2𝑥𝑦 + cos 𝑦
𝜕𝑥 𝜕𝑦
𝑥3
𝑓(𝑥, 𝑦) = + 𝑥𝑦 2 + 𝑔(𝑦)
3

Page 5
Mathematics II Differential Equation 2nd year

𝑑𝑔 𝑑𝑔
2𝑥𝑦 + = 2𝑥𝑦 + cos 𝑦, 𝑜𝑟 = cos 𝑦
𝑑𝑦 𝑑𝑦
𝑔(𝑦) = sin 𝑦
𝑥3
+ 𝑥𝑦 2 + sin 𝑦 = 𝐶
3
Remark:- in this example, the terms 𝒚𝟐 𝒅𝒙 & 𝟐𝒙𝒚 𝒅𝒚 can be combined as
followes:-
𝑦 2 𝑑𝑥 + 2𝑥𝑦 𝑑𝑦 = 𝑑(𝑥𝑦 2 )
𝑑(𝑢𝑣) = 𝑢𝑑𝑣 + 𝑣𝑑𝑢, the general pattern
With 𝑢 = 𝑦 2 , 𝑣=𝑥
𝑥3
Then the differential equation is the same as 𝑑 ( + 𝑥𝑦 2 + sin 𝑦) = 0, because
3

𝑥3
𝑑 ( ) = 𝑥 2 𝑑𝑥 , 𝑑(𝑥𝑦 2 ) = 𝑦 2 𝑑𝑥 + 2𝑥𝑦 𝑑𝑦, 𝑑(sin 𝑦) = cos 𝑦 𝑑𝑦
3

Example:- Solve the equation 𝒙𝒅𝒚 − 𝒚𝒅𝒙 = 𝒙𝒚𝟐 𝒅𝒙


𝑢 𝑣𝑑𝑢−𝑢𝑑𝑣 𝑢𝑑𝑣−𝑣𝑑𝑢
Solution:- the combination 𝑥𝑑𝑦 − 𝑦𝑑𝑥 , 𝑑( ) = = −( )
𝑣 𝑣2 𝑣2

𝑦𝑑𝑥 − 𝑥𝑑𝑦
𝑥𝑑𝑦 − 𝑦𝑑𝑥 = 𝑥𝑦 2 𝑑𝑥, = −𝑥𝑑𝑥,
𝑦2
𝑥 𝑥 𝑥 𝑥2
𝑑 ( ) = −𝑥𝑑𝑥, 𝑑 ( ) + 𝑥𝑑𝑥 = 0, + =𝐶
𝑦 𝑦 𝑦 2

 Second Order Equations Reducible to First Order:-


Certain type of Second Differential equation can be reduced to first order equation
by a suitable change of variables. These resulting first order equation. Can often be
solved by the techniques of the previous article. The general form of a second order
equation is

Page 6
Mathematics II Differential Equation 2nd year

𝒅𝒚 𝒅𝟐 𝒚
𝑭 (𝒙, 𝒚, , ) = 𝟎 − − − − − − − − − −(𝟏)
𝒅𝒙 𝒅𝒙𝟐

Two type of equations that can be reduced to first order by substitutions arise when
either the (x) or the (y) variable is missing.
Type 1:- Equations with dependent variable missing
When Eq.(1) has the special form
𝒅𝒚 𝒅𝟐 𝒚
𝑭 (𝒙, , ) = 𝟎 − − − − − − − − − −(𝟐)
𝒅𝒙 𝒅𝒙𝟐
We can reduce it to a first order equation by substituting
𝑑𝑦 𝑑 2 𝑦 𝑑𝑝
𝑝= , =
𝑑𝑥 𝑑𝑥 2 𝑑𝑥
𝑑𝑝
𝐹 (𝑥, 𝑝, ) = 0, 𝑝 = ∅(𝑥, 𝑐1 )
𝑑𝑥
𝑑𝑦
𝑦=∫ 𝑑𝑥 = ∫ 𝑝 𝑑𝑥 = ∫ ∅(𝑥, 𝑐) 𝑑𝑥 + 𝑐2
𝑑𝑥

𝒅𝟐 𝒚 𝒅𝒚
Example:- Find the general solution of the second order equation 𝒙 + = 𝒙𝟐
𝒅𝒙𝟐 𝒅𝒙

Solution:- the dependent variable (y) does not occur (except in the derivatives) and
the substitutions
𝑑𝑦 𝑑2𝑦 𝑑𝑝 𝑑𝑝
=𝑝, = , reduce the above equation to 𝑥 + 𝑝 = 𝑥2 *dx
𝑑𝑥 𝑑𝑥 2 𝑑𝑥 𝑑𝑥
𝑥3 𝑥3
→ 𝑥𝑑𝑝 + 𝑝𝑑𝑥 = 𝑥 2 𝑑𝑥 , 𝑜𝑟 𝑑(𝑥𝑝) = 𝑑 ( ), whose solution is 𝑥𝑝 = + 𝐶1 , we
3 3
𝑑𝑦
now replace 𝑝 by and divide by (x) to get
𝑑𝑥

𝑑𝑦 𝑥2 𝑐1
= + , Integrate
𝑑𝑥 3 𝑥

𝑥3
𝑦= + 𝐶1 ln|𝑥| + 𝐶2
9
𝑑𝑦
Initial values :- if 𝑦 = 0 & = 1, when x=1
𝑑𝑥

Page 7
Mathematics II Differential Equation 2nd year

𝑑𝑦 1 2
→( ) = 1 = + 𝐶1 , → 𝐶1 =
𝑑𝑥 3 3
1 2
(𝑦)𝑥=1 = 0 = + ln 1 + 𝐶2
9 3
1
𝐶2 = −
9
𝑥3 2 1
𝑦= + ln|𝑥| −
9 3 9

Type 2:- Equations with independent variables missing


When Eq. (1) does not contain (x) explicitly but has the form
𝒅𝒚 𝒅𝟐 𝒚
𝑭 (𝒚, , ) − − − − − − − (𝟑)
𝒅𝒙 𝒅𝒙𝟐

The substitutions to use are


𝑑𝑦 𝑑 2 𝑦 𝑑𝑝 𝑑𝑝 𝑑𝑦 𝑑𝑝
𝑝= 𝑎𝑛𝑑 = = ∗ = ∗𝑝
𝑑𝑥 𝑑𝑥 2 𝑑𝑥 𝑑𝑦 𝑑𝑥 𝑑𝑦
Then Eq. (3) takes the form
𝑑𝑝
𝐹 (𝑦, 𝑝, 𝑝 ∗ )=0
𝑑𝑦

𝑑2𝑦
Example:- Solve the equation +𝑦 =0
𝑑𝑥 2
𝑑𝑦 𝑑2𝑦 𝑑𝑝
Solution:- Let = 𝑝, =𝑝 , sub.
𝑑𝑥 𝑑𝑥 2 𝑑𝑦

𝑑𝑝 𝑝2 𝑦 2 ′
𝐶1′
→𝑝 + 𝑦 = 0 → 𝑝𝑑𝑝 + 𝑦𝑑𝑦 = 0 → + = 𝐶1 =
𝑑𝑦 2 2 2
𝑑𝑦 𝑑𝑦 𝑦
𝑝= = ∓√𝐶12 − 𝑦 2 → = ∓𝑑𝑥 , sin−1 = ∓(𝑥 + 𝐶2)
𝑑𝑥 √𝐶12 + 𝑦 2 𝐶1

𝑦 = 𝐶1 sin[∓(𝑥 + 𝐶2)] = ± sin(𝑥 + 𝐶2)

Page 8
Mathematics II Differential Equation 2nd year

Since C1 is arbitrary, there is no need for the ∓ sigh, we have 𝑦 = 𝐶1 sin(𝑥 + 𝐶2)
As the general solution

 Linear Second Order Equations:-


A third type of second order equation can sometimes be reduced to first order
equation. These are the second order linear equations which we can find one
solution possibly by guessing or by having it given to us. By second order linear we
mean an equation of the form
𝒚′′ + 𝒑(𝒙)𝒚′ + 𝑸(𝒙)𝒚 = 𝑭(𝒙)
If we can find any solution, say 𝑦 = 𝑢(𝑥), that satisfies the simplified equation
𝒖′′ + 𝒑(𝒙)𝒖′ + 𝑸(𝒙)𝒖 = 𝟎
Then the general solution of the corresponding equation
𝑦 ′′ + 𝑝(𝑥)𝑦 ′ + 𝑄(𝑥)𝑦 = 0, can sometimes be found by making the substitution
𝑦 = 𝑢𝑣, and solving for the function 𝒗 = 𝒗(𝒙).

Example:- Show that 𝒚 = 𝒆𝒙 is a solution of the equation 𝒚′′ − 𝟐𝒚′ + 𝒚 = 𝟎 and


use the result to find the general solution.
Solution:- If 𝑦 = 𝑒 𝑥 , then 𝑦 ′ = 𝑦 ′′ = 𝑒 𝑥 and 𝑦 ′′ − 2𝑦 ′ + 𝑦 = 𝑒 𝑥 −
2𝑒 𝑥 + 𝑒 𝑥 = 0
This shows that 𝑦 = 𝑒 𝑥 is one solution. We now substitute 𝑢 = 𝑒 𝑥 , 𝑦 = 𝑢𝑣 = 𝑒 𝑥 𝑣
& calculate the first and second derivative to get
𝑦′ = 𝑒 𝑥𝑣′ + 𝑒 𝑥𝑣 ,
𝑦 ′′ = 𝑒 𝑥 𝑣 ′′ + 𝑒 𝑥 𝑣 ′ + 𝑒 𝑥 𝑣 ′ + 𝑒 𝑥 𝑣 = 𝑒 𝑥 𝑣 ′′ + 2𝑒 𝑥 𝑣 ′ + 𝑒 𝑥 𝑣
Next we sub. Into the eq. 𝑦 ′′ − 2𝑦 ′ + 𝑦 = 0 , and get → 𝑒 𝑥 (𝑣 ′′ + 2𝑣 ′ + 𝑣 − 2𝑣 ′ −
2𝑣 + 𝑣) = 0
𝑑𝑣
→ 𝑣 ′′ = 0 → = 𝑐1 → 𝑣 = 𝑐1 𝑥 + 𝑐2 → 𝑦 = 𝑒 𝑥 𝑣(𝑐1 𝑥 + 𝑐2 )
𝑑𝑥

Page 9
Mathematics II Differential Equation 2nd year

 Linear Second Order Homogeneous Equations with Constant


Coefficients:-
An Equation of the form
𝒅𝒏 𝒚 𝒅𝒏−𝟏 𝒅𝒏−𝟐 𝒅𝒚
𝒏
+ 𝒂𝟏 𝒏−𝟏
+ 𝒂𝟐 + ⋯ + 𝒂𝒏−𝟏 + 𝒂𝒏 𝒚 = 𝑭(𝒙)
𝒅𝒙 𝒅𝒙 𝒅𝒙𝒏−𝟐 𝒅𝒙

Which is linear in (y) and its derivative, is called a Linear Equation of order (n)
Homogeneous → 𝒇(𝒙) = 𝟎
At this point, it is convenient to introduce the symbol (D) to represent the
operation of differentiation with respect to (x).

 The Characteristic Equation (auxiliary equation):-


The usual method of solving the following eq.
(𝐷2 + 2𝑎𝐷 + 𝑏) 𝑦 = 0 Is to begin by factoring the operator, thus
(𝐷2 + 2𝑎𝐷 + 𝑏) = (𝐷 − 𝑟1 )(𝐷 − 𝑟2 ) , now by finding two roots 𝑟1 & 𝑟2
𝑟 2 + 2𝑎𝑟 + 𝑏 = 0
Case 1 : If 𝑟1 ≠ 𝑟2 , then 𝑦 = 𝑐1 𝑒 𝑟1𝑥 + 𝑐2 𝑒 𝑟2𝑥
Case 2 : If 𝑟1 = 𝑟2 , then 𝑦 = (𝑐1 𝑥 + 𝑐2 )𝑒 𝑟2𝑥
Case 3 : If 𝑟1 = 𝛼 + 𝑖𝛽 , 𝑟2 = 𝛼 − 𝑖𝛽 , then
𝑦 = 𝑒 𝛼𝑥 (𝑐1 cos 𝛽𝑥 + 𝑐2 sin 𝛽𝑥)
Where 𝑐1 & 𝑐2 an arbitrary constant

𝒅𝟐 𝒚 𝒅𝒚
Example:- Solve the Differential equation + − 𝟐𝒚 = 𝟎
𝒅𝒙𝟐 𝒅𝒙

Solution:- the characteristic eq. 𝑟 2 + 𝑟 − 2 = 0 has roots 𝑟1 = 1, 𝑟2 = −2


(𝐷2 + 𝐷 − 2)𝑦 = 0 𝑜𝑟 (𝑟 2 + 𝑟 − 2) = 0
𝑦 = 𝑐1 𝑒 𝑥 + 𝑐2 𝑒 −2𝑥

Page 10
Mathematics II Differential Equation 2nd year

𝒅𝟐 𝒚 𝒅𝒚
Example:- Solve the D.E. +𝟒 + 𝟒𝒚 = 𝟎
𝒅𝒙𝟐 𝒅𝒙

Solution:- (𝐷2 + 4𝐷 + 4)𝑦 = 0 → (𝑟 2 + 4𝑟 + 4) = 0 → 𝑟1 = 𝑟2 = −2


𝑦 = (𝑐1 𝑥 + 𝑐2 )𝑒 −2𝑥

𝒅𝟐 𝒚 𝒅𝒚
Example:- Solve the D.E. +𝟐 + 𝟐𝒚 = 𝟎
𝒅𝒙𝟐 𝒅𝒙

Solution:- The characteristic eq. 𝑟 2 + 2𝑟 + 2 = 0


𝑟1 = −1 + 𝑖 , 𝑟2 = −1 − 𝑖 ,
𝛼 = −1 & 𝛽 = 1 → 𝑦 = 𝑒 −𝑥 (𝑐1 cos 𝑥 + 𝑐2 sin 𝑥)

𝒅𝟐 𝒚
Example:- Solve the D.E. + 𝒘𝟐 𝒚 = 𝟎
𝒅𝒙𝟐

Solution:- The characteristic eq. 𝑟 2 + 𝑤 2 = 0 has roots 𝑟 2 = −𝑤 2 → 𝑟 = ∓ 𝑖𝑤


𝑟1 = 𝑖𝑤 , 𝑟2 = −𝑖𝑤
Hence we take 𝛼 = 0 , 𝛽 = 𝑤
𝑦 = 𝑐1 cos 𝑤𝑥 + 𝑐2 sin 𝑤𝑥

 Linear Second Order Non homogeneous Equations with


Constant coefficients:-
𝒅𝟐 𝒚 𝒅𝒚
+ 𝟐𝒂 + 𝒃𝒚 = 𝑭(𝒙)
𝒅𝒙𝟐 𝒅𝒙
We first determine the general solution of the related homogeneous eq. obtained by
replacing 𝐹(𝑥) by Zero. We denoted this solution by
𝑦ℎ = 𝑐1 𝑢1 (𝑥) + 𝑐2 𝑢2 (𝑥), where 𝐶1 & 𝐶2 are arbitrary constant and 𝑢1 (𝑥), 𝑢2 (𝑥)
are function of one or more of the following forms:
𝑒 𝑟𝑥 , 𝑥 𝑒 𝑟𝑥 , 𝑒 𝛼𝑥 cos 𝛽𝑥 , 𝑒 𝛼𝑥 sin 𝛽𝑥
The general solution 𝑦 = 𝑦(𝑥) to the nonhomogeneous D.E. has the form

Page 11
Mathematics II Differential Equation 2nd year

𝒚 = 𝒚𝒉 (𝒙) + 𝒚𝒑 (𝒙)
Where 𝑦ℎ (𝑥) is the general solution of the homogeneous equation, and 𝑦𝑝 (𝑥) is any
particular solution of the nonhomogeneous Equation.

 The Method of Undetermined Coefficients:-


This method is to finding a particular solution 𝑦𝑝 to nonhomogeneous applies to
special cases for which 𝐹(𝑥) is a sum of terms of various polynomials 𝑝(𝑥)
multiplying an exponential with possibly sine or cosine factors. That is F(x) is a
sum of terms of the following forms:
𝒑(𝒙)𝒆𝒓𝒙 , 𝒑𝟐 (𝒙)𝒆𝜶𝒙 𝐜𝐨𝐬 𝜷𝒙 , 𝒑𝟑 (𝒙)𝒆𝜶𝒙 𝐬𝐢𝐧 𝜷𝒙 .

Example:- Solve the nonhomogeneous equation 𝒚′′ − 𝟐𝒚′ − 𝟑𝒚 = 𝟏 − 𝒙𝟐


Solution:- The auxiliary eq. for the homog. Eq. 𝑦 ′′ − 2𝑦 ′ − 3𝑦 = 0 is
𝑟 2 − 2𝑟 − 3 = 0 → (𝑟 + 1)(𝑟 − 3) = 0
𝑟1 = −1 , 𝑟2 = 3
𝑦ℎ = 𝑐1 𝑒 −𝑥 + 𝑐2 𝑒 3𝑥
Now, 𝐹(𝑥) = 1 − 𝑥 2 is polynomial of degree 2. So, 𝑦𝑝 = 𝐴𝑥 2 + 𝐵𝑥 + 𝑐
Now we need to find A & B & C
𝑦𝑝′ = 2𝐴𝑥 + 𝐵 , 𝑦𝑝′′ = 2𝐴
2𝐴 − 2(2𝐴𝑥 + 𝐵) − 3(𝐴𝑥 2 + 𝐵𝑥 + 𝐶) = 1 − 𝑥 2
2𝐴 − 4𝐴𝑥 − 2𝐵 − 3𝐴𝑥 2 − 3𝐵𝑥 − 3𝐶 = 1 − 𝑥 2
−3𝐴𝑥 2 + (−4𝐴 − 3𝐵)𝑥 + (2𝐴 − 2𝐵 − 3𝐶) = 1 − 𝑥 2
(−3𝐴 = −1) (−4𝐴 − 3𝐵 = 0) (2𝐴 − 2𝐵 − 3𝐶) = 1
1 4 5
𝐴= , 𝐵=− , 𝐶=
3 9 27

Page 12
Mathematics II Differential Equation 2nd year

1 4 5
𝑦𝑝 = 𝑥 2 − 𝑥 +
3 9 27
1 4 5
The general solution 𝑦 = 𝑦ℎ + 𝑦𝑝 = 𝐶1 𝑒 −𝑥 + 𝐶2 𝑒 3𝑥 + 𝑥 2 − 𝑥 +
3 9 27

Example:- Find the particular solution of 𝒚′′ − 𝒚′ = 𝟐 𝐬𝐢𝐧 𝒙


Solution:- 𝑦𝑝 = 𝐴 sin 𝑥 , 𝑦𝑝′ = 𝐴 cos 𝑥 , 𝑦𝑝′′ = −𝐴 sin 𝑥
−𝐴 sin 𝑥 − 𝐴 cos 𝑥 = 2 sin 𝑥
𝐴 = −2 𝑜𝑟 = 0 …
𝑇𝑤𝑜 𝑣𝑎𝑙𝑢𝑒𝑠 𝑎𝑡 𝑡ℎ𝑒 𝑠𝑎𝑚𝑒 𝑡𝑖𝑚𝑒, 𝑤𝑒 𝑐𝑎𝑙𝑐𝑢𝑙𝑎𝑡𝑒 𝑡ℎ𝑎𝑡 𝑡ℎ𝑒 𝑔𝑖𝑣𝑒𝑛 𝑒𝑞. ℎ𝑎𝑠 𝑛𝑜 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 𝑜𝑓 𝑡ℎ𝑒 𝑓𝑜𝑟𝑚
So, 𝑦𝑝 = 𝐴 sin 𝑥 + 𝐵 cos 𝑥
𝑦 ′ = 𝐴 cos 𝑥 − 𝐵 sin 𝑥 , 𝑦 ′′ = −𝐴 sin 𝑥 − 𝐵 cos 𝑥
−𝐴 sin 𝑥 − 𝐵 cos 𝑥 − 𝐴 cos 𝑥 + 𝐵 sin 𝑥 = 2 sin 𝑥
𝐴 = −1 , 𝐵 = 1
𝑦𝑝 = cos 𝑥 − sin 𝑥 Particular solution

Example:- Find a particular solution of 𝒚′′ − 𝟑𝒚′ + 𝟐𝒚 = 𝟓𝒆𝒙


Solution:- If we sub. 𝑦𝑝 = 𝐴𝑒 𝑥
And it's derv. In the D.E., we find that
𝐴𝑒 𝑥 − 3𝐴𝑒 𝑥 + 2𝐴𝑒 𝑥 = 5𝑒 𝑥 or 0 = 5𝑒 𝑥
However, the experimental function is never zero.
The trouble can be traced to the fact that 𝑦 = 𝑒 𝑥 is already a solution of the related
homogenous eq.
𝑦 ′′ − 3𝑦 ′ + 2𝑦 = 0
The auxiliary eq. is

Page 13
Mathematics II Differential Equation 2nd year

𝑟 2 − 3𝑟 + 2 = (𝑟 − 2)(𝑟 − 1) = 0
𝑦𝑝 = 𝐴𝑥𝑒 𝑥
𝑦𝑝′ = 𝐴𝑥𝑒 𝑥 + 𝐴𝑒 𝑥 , 𝑦𝑝′′ = 𝐴𝑥𝑒 𝑥 + 2𝐴𝑒 𝑥
(𝐴𝑥𝑒 𝑥 + 2𝐴𝑒 𝑥 ) − 3(𝐴𝑥𝑒 𝑥 + 𝐴𝑒 𝑥 ) + 2𝐴𝑥𝑒 𝑥 = 5𝑒 𝑥
−𝐴𝑒 𝑥 = 5𝑒 𝑥 → 𝐴 = −5
𝑦𝑝 = −5𝑥𝑒 𝑥

Example:- Find the general solution 𝒚′′ − 𝟔𝒚′ + 𝟗𝒚 = 𝒆𝟑𝒙


Solution:- The Auxiliary eq. 𝑟 2 − 6𝑟 + 9 = (𝑟 − 3)2 = 0
𝑦ℎ = (𝐶1 𝑥 + 𝐶2 )𝑒 3𝑥
𝑦𝑝 = 𝐴𝑥 2 𝑒 3𝑥
(9𝐴𝑥 2 𝑒 3𝑥 + 12𝐴𝑥𝑒 3𝑥 + 2𝐴𝑒 3𝑥 ) − 6(3𝐴𝑥 2 𝑒 3𝑥 + 2𝐴𝑥𝑒 3𝑥 ) + 9𝐴𝑥 2 𝑒 3𝑥 = 𝑒 3𝑥
1
2𝐴𝑒 3𝑥 = 𝑒 3𝑥 , 𝐴=
2
1
𝑦𝑝 = 𝑥 2 𝑒 3𝑥
2
1
𝑦 = (𝐶1 𝑥 + 𝐶2 )𝑒 3𝑥 + 𝑥 2 𝑒 3𝑥
2

Example:- Find the general solution to 𝒚′′ − 𝒚′ = 𝟓𝒆𝒙 − 𝐬𝐢𝐧 𝟐𝒙


Solution:- 𝑟 2 − 𝑟 = 0 , → 𝑟1 = 1 , 𝑟2 = 0
𝑦ℎ = 𝐶1 𝑒 𝑥 + 𝐶2
𝑦𝑝 = 𝐴𝑥𝑒 𝑥 + 𝐵 cos 2𝑥 + 𝐶 sin 2𝑥
𝑦𝑝′ = 𝐴𝑒 𝑥 + 𝐴𝑥𝑒 𝑥 − 2𝐵 sin 2𝑥 + 2𝐶 cos 2𝑥
𝑦𝑝′′ = 𝐴𝑒 𝑥 + 𝐴𝑒 𝑥 + 𝐴𝑥𝑒 𝑥 − 4𝐵 cos 2𝑥 − 4𝐶 sin 2𝑥
Sub. Into given D.E. = 0

Page 14
Mathematics II Differential Equation 2nd year

2𝐴𝑒 𝑥 + 𝐴𝑥𝑒 𝑥 − 4𝐵 cos 2𝑥 − 4 C sin 2𝑥 − 𝐴𝑒 𝑥 − 𝐴𝑥𝑒 𝑥 + 2𝐵 sin 2𝑥 − 2𝐶 cos 2𝑥


= 5𝑒 𝑥 − sin 2𝑥
𝐴𝑒 𝑥 − (4𝐵 + 2𝐶) cos 2𝑥 + (2𝐵 − 4𝐶) sin 2𝑥 = 5𝑒 𝑥 − sin 2𝑥
𝐶 1 1
𝐴=5, 𝐵 =− , 𝐶=
, 𝐵=−
2 5 10
1 1
𝑦𝑝 = 5𝑥𝑒 𝑥 − cos 2𝑥 + sin 2𝑥
10 5
The general solution 𝑦 = 𝑦ℎ + 𝑦𝑝
1 1
𝑦 = 𝐶1 𝑒 𝑥 + 𝐶2 + 5𝑥𝑒 𝑥 − cos 2𝑥 + sin 2𝑥
10 5

𝑭(𝒙) And If 𝒚𝒑
𝑒 𝑟𝑥 𝑟 𝑖𝑠 𝒏𝒐𝒕 𝑎 𝑟𝑜𝑜𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑐ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐 𝑒𝑞. 𝐴 𝑒 𝑟𝑥
𝑟 𝑖𝑠 𝑎 𝒔𝒊𝒏𝒈𝒍𝒆 𝑟𝑜𝑜𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑐ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐 𝑒𝑞. 𝐴 𝑥 𝑒 𝑟𝑥
𝑟 𝑖𝑠 𝑎 𝒅𝒐𝒖𝒃𝒍𝒆 𝑟𝑜𝑜𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑐ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐 𝑒𝑞. 𝐴 𝑥 2 𝑒 𝑟𝑥
sin 𝑘𝑥, cos 𝑘𝑥 𝒌 𝒊𝒔 𝒏𝒐𝒕 𝒂 𝒓𝒐𝒐𝒕 𝑜𝑓 𝑡ℎ𝑒 𝑐ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐 𝑒𝑞. 𝐵 cos 𝑘𝑥 + 𝐶 sin 𝑘𝑥
𝑎𝑥 2 + 𝑏𝑥 + 𝑐 0 𝑖𝑠 𝒏𝒐𝒕 𝑟𝑜𝑜𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑐ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐 𝑒𝑞. 𝐷𝑥 2 + 𝐸𝑥 + 𝐹
0 𝑖𝑠 𝑎 𝒔𝒊𝒏𝒈𝒍𝒆 𝑟𝑜𝑜𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑐ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐 𝑒𝑞. 𝐷𝑥 3 + 𝐸𝑥 2 + 𝐹𝑥
0 𝑖𝑠 𝑎 𝒅𝒐𝒖𝒃𝒍𝒆 𝑟𝑜𝑜𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑐ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐 𝑒𝑞. 𝐷𝑥 4 + 𝐸𝑥 3 + 𝐹𝑥 2

 The Method of Variation of Parameters:-


The Method consists of replacing the constant C1 & C2 in the homogeneous solution
by function 𝑣1 = 𝑣1 (𝑥) & 𝑣2 = 𝑣2 (𝑥) and requiring (in a way to explained) that the
resulting expression satisfies the nonhomogeneous eq.
𝒚 = 𝒗𝟏 𝒖𝟏 + 𝒗𝟐 𝒖𝟐
There are two functions 𝑣1 & 𝑣2 to be determined
𝑣1′ 𝑢1 + 𝑣2′ 𝑢2 = 0
𝑑𝑦
Then we have = 𝑣1 𝑢1′ + 𝑣2 𝑢2′ + 𝑣1′ 𝑢1 + 𝑣2′ 𝑢2 = 𝑣1 𝑢1′ + 𝑣2 𝑢2′
𝑑𝑥

Page 15
Mathematics II Differential Equation 2nd year

𝑑 2 𝑢1 𝑑𝑢1 𝑑 2 𝑢2 𝑑𝑢2
𝑣1 [ 2 + 2𝑎 + 𝑏𝑢1 ] + 𝑣2 [ 2 + 2𝑎 + 𝑏𝑢2 ] + 𝑣1′ 𝑢1′ + 𝑣2′ 𝑢2′ = 𝐹(𝑥)
𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑑𝑥
For the unknown functions 𝑣1′ + 𝑣2′ . Cramer’s rule gives
0 𝑢2
| |
𝐹(𝑥) 𝑢1′ −𝒖𝟐 𝑭(𝒙)
𝑣1′ = 𝑢1 𝑢2 =
| ′ | 𝑫
𝑢1 𝑢2′

𝑢1 0
| ′ |
𝑢1 𝐹(𝑥) 𝒖𝟏 𝑭(𝒙)
𝑣2′ = 𝑢1 𝑢2 =
| ′ | 𝑫
𝑢1 𝑢2′

𝒖𝟏 𝒖𝟐
𝑫 = |𝒖′ 𝒖′𝟐 | & 𝑣1 & 𝑣2 can be found by integration
𝟏

The Summary of the steps are as follows:


Step 1: Solve the associated homogeneous eq.
𝑑2𝑦 𝑑𝑦
+ 2𝑎 + 𝑏𝑦 = 0
𝑑𝑥 2 𝑑𝑥
To find the function's 𝑢1 & 𝑢2
Step 2: Calculate 𝐷, 𝑣 ′1 , 𝑣 ′ 2
Step 3: Integrate 𝑣 ′1 & 𝑣 ′ 2 to find 𝑣1 & 𝑣2
Step 4: Write down the general solution as
𝑦 = 𝑣1 𝑢1 + 𝑣2 𝑢2

𝒅𝟐 𝒚 𝒅𝒚
Example:- Solve the eq. +𝟐 − 𝟑𝒚 = 𝟔
𝒅𝒙𝟐 𝒅𝒙

Solution:- 𝑟 2 + 2𝑟 − 3 = 0 , 𝑟1 = −3 , 𝑟2 = 1
𝑢1 (𝑥) = 𝑒 −3𝑥 , 𝑢2 (𝑥) = 𝑒 𝑥
−3𝑥
𝐷 = | 𝑒 −3𝑥 𝑒 𝑥 | = 𝑒 −2𝑥 + 3𝑒 −2𝑥 = 4𝑒 −2𝑥
−3𝑒 𝑒𝑥
Page 16
Mathematics II Differential Equation 2nd year

−𝑢2 𝐹(𝑥) (−𝑒 𝑥 )(6) −3


𝑣1′ = = = 𝑒 3𝑥
𝐷 4𝑒 −2𝑥 2

𝑢1 𝐹(𝑥) 𝑒 −3𝑥 (6) 3 −𝑥


𝑣2′ = = = 𝑒
𝐷 4𝑒 −2𝑥 2
3 1
Hence 𝑣1 = ∫ − 𝑒 3𝑥 𝑑𝑥 = − 𝑒 3𝑥 + 𝑐1
2 2

3 −𝑥 3
𝑣2 = ∫ 𝑒 𝑑𝑥 = − 𝑒 −𝑥 + 𝑐2
2 2
1 3
𝑦 = 𝑣1 𝑢1 + 𝑣2 𝑢2 = (− 𝑒 3𝑥 + 𝑐1 ) 𝑒 −3𝑥 + (− 𝑒 −𝑥 + 𝑐2 )𝑒 𝑥 ,
2 2

𝑦𝑝 = −2 + 𝐶1 𝑒 −3𝑥 + 𝐶2 𝑒 𝑥
(Where (𝑦) reprecents the particular solution)

Example:- Find the general solution 𝒚′′ + 𝒚 = 𝐭𝐚𝐧 𝒙


Solution:- The solution of the homog. Eq. 𝑟 2 + 1 = 0 , 𝑟 2 = −1 → 𝑟 = ∓𝑖
𝑦ℎ = 𝐶1 cos 𝑥 + 𝐶2 sin 𝑥
𝑢1 (𝑥) = cos 𝑥 , 𝑢2 (𝑥) = sin 𝑥
𝑢1′ = − sin 𝑥 , 𝑢2′ = cos 𝑥

𝑢1 𝑢2 cos 𝑥 sin 𝑥
𝐷 = |𝑢 ′ ′| = |
𝑢2 | = cos 2 x − (−sin2 x) = 1
1 − sin 𝑥 cos 𝑥
−𝑢2 𝐹(𝑥) (− sin 𝑥) (tan 𝑥) sin2 x
𝑣1′ = = = − sin 𝑥 tan 𝑥 = −
𝐷 1 cos 𝑥
𝑢1 𝐹(𝑥) cos 𝑥 tan 𝑥
𝑣2′ = = = sin 𝑥
𝐷 1
sin2 x (1 − cos 2 x) 1 cos 2 x
𝑣1′ = ∫− 𝑑𝑥 = − ∫ 𝑑𝑥 = − ∫ ( − ) 𝑑𝑥
cos 𝑥 cos 𝑥 cos 𝑥 cos 𝑥

Page 17
Mathematics II Differential Equation 2nd year

= − ∫(sec 𝑥 − cos 𝑥)𝑑𝑥 = − ln|sec 𝑥 + tan 𝑥| + sin 𝑥

𝑣2′ = ∫ sin 𝑥 𝑑𝑥 = − cos 𝑥

𝑦 = 𝑢1 𝑣1 + 𝑢2 𝑣2 = [− ln|sec 𝑥 + tan 𝑥| + sin 𝑥] cos 𝑥 + (− cos 𝑥) sin 𝑥


= (− cos 𝑥) ln|sec 𝑥 + tan 𝑥|
The general solution is 𝑦 = 𝐶1 cos 𝑥 + 𝐶2 sin 𝑥 − (cos 𝑥) ln|sec 𝑥 + tan 𝑥|

Example:- Solve the nonhomogeneous Eq. 𝑦 ′′ + 𝑦 ′ − 2𝑦 = 𝑥𝑒 𝑥


Solution:- 𝑟 2 + 𝑟 − 2 = 0 → (𝑟 + 2)(𝑟 − 1) = 0
→ 𝑦ℎ = 𝐶1 𝑒 𝑥 + 𝐶2 𝑒 −2𝑥
→ 𝑢1 = 𝑒 𝑥 , 𝑢2 = 𝑒 −2𝑥 , 𝑢1′ = 𝑒 𝑥 , 𝑢2′ = −2𝑒 −2𝑥
𝑢1 𝑢2 𝑒𝑥 𝑒 −2𝑥 | = −2𝑒 −𝑥 − 𝑒 −𝑥 = −3𝑒 −𝑥
𝐷 = |𝑢 ′ ′| = | 𝑥
𝑢2
1 𝑒 −2𝑒 −2𝑥

−𝑢2 𝐹(𝑥) −𝑒 −2𝑥 (𝑥𝑒 𝑥 ) −𝑥𝑒 −𝑥 𝑥


𝑣1′ = = = =
𝐷 −3𝑒 −𝑥 −3𝑒 −𝑥 3
𝑢1 𝐹(𝑥) 𝑒 𝑥 (𝑥𝑒 𝑥 ) −𝑥𝑒 3𝑥
𝑣2′ = = =
𝐷 −3𝑒 −𝑥 3
𝑥 𝑥2
𝑣1 = ∫ 𝑑𝑥 =
3 6
𝑥 𝑒 3𝑥 1 𝑥𝑒 3𝑥 𝑒 3𝑥
𝑣2 = ∫ − 𝑑𝑥 = − ( −∫ 𝑑𝑥)
3 3 3 3
1 𝑥𝑒 3𝑥 𝑒 3𝑥
=− ( − )
3 3 9
𝑒 3𝑥 𝑥𝑒 3𝑥
=− +
9 27
𝑒 3𝑥
= (1 − 3𝑥)
27

Page 18
Mathematics II Differential Equation 2nd year

𝑥 2 𝑥 𝑒 3𝑥
𝑦𝑝 = 𝑒 + (1 − 3𝑥)𝑒 −2𝑥
6 27
𝑥 2 𝑒 𝑥 𝑒 𝑥 𝑥𝑒 𝑥
= + −
6 27 9
The general solution is
1 𝑥 1 𝑥 1 2 𝑥
𝑦 = 𝐶1 𝑒 𝑥 + 𝐶2 𝑒 −2𝑥 + 𝑒 − 𝑥𝑒 + 𝑥 𝑒
27 9 6
1 1
𝑦 = 𝐶1′ 𝑒 𝑥 + 𝐶2 𝑒 −2𝑥 − 𝑥𝑒 𝑥 + 𝑥 2 𝑒 𝑥
9 6

Page 19

You might also like