Differential Equations
Differential Equations
Differential Equations
Differential Equations
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 𝒗 + 𝒙 = 𝑭(𝒗) − − − − − − − − − − − − − (𝟕)
𝒅𝒙
𝒅𝒙 𝒅𝒗
→ + = 𝟎 − − − − − −(𝟖)
𝒙 𝒗−𝑭(𝒗)
Page 2
Mathematics II Differential Equation 2nd year
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
𝒅𝒚
+ 𝒑𝒚 = 𝑸(𝒙) − − − − − − − − − − − − − −(𝟗)
𝒅𝒙
𝒅𝒚
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.
𝜕𝑦 𝜕𝑥
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 𝑁(𝑥, 𝑦):-
𝝏𝒇 𝝏 𝝏𝒈(𝒚)
= ∫ 𝑴(𝒙, 𝒚)𝒅𝒙 + = 𝑵(𝒙, 𝒚). --------------------------------------(∗)′′
𝝏𝒚 𝝏𝒚 𝒙 𝝏𝒚
𝒅𝒈 𝝏
𝒅𝒚
= 𝑵(𝒙, 𝒚)
𝝏𝒚 𝒙
∫ 𝑴(𝒙, 𝒚)𝒅𝒙. ---------------------------------------------------(∗)′′ ′
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
𝑦𝑑𝑥 − 𝑥𝑑𝑦
𝑥𝑑𝑦 − 𝑦𝑑𝑥 = 𝑥𝑦 2 𝑑𝑥, = −𝑥𝑑𝑥,
𝑦2
𝑥 𝑥 𝑥 𝑥2
𝑑 ( ) = −𝑥𝑑𝑥, 𝑑 ( ) + 𝑥𝑑𝑥 = 0, + =𝐶
𝑦 𝑦 𝑦 2
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
𝑑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
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
Page 9
Mathematics II Differential Equation 2nd year
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).
𝒅𝟐 𝒚 𝒅𝒚
Example:- Solve the Differential equation + − 𝟐𝒚 = 𝟎
𝒅𝒙𝟐 𝒅𝒙
Page 10
Mathematics II Differential Equation 2nd year
𝒅𝟐 𝒚 𝒅𝒚
Example:- Solve the D.E. +𝟒 + 𝟒𝒚 = 𝟎
𝒅𝒙𝟐 𝒅𝒙
𝒅𝟐 𝒚 𝒅𝒚
Example:- Solve the D.E. +𝟐 + 𝟐𝒚 = 𝟎
𝒅𝒙𝟐 𝒅𝒙
𝒅𝟐 𝒚
Example:- Solve the D.E. + 𝒘𝟐 𝒚 = 𝟎
𝒅𝒙𝟐
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.
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
Page 13
Mathematics II Differential Equation 2nd year
𝑟 2 − 3𝑟 + 2 = (𝑟 − 2)(𝑟 − 1) = 0
𝑦𝑝 = 𝐴𝑥𝑒 𝑥
𝑦𝑝′ = 𝐴𝑥𝑒 𝑥 + 𝐴𝑒 𝑥 , 𝑦𝑝′′ = 𝐴𝑥𝑒 𝑥 + 2𝐴𝑒 𝑥
(𝐴𝑥𝑒 𝑥 + 2𝐴𝑒 𝑥 ) − 3(𝐴𝑥𝑒 𝑥 + 𝐴𝑒 𝑥 ) + 2𝐴𝑥𝑒 𝑥 = 5𝑒 𝑥
−𝐴𝑒 𝑥 = 5𝑒 𝑥 → 𝐴 = −5
𝑦𝑝 = −5𝑥𝑒 𝑥
Page 14
Mathematics II Differential Equation 2nd year
𝑭(𝒙) And If 𝒚𝒑
𝑒 𝑟𝑥 𝑟 𝑖𝑠 𝒏𝒐𝒕 𝑎 𝑟𝑜𝑜𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑐ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐 𝑒𝑞. 𝐴 𝑒 𝑟𝑥
𝑟 𝑖𝑠 𝑎 𝒔𝒊𝒏𝒈𝒍𝒆 𝑟𝑜𝑜𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑐ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐 𝑒𝑞. 𝐴 𝑥 𝑒 𝑟𝑥
𝑟 𝑖𝑠 𝑎 𝒅𝒐𝒖𝒃𝒍𝒆 𝑟𝑜𝑜𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑐ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐 𝑒𝑞. 𝐴 𝑥 2 𝑒 𝑟𝑥
sin 𝑘𝑥, cos 𝑘𝑥 𝒌 𝒊𝒔 𝒏𝒐𝒕 𝒂 𝒓𝒐𝒐𝒕 𝑜𝑓 𝑡ℎ𝑒 𝑐ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐 𝑒𝑞. 𝐵 cos 𝑘𝑥 + 𝐶 sin 𝑘𝑥
𝑎𝑥 2 + 𝑏𝑥 + 𝑐 0 𝑖𝑠 𝒏𝒐𝒕 𝑟𝑜𝑜𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑐ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐 𝑒𝑞. 𝐷𝑥 2 + 𝐸𝑥 + 𝐹
0 𝑖𝑠 𝑎 𝒔𝒊𝒏𝒈𝒍𝒆 𝑟𝑜𝑜𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑐ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐 𝑒𝑞. 𝐷𝑥 3 + 𝐸𝑥 2 + 𝐹𝑥
0 𝑖𝑠 𝑎 𝒅𝒐𝒖𝒃𝒍𝒆 𝑟𝑜𝑜𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑐ℎ𝑎𝑟𝑎𝑐𝑡𝑒𝑟𝑖𝑠𝑡𝑖𝑐 𝑒𝑞. 𝐷𝑥 4 + 𝐸𝑥 3 + 𝐹𝑥 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
𝟏
𝒅𝟐 𝒚 𝒅𝒚
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
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)
𝑢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
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