Lesson_9_First_Order_Differential_Equations
Lesson_9_First_Order_Differential_Equations
Learning Outcomes
As a result of studying this topic, students will be able to:
a) Describe how differential equations are formed.
b) Identify the order of a differential equation.
c) Form a differential equation by elimination of arbitrary constants.
d) Use direct integration method and method of separation of variables and to
solve a differential equation.
e) Use substitution method to solve a homogeneous differential equation.
Introduction
𝑑𝑦
𝑥2 + 𝑦𝑠𝑖𝑛𝑥 = 0
𝑑𝑥
𝑑2𝑦 𝑑𝑦
𝑥𝑦 2 + 𝑦 + 𝑒 3𝑥 = 0
𝑑𝑥 𝑑𝑥
𝑑𝑦
𝑥 − 𝑦2 = 0 ………………….. is an equation of 1𝑠𝑡 order.
𝑑𝑥
𝑑2 𝑦
𝑥𝑦 + 𝑦 2 sin 𝑥 = 0 ………………….. is an equation of 2𝑛𝑑 order.
𝑑𝑥 2
1
𝑑 3 𝑦 𝑑𝑦 𝑑𝑦
−𝑦 + 𝑒4𝑥 = 0 ………………….. is an equation of 3𝑟𝑑 order.
𝑑𝑥 3 𝑑𝑥 𝑑𝑥
𝑑𝑦
(𝑦 3 + 1) − 𝑥𝑦 2 = 𝑥 ………………….. is an equation of 1𝑠𝑡 order.
𝑑𝑥
Solved Examples
1) Consider 𝑦 = 𝐴𝑠𝑖𝑛 𝑥 + 𝐵 𝑐𝑜𝑠𝑥 where A and B are arbitrary constants. Form a
differential equation
Solution
If we differentiate, we get
𝑑𝑦
= 𝐴𝑐𝑜𝑠𝑥 − 𝐵𝑠𝑖𝑛𝑥
𝑑𝑥
𝑑2 𝑦
= −𝐴𝑠𝑖𝑛𝑥 − 𝐵𝑐𝑜𝑠𝑥 which is identical to the original equation, but with the
𝑑𝑥 2
sign changed i.e.
𝑑 2𝑦 𝑑 2𝑦
= −𝑦 => 2 + 𝑦 = 0
𝑑𝑥 2 𝑑𝑥
𝐴
2) Form a differential equation from the function y= 𝑥 + .
𝑥
Solution
𝑑𝑦 𝐴
If we differentiate, we get = 1− .
𝑑𝑥 𝑥2
2
Solution
There are 2 arbitrary constants so we differentiate 2 times.
𝑑𝑦
If we differentiate, we get = 2𝐴𝑥 + 𝐵. (1)
𝑑𝑥
𝑑 2𝑦 1 𝑑 2𝑦
= 2𝐴 => 𝐴 =
𝑑𝑥 2 2 𝑑𝑥 2
Substituting for 2A in (1):
𝑑𝑦 𝑑2 𝑦 𝑑𝑦 𝑑2 𝑦
=𝑥 +𝐵 => 𝐵 = −𝑥 . This is 1𝑠𝑡 order differential
𝑑𝑥 𝑑𝑥 2 𝑑𝑥 𝑑𝑥 2
equation.
Substituting for A and B in the original equation:
1 𝑑2 𝑦 𝑑𝑦 𝑑2 𝑦 𝑑𝑦 1 𝑑2 𝑦
𝑦 = 𝐴𝑥 2 + 𝐵𝑥 = 𝑥2 2
+ 𝑥 − 𝑥2 => 𝑦 = 𝑥 − 𝑥2
2 𝑑𝑥 𝑑𝑥 𝑑𝑥 2 𝑑𝑥 2 𝑑𝑥 2
41
Approximate ∫1 𝑑𝑥 using Trapezium rule, with n=6 i.e. using 6 strips.
𝑥
𝑑𝑦
4) Form a differential equation from the function = 𝐴𝑥𝑒 𝑥 .
𝑑𝑥
Solution
There is one arbitrary constants so we differentiate only one time.
𝑑𝑦 𝑦 1
If we differentiate, we get = 𝐴𝑥𝑒 𝑥 + 𝐴𝑒 𝑥 = 𝑦 + = 𝑦 (1 + )
𝑑𝑥 𝑥 𝑥
𝑑𝑦 1
− 𝑦 (1 + ) = 0 is the required differential equation. It is of first order.
𝑑𝑥 𝑥
3
is the required differential equation. It is of second order.
6) Form a differential equation from the function 𝑦 = 𝐴𝑥 2 + 𝐵𝑥 + 𝐶.
Solution
There are 3 arbitrary constants so we differentiate 3 times.
𝑑𝑦 𝑑2 𝑦 𝑑3 𝑦
If we differentiate, we get = 2𝐴𝑥 + 𝐵; = 2𝐴; = 0 is the
𝑑𝑥 𝑑𝑥 2 𝑑𝑥 3
required differential equation. It is of third order.
Exercise
1) Explain the order of differential equation.
2) What is meant by the first order of differential equation?
3) Form a differential equation from the following functions:
𝑒) x 3 − 3x 2y = 𝐶. f) 𝑦 = 𝐴 + 𝐵 𝑒 3x g) 𝑦𝑠𝑖𝑛𝑥 −
𝑥𝑦 2 = C
Answers
1) Order of a differential equation refers to the order of the highest derivative.
Experts also call it as differential coefficient that exists in the equation.
2) A first-order differential equation is one in which ƒ(x, y) happens to be a
function of two variables defined on a xy-plane’s region. The equation belongs
to the first order due to the fact that it involves only the first derivative 𝑑𝑦/𝑑𝑥.
𝑑2 𝑦 𝑑𝑦 𝑑𝑦 𝑑𝑦 𝑑2 𝑦
3) 𝑎) 2
−2 + 2𝑦 = 0; b) 𝑦 − 2𝑥 = 0; c) 3𝑦 + 4 − =0
𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑑𝑥 2
𝑑𝑦 𝑑 2𝑦 𝑑𝑦
𝑒) 𝑥 + 2𝑦 − 𝑥 = 0; f) − 3 = 0;
𝑑𝑥 𝑑𝑥 2 𝑑𝑥
4
𝑑𝑦
g) (sinx − 2x𝑦) + 𝑦𝑐𝑜𝑠𝑥 − 𝑦 2 = 0
𝑑𝑥
Solution
𝑑𝑦
= 3𝑥 2 − 6𝑥 + 5 => ∫ 𝑑𝑦 = ∫(3𝑥 2 − 6𝑥 + 5)𝑑𝑥
𝑑𝑥
𝑦 = 𝑥 3 − 3𝑥 2 + 5𝑥 + 𝐶
𝑑𝑦
2) Solve 𝑥 = 5𝑥 3 + 4 .
𝑑𝑥
Solution
𝑑𝑦 4 4 5
= 5𝑥 2 + => ∫ 𝑑𝑦 = ∫ (5𝑥 2 + ) 𝑑𝑥 = 𝑥 3 − 4In|𝑥| + 𝐶 .
𝑑𝑥 𝑥 𝑥 3
5
𝑑𝑦 4
= = 4𝑒 −𝑥 => ∫ 𝑑𝑦 = ∫ 4𝑒 −𝑥 𝑑𝑥 => 𝑦 = −4𝑒 −𝑥 + 𝐶 .
𝑑𝑥 𝑒𝑥
Examples
𝑑𝑦 2𝑥
1) Solve the differential equation = .
𝑑𝑥 𝑦+1
Solution
The equation can be rewritten as:
𝑦2
(𝑦 + 1)𝑑𝑦 = 2𝑥𝑑𝑥 => + 𝑦 = 𝑥2 + 𝐶
2
𝑦 = 𝑥 3 − 3𝑥 2 + 5𝑥 + 𝐶
𝑑𝑦
2) Solve the differential equation = (1 + 𝑥 )(1 + 𝑦).
𝑑𝑥
Solution
The equation can be rewritten as:
𝑑𝑦 𝑥2
= (1 + 𝑥 )𝑑𝑥 => In|1 + 𝑦| = 𝑥 + + 𝐶
(1 + 𝑦) 2
𝑑𝑦 1+𝑦
3) Solve the differential equation = .
𝑑𝑥 2+𝑥
Solution
6
The equation can be rewritten as:
𝑑𝑦 𝑑𝑥 𝑑𝑦 𝑑𝑥
= => ∫ =∫ => In(1 + 𝑦) = In(2 + 𝑥 ) + 𝐶
1+𝑦 2+𝑥 1+𝑦 2+𝑥
It is imperative to write C as a logarithm of some other constant, say, A. So
In(1 + 𝑦) = In(2 + 𝑥 ) + 𝐶
=> In(1 + 𝑦) = In(2 + 𝑥 ) + In𝐴 = In{A(2 + 𝑥 )}
=> (1 + 𝑦) = A(2 + 𝑥 )
𝑑𝑦 𝑦 2 +𝑥𝑦 2
4) Solve the differential equation = .
𝑑𝑥 𝑥 2 𝑦−𝑥2
Solution
The equation can be rewritten as:
𝑑𝑦 𝑦 2 (1 + 𝑥 ) 𝑦−1 1+𝑥
= 2 => ∫ 2 𝑑𝑦 = ∫ 2 𝑑𝑥
𝑑𝑥 𝑥 (𝑦 − 1) 𝑦 𝑥
1 1 1 1
=> ∫ ( − 2 ) 𝑑𝑦 = ∫ ( 2 + ) 𝑑𝑥
𝑦 𝑦 𝑥 𝑥
1 1 1 1
=> ∫ ( − 2 ) 𝑑𝑦 = ∫ ( 2 + ) 𝑑𝑥
𝑦 𝑦 𝑥 𝑥
1 1
=> In𝑦 + = In𝑥 − + 𝐶
𝑦 𝑥
𝑑𝑦 𝑦 2 −1
5) Solve the differential equation = .
𝑑𝑥 𝑥
Solution
The equation can be rewritten as:
𝑑𝑦 𝑦 2 − 1 1 1
= => ∫ 2 𝑑𝑦 = ∫ 𝑑𝑥
𝑑𝑥 𝑥 𝑦 −1 𝑥
1 1
=> ∫ (𝑦+1)(𝑦−1) 𝑑𝑦 = ∫ 𝑑𝑥 (1)
𝑥
𝐴 𝐵
+ =1 => 𝐴(𝑦 − 1) + 𝐵 (𝑦 + 1) = 1
(𝑦 + 1) (𝑦 − 1)
7
If 𝑦 = 1, 2𝐵 = 1 => 𝐵 = 1/2 .
If 𝑦 = −1, −2𝐴 = 1 => 𝐴 = −1/2 .
So (1) becomes:
−0.5 0.5 1
∫( + ) 𝑑𝑦 = ∫ 𝑑𝑥
𝑦 + 1 (𝑦 − 1) 𝑥
=> −0.5 In(𝑦 + 1) + 0.5In(𝑦 − 1) = Inx + InC
1 𝑦−1
=> In = In(Ax) => In(𝑦 − 1) = In{(Cx)2(𝑦 + 1)}
2 𝑦+1
=> 𝑦 = 𝐴x 2 (𝑦 + 1) +1
Exercise
Solve the differential equations:
𝑑𝑦 𝑥 2 + 1 𝑑𝑦 𝑑𝑦
𝑎) 𝑥𝑦 = ; b) 𝑥 = 𝑦 + 𝑥𝑦; 𝑐) 𝑦𝑡𝑎𝑛𝑥
𝑑𝑥 𝑦+1 𝑑𝑥 𝑑𝑥
= (4 + 𝑦 2 )𝑠𝑒𝑐 2𝑥
𝑑𝑦 𝑑𝑦 sin 𝑥 𝑑𝑦
𝑑) 𝑐𝑜𝑠 2𝑥 = 𝑦 + 3; e) = 𝑥𝑦 − 𝑦; 𝑓)
𝑑𝑥 𝑑𝑥 1 + 𝑦 𝑑𝑥
= cos 𝑥
Answers
𝑦3 𝑦2 𝑥2
𝑎) + = + In𝑥 + 𝐶; b) 𝑦 = 𝐴𝑥𝑒 𝑥 = 𝑥𝑦 − 𝑦; 𝑐) 𝑦 2
3 2 2
= 𝐴𝑡𝑎𝑛2 𝑥 − 4
𝑥2
𝑑) In(𝑦 + 3) = 𝑡𝑎𝑛𝑥 + 𝐶; e) In𝑦 = − 𝑥 + 𝐶; 𝑓) 𝑦
2
= 𝐴𝑠𝑖𝑛𝑥 − 1
8
𝑑𝑦 𝑥+3𝑦
Consider = . This cannot be solved by the method of separation of
𝑑𝑥 2𝑥
variables. In this case substitute 𝑦 = 𝑣𝑥.
Differentiating 𝑦 = 𝑣𝑥 w.r.t. x:
𝑑𝑦 𝑑𝑣 𝑑𝑣
= 𝑣. 1 + 𝑥 =𝑣+𝑥 .
𝑑𝑥 𝑑𝑥 𝑑𝑥
𝑥+3𝑦 𝑥+3𝑣𝑥 1+3𝑣
Also = = .
2𝑥 2𝑥 2
Examples
𝑑𝑦 𝑥 2 +𝑦 2
1) Solve the differential equation = .
𝑑𝑥 𝑥𝑦
Solution
All the terms on the RHS of the equation are of degree 2 and hence the equation
is homogeneous. So substitute 𝑦 = 𝑣𝑥.
𝑑𝑦 𝑑𝑣
=𝑣+𝑥 .
𝑑𝑥 𝑑𝑥
𝑥 2 + 𝑦 2 𝑥 2 + (𝑣𝑥 )2 1 + 𝑣 2
= =
𝑥𝑦 𝑥 (𝑣𝑥 ) 𝑣
The original equation now becomes:
𝑑𝑣 1 + 𝑣 2 𝑑𝑣 1 + 𝑣 2 1 + 𝑣2 − 𝑣2 1
𝑣+𝑥 = => 𝑥 = −𝑣 = =
𝑑𝑥 𝑣 𝑑𝑥 𝑣 𝑣 𝑣
𝑑𝑣 1 𝑑𝑥
=> 𝑥 = => ∫ 𝑣𝑑𝑣 = ∫
𝑑𝑥 𝑣 𝑥
𝑣2
=> = In𝑥 + 𝐶 (1).
2
9
1 𝑦 2
But 𝑦 = 𝑣𝑥 so (1) becomes: ( ) = In𝑥 + 𝐶
2 𝑥
𝑑𝑦 2𝑥𝑦+3𝑦 2
2) Solve the differential equation = .
𝑑𝑥 𝑥 2 +2𝑥𝑦
Solution
All the terms on the RHS of the equation are of degree 2 and hence the equation
is homogeneous. So substitute 𝑦 = 𝑣𝑥.
𝑑𝑦 𝑑𝑣
=𝑣+𝑥 .
𝑑𝑥 𝑑𝑥
𝑑𝑣 2𝑥 (𝑣𝑥 ) + 3(𝑣𝑥 )2
𝑣+𝑥 =
𝑑𝑥 𝑥 2 + 2𝑥 (𝑣𝑥 )
2𝑣 + 3𝑣 2
=
1 + 2𝑣
𝑑𝑣 2𝑣 + 3𝑣 2
𝑥 = −𝑣
𝑑𝑥 1 + 2𝑣
𝑑𝑣 𝑣+𝑣 2 1+2𝑣 1
=> 𝑥 = => ∫ 𝑑𝑣 = ∫ 𝑑𝑥
𝑑𝑥 1+2𝑣 𝑣+𝑣 2 𝑥
Solution
All the terms on the RHS of the equation are of degree 2 and hence the equation
is homogeneous. So substitute 𝑦 = 𝑣𝑥.
𝑑𝑦 𝑑𝑣
=𝑣+𝑥 .
𝑑𝑥 𝑑𝑥
𝑑𝑣 𝑥𝑦 𝑥2𝑣 𝑣 𝑑𝑣 2𝑣+3𝑣 2
𝑣+𝑥 = = = => 𝑣 + 𝑥 =
𝑑𝑥 𝑥 2 +2𝑥𝑦 𝑥 2 +𝑣 2 𝑥 2 1+𝑣 2 𝑑𝑥 1+2𝑣
10
𝑑𝑣 2𝑣 + 3𝑣 2 𝑣3
=> 𝑥 = −𝑣=−
𝑑𝑥 1 + 2𝑣 1 + 𝑣2
1 + 𝑣2 1
=> 𝑑𝑣 = − 𝑑𝑥
𝑣3 𝑥
1 1
=> ∫ (𝑣 −3 + ) 𝑑𝑣 = − ∫ 𝑑𝑥
𝑣 𝑥
𝑣 −2 1
=> + In𝑣 = −In𝑥 + In𝐶 => In𝑣 + In𝑥 + In𝐴 =
2 2𝑣 2
1
=> In(vxA) =
2𝑣 2
y 1 x 2
=> In ( xA) = ( )
𝑥 2 𝑦
1 x 2
=> In(yA) = ( )
2 𝑦
=> 2𝑦 2 In(yA) = 𝑥 2
Exercise
Solve the following differential equations:
𝑑𝑦 𝑑𝑦 𝑑𝑦
𝑎). (𝑥 − 𝑦) = 𝑥 + 𝑦; b). 2𝑥 2 = 𝑥2 + 𝑦2 𝑐). (𝑥 2 + 𝑥𝑦)
𝑑𝑥 𝑑𝑥 𝑑𝑥
= 𝑥𝑦 − 𝑦 2
𝑑𝑦 𝑥 2 +𝑦 2 𝑑𝑦 𝑦(𝑥−𝑦) 𝑑𝑦 𝑥−𝑦
𝑑). = ; e). = ; f). =
𝑑𝑥 𝑥𝑦 𝑑𝑥 𝑥2 𝑑𝑥 𝑥+𝑦
Answers
𝑦 2𝑥 𝑥
𝑎). 𝑡𝑎𝑛−1 = In [ 𝐴√𝑥 2 + 𝑦 2 ] ; b). = In𝑥 + 𝐶; 𝑐). 𝑥𝑦 = 𝐴 e𝑦
𝑥 𝑥−𝑦
𝑦 𝑥
𝑑). = √2In(𝐴𝑥 1/2); e). y = 𝑓). (𝑦 + 𝑥 )2 = 2 𝑥 2 + 𝐶
𝑥 In(A𝑥 )
11