You are on page 1of 12

ENGINEERING ANALYSIS

Faculty of Engineering
Petroleum Engineering

Fourth year
seven semesters
Engineering analysis Lecture 5

Bernoulli’s Equation
𝑑𝑦
The differential equation + 𝑝(𝑥)𝑦 = 𝑄(𝑥)𝑦 𝑛 ….. (1)
𝑑𝑥

where n is any real number, is called Bernoulli’s equation. Note that for 𝑛 = 0 and
𝑛 = 1, equation (1) is linear. For 𝑛 ≠ 0 and 𝑛 ≠ 1 the substitution 𝑢 = 𝑦1−𝑛
reduces any equation of form (1) to a linear equation.
Method of solution
1) if n=1
𝑑𝑦
= −(𝑝(𝑥) + 𝑄(𝑥)𝑦 is a separable differential equation.
𝑑𝑥

2) if n=0
𝑑𝑦
+ 𝑝(𝑥)𝑦 = 𝑄(𝑥) is a first order linear differential equation
𝑑𝑥

3) If 𝑛 ≠ 0 and 𝑛 ≠ 1,
multiplying eq(1) by 𝑦 −𝑛 , we get
𝑑𝑦
𝑦 −𝑛 + 𝑝(𝑥)𝑦 −𝑛+1 = 𝑄(𝑥) ……(2)
𝑑𝑥

Let 𝑢 = 𝑦 1−𝑛 …….(3)


1 𝑑𝑢 𝑑𝑦
So = 𝑦 −𝑛 .. …..(4)
1−𝑛 𝑑𝑥 𝑑𝑥

Sub. eq(3) and eq(4) into eq(2), we get


𝑑𝑢
+ (1 − 𝑛)𝑝(𝑥)𝑢 = (1 − 𝑛)𝑄(𝑥) is a first order linear differential equation.
𝑑𝑥

4) If we have
𝑑𝑦
𝑔′ (𝑦) + 𝑝(𝑥)𝑔(𝑦) = 𝑄(𝑥) …….(5)
𝑑𝑥

Let 𝑣 = 𝑔(𝑦) …….(6)


𝑑𝑣 𝑑𝑦
⇒ = 𝑔′ (𝑦) ……(7)
𝑑𝑥 𝑑𝑥

Sub. eq(7) and eq(6) into eq(5), we get


𝑑𝑣
+ 𝑝(𝑥)𝑣 = 𝑄(𝑥) is a first order linear differential equation.
𝑑𝑥

26
Engineering analysis Lecture 5

Example: Solve 𝑥𝑦 ′ + 𝑦(1 + 𝑥) = −𝑥𝑦 5 𝑦(1) = 1


Solution:
(1+𝑥)
𝑦′ + 𝑦 = −𝑥𝑦 5 is Bernoulli equation
𝑥
(1+𝑥)
𝑦 −5 𝑦 ′ + 𝑦 −4 = −1 ……(1)
𝑥

Let 𝑢 = 𝑦 −4 …….(2)
1 𝑑𝑢 𝑑𝑦
So = 𝑦 −5 .. …..(3)
−4 𝑑𝑥 𝑑𝑥

Sub. eq(2) and eq(3) into eq(1), we get


𝑑𝑢 (1+𝑥)
−4 𝑢 = 4 is a first order linear differential equation
𝑑𝑥 𝑥
(1+𝑥)
𝑝(𝑥) = −4 𝑄(𝑥) = 4
𝑥
1 −4 )−4𝑥)
𝐼(𝑥) = 𝑒 ∫ 𝑝(𝑥)𝑑𝑥 = 𝑒 −4 ∫(𝑥+1)𝑑𝑥 = 𝑒 −4(ln(𝑥)+𝑥) = 𝑒 (ln(𝑥 = 𝑥 −4 𝑒 −4𝑥
1
𝑣= [∫ 𝐼(𝑥)𝑄(𝑥) dx]
𝐼(𝑥)
1
𝑣= [∫ 𝑥 −4 𝑒 −4𝑥 ∗ 4 dx]
𝑥 −4 𝑒 −4𝑥
[4 ∫ 𝑥 −4 𝑒 −4𝑥 dx+𝑐]
𝑣= .
𝑥 −4 𝑒 −4𝑥
[4 ∫ 𝑥 −4 𝑒 −4𝑥 dx+𝑐]
𝑦 −4 = .
𝑥 −4 𝑒 −4𝑥
𝑥 −4 𝑒 −4𝑥
𝑦 4 = [4 .
∫ 𝑥 −4 𝑒 −4𝑥 dx+𝑐]

27
Engineering analysis Lecture 5

𝑑𝑦
Example: Solve + 𝑥𝑠𝑖𝑛(2𝑦) = 𝑥 3 𝑐𝑜𝑠 2 (𝑦)
𝑑𝑥

Solution:
1 𝑑𝑦 2𝑠𝑖𝑛(𝑦)cos (𝑦)
+𝑥 = 𝑥3
𝑐𝑜𝑠 2 (𝑦) 𝑑𝑥 𝑐𝑜𝑠 2 (𝑦)
𝑑𝑦
𝑠𝑒𝑐 2 (𝑦) + 2𝑥𝑡𝑎𝑛(𝑦) = 𝑥 3 …….(1)
𝑑𝑥

Let 𝑣 = 𝑡𝑎𝑛(𝑦) …….(2)


𝑑𝑣 𝑑𝑦
So = 𝑠𝑒𝑐 2 (𝑦) .. …..(3)
𝑑𝑥 𝑑𝑥

Sub. eq(2) and eq(3) into eq(1), we get


𝑑𝑣
+ 2𝑥𝑣 = 𝑥 3
𝑑𝑥

𝑝(𝑥) = 2𝑥 𝑄(𝑥) = 𝑥 3
2
𝐼(𝑥) = 𝑒 ∫ 𝑝(𝑥)𝑑𝑥 = 𝑒 2 ∫ 𝑥𝑑𝑥 = 𝑒 𝑥
1
𝑣= [∫ 𝐼(𝑥)𝑄(𝑥) dx]
𝐼(𝑥)
1 2 1 1 2 1 1 2 2
𝑣= 2 [∫ 𝑥 3 𝑒 𝑥 dx] = 2 [ ∫ 𝑥 2 𝑒 𝑥 2x dx] = 𝑥2 [ (𝑥 2 𝑒 𝑥 − ∫ 𝑥𝑒 𝑥 dx) ]
𝑒𝑥 𝑒𝑥 2 𝑒 2
1 1 2 1 2 1 1 2 2
= 2 [ (𝑥 2 𝑒 𝑥 − 𝑒 𝑥 ) + 𝑐] = 𝑥 2 − 𝑒 𝑥 + 𝑐𝑒 −𝑥
𝑒𝑥 2 2 2 4
1 1 2 2
𝑣 = 𝑥 2 − 𝑒 𝑥 + 𝑐𝑒 −𝑥 = tan (𝑦)
2 4

28
Engineering analysis Lecture 5

Differential Equation of First order and Higher degree

Higher-degree first-order equations

The general form of differential equation of first order and higher degree is:

𝑑𝑦 𝑛 𝑑𝑦 𝑛−1 𝑑𝑦 𝑛−2 𝑑𝑦 2 𝑑𝑦
(𝑑𝑥 ) + 𝑎0 (𝑑𝑥 ) + 𝑎1 ( )
𝑑𝑥
+ ⋯ + 𝑎𝑛−2 ( ) + 𝑎𝑛−1 + 𝑎𝑛 = 0
𝑑𝑥 𝑑𝑥

𝑑𝑦
Where each 𝑎𝑖 is a function of 𝑥 and 𝑦. If = 𝑝 , then the general form reduces to
𝑑𝑥

(𝑝)𝑛 + 𝑎0 (𝑝)𝑛−1 + 𝑎1 (𝑝)𝑛−2 + ⋯ + 𝑎𝑛−2 (𝑝)2 + 𝑎𝑛−1 𝑝 + 𝑎𝑛 = 0 ……..(1)

Hence it also can be written as 𝐹(𝑥, 𝑦, 𝑝) = 0.

For this equation, we have three cases:

1) Differential equations which are solvable for p.

When the left-hand side of eq. (1) can be resolved into rational factors of the first
degree, then it can take the form

(𝑝 − 𝐴1 )(𝑝 − 𝐴2 )(𝑝 − 𝐴3 ) … (𝑝 − 𝐴𝑛 ) = 0

for some 𝐴1 , 𝐴2 , . . . . . , 𝐴𝑛 , which are functions of 𝑥 and 𝑦.

Now comparing each factor with zero, we get (𝑝 − 𝐴1 ) = 0, where 𝑖 = 1, 2, . . . , 𝑛.


Those, we get n equations of first order and first degree. Using the methods given in
chapter two we can now obtain the solution of n equations of first order and first degree.
Suppose solution of (𝑝 − 𝐴1 ) = 0 is given by 𝜑𝑖 (𝑥, 𝑦, 𝑐 ) = 0. Then general solution
of equation (1) is given by the product 𝜑1 (𝑥, 𝑦, 𝑐 )𝜑2 (𝑥, 𝑦, 𝑐 ) … 𝜑𝑛 (𝑥, 𝑦, 𝑐 ) = 0.
𝑑𝑦 𝑑𝑦
Example: solve ( + 𝑦) = 𝑥(𝑥 + 𝑦)
𝑑𝑥 𝑑𝑥

Solution:
𝑑𝑦
Let = 𝑝,
𝑑𝑥

⇒ 𝑝(𝑝 + 𝑦) = 𝑥(𝑥 + 𝑦)

29
Engineering analysis Lecture 5

𝑝2 + 𝑦𝑝 − 𝑥 2 − 𝑥𝑦 = 0

𝑦(𝑝 − 𝑥) + (𝑝 − 𝑥)(𝑝 + 𝑥) = 0

(𝑝 − 𝑥)(𝑦 + 𝑝 + 𝑥) = 0

𝑝−𝑥 =0
𝑑𝑦
−𝑥 =0
𝑑𝑥

∫ 𝑑𝑦 = ∫ 𝑥𝑑𝑥
𝑥2
𝑦− + 𝑐 = 0 = 𝜑1 (𝑥, 𝑦, 𝑐)
2

Or

𝑝+𝑥+𝑦 =0

𝑑𝑦 + (𝑥 + 𝑦)𝑑𝑥 = 0
𝜕𝑁
𝑁(𝑥, 𝑦) = 1 ⇒ =0
𝜕𝑥

𝜕𝑀
𝑀(𝑥, 𝑦) = 𝑥 + 𝑦 ⇒ =1
𝜕𝑦

𝜕𝑀(𝑥,𝑦) 𝜕𝑁(𝑥,𝑦)

𝜕𝑦 𝜕𝑥

∴ the equation is not exact

𝜕𝑀 𝜕𝑁
− =1
𝜕𝑦 𝜕𝑥

1 𝜕𝑀 𝜕𝑁
𝑔(𝑥) = ( − ) = 1
𝑁 𝜕𝑦 𝜕𝑥

𝜇 = 𝑒 ∫ 𝑔(𝑥)𝑑𝑥 = 𝑒 ∫ 𝑑𝑥 = 𝑒 𝑥

𝑒 𝑥 𝑑𝑦 + 𝑒 𝑥 (𝑥 + 𝑦)𝑑𝑥 = 0

𝜕𝑁
𝑁(𝑥, 𝑦) = 𝑒 𝑥 ⇒ = 𝑒𝑥
𝜕𝑥

30
Engineering analysis Lecture 5

𝜕𝑀
𝑀(𝑥, 𝑦) = 𝑒 𝑥 (𝑥 + 𝑦 ) ⇒ = 𝑒𝑥
𝜕𝑦

𝜕𝑀(𝑥,𝑦) 𝜕𝑁(𝑥,𝑦)
=
𝜕𝑦 𝜕𝑥

∴ the equation is exact

𝜕𝑢
= 𝑁(𝑥, 𝑦)
𝜕𝑦

∫ 𝑑𝑢 = ∫ 𝑒 𝑥 𝑑𝑦
𝑢(𝑥, 𝑦) = 𝑒 𝑥 𝑦 + ℎ(𝑥). . . . . . . . . (∗)
𝜕𝑢
= 𝑒 𝑥 𝑦 + ℎ′ (𝑥) = 𝑀(𝑥, 𝑦)
𝜕𝑥

𝑒 𝑥 𝑦 + ℎ′ (𝑥) = 𝑒 𝑥 𝑦 + 𝑒 𝑥 𝑥

∫ ℎ′ (𝑦) = ∫ 𝑒 𝑥 𝑥
ℎ(𝑦) = 𝑒 𝑥 𝑥 − 𝑒 𝑥

Sub h(y) in eq (*), we get

𝑢(𝑥, 𝑦) = 𝑒 𝑥 𝑦 + 𝑒 𝑥 𝑥 − 𝑒 𝑥 = −𝑐

𝑒 𝑥 𝑦 + 𝑒 𝑥 𝑥 − 𝑒 𝑥 + 𝑐 = 𝜑2 (𝑥, 𝑦, 𝑐)

The general solution is


𝑥2
𝜑1 (𝑥, 𝑦, 𝑐)𝜑2 (𝑥, 𝑦, 𝑐) = (𝑒 𝑥 𝑦 + 𝑒 𝑥 𝑥 − 𝑒 𝑥 + 𝑐) (𝑦 − + 𝑐) = 0
2

Example: Solve the following differential equations:

1) 𝑦 2 𝑝2 − 3𝑥𝑦𝑝 + 2𝑥 2 = 0
Solution:
(𝑦𝑝 − 2𝑥)(𝑦𝑝 − 𝑥) = 0
𝑦𝑝 − 2𝑥 = 0 or 𝑦𝑝 − 𝑥 = 0
𝑑𝑦 𝑑𝑦
𝑦 − 2𝑥 = 0 𝑦 −𝑥 =0
𝑑𝑥 𝑑𝑥

𝑦𝑑𝑦 − 2𝑥𝑑𝑥 = 0 𝑦𝑑𝑦 − 𝑥𝑑𝑥 = 0

31
Engineering analysis Lecture 5

∫ 𝑦𝑑𝑦 − 2 ∫ 𝑥𝑑𝑥 = 0 ∫ 𝑦𝑑𝑦 − ∫ 𝑥𝑑𝑥 = 0


𝑦2 𝑦2 𝑥2
− 𝑥2 = 𝑐 − =𝑐
2 2 2
𝑦2 𝑦2 𝑥2
− 𝑥2 − 𝑐 = 0 − −𝑐 =0
2 2 2

∴The general solution is


𝑦2 𝑦2 𝑥2
𝜑1 (𝑥, 𝑦, 𝑐)𝜑2 (𝑥, 𝑦, 𝑐) = ( − 𝑥 2 − 𝑐) ( − − 𝑐) = 0
2 2 2

2) Differential equations which are solvable for y.

If the differential equation of the form 𝑓(𝑥, 𝑦, 𝑝) = 0 can be written as


𝑦 = 𝑓 (𝑥, 𝑝) …….(1)
Then it is said to be solvable for y . In order to solve these types of differential equation
we differentiate with respect to x we get

𝑑𝑦 𝜕𝑓 𝜕𝑓 𝑑𝑝 𝑑𝑝
=𝑝= + = 𝐹 (𝑥, 𝑝, )
𝑑𝑥 𝜕𝑥 𝜕𝑝 𝑑𝑥 𝑑𝑥

This differential equation is relation between x and p and can be solved by previous
way, we get the value of p and subs in eq(1) to get the general solution.

𝑑𝑦 2 𝑑𝑦
Example: solve 𝑥 ( ) − 2𝑦 + 𝑥 = 0
𝑑𝑥 𝑑𝑥

Solution:
𝑑𝑦
Let =𝑝
𝑑𝑥

𝑥𝑝2 − 2𝑦𝑝 + 𝑥 = 0
2𝑦𝑝 = 𝑥𝑝2 + 𝑥
1 1
𝑦 = 𝑥𝑝 + 𝑥𝑝−1 ……(1)
2 2

Differentiating eq(1) w.r. to x, we get


𝑑𝑦 1 𝑑𝑝 1 𝑑𝑝
= (𝑝 + 𝑥 ) + (𝑝−1 − 𝑥𝑝−2 )
𝑑𝑥 2 𝑑𝑥 2 𝑑𝑥
1 𝑑𝑝 1 𝑑𝑝
𝑝 = (𝑝 + 𝑥 ) + (𝑝−1 − 𝑥𝑝−2 )
2 𝑑𝑥 2 𝑑𝑥

32
Engineering analysis Lecture 5

𝑑𝑝 𝑑𝑝
𝑝+𝑥 + 𝑝−1 − 𝑥𝑝−2 − 2𝑝 = 0
𝑑𝑥 𝑑𝑥
𝑑𝑝 𝑑𝑝
𝑥 + 𝑝−1 − 𝑥𝑝−2 −𝑝 =0 *𝑝2
𝑑𝑥 𝑑𝑥
𝑑𝑝 𝑑𝑝
𝑥𝑝2 +𝑝−𝑥 − 𝑝3 = 0
𝑑𝑥 𝑑𝑥
𝑑𝑝
𝑥 (𝑝2 − 1) − 𝑝(𝑝2 − 1) = 0
𝑑𝑥
𝑑𝑝
(𝑥 𝑑𝑥 − 𝑝) (𝑝2 − 1) = 0

𝑝2 − 1 = 0 or
𝑝 = ±1
Sub the value of p in eq(1), we get
1 1
𝑦=± 𝑥± 𝑥 is singular solution
2 2
𝑑𝑝
Or 𝑥 −𝑝 =0
𝑑𝑥
1 1
𝑑𝑝 = 𝑑𝑥
𝑝 𝑥

𝑙𝑛(𝑝) − 𝑙𝑛(𝑥) = 𝑙𝑛(𝑐)


𝑝 = 𝑥𝑐
Sub the value of p in eq(1), we get
1 1
𝑦 = 𝑥2 + is general solution.
2 2𝑐

3) Differential equations which are solvable for x.

If the differential equation of the form 𝑓(𝑥, 𝑦, 𝑝) = 0 can be written as


𝑥 = 𝑓 (𝑦, 𝑝) ……(1)
Then it is said to be solvable for x. In order to solve these types of differential
equation we differentiate with respect to y we get

𝑑𝑥 1 𝜕𝑓 𝜕𝑓 𝑑𝑝 𝑑𝑝
= = + = 𝐹 (𝑦, 𝑝, )
𝑑𝑦 𝑝 𝜕𝑦 𝜕𝑝 𝑑𝑦 𝑑𝑦

This differential equation is relation between y and p and can be solved by previous
way, we get the value of p and subs in eq(1) to get the general solution.

33
Engineering analysis Lecture 5

𝑑𝑦
Example: Find general solution of 𝑝2 𝑦 + 2𝑥𝑝 = 𝑦 , where 𝑝 =
𝑑𝑥

Solution:
2𝑥 = 𝑦𝑝−1 − 𝑝𝑦 ……(1)
Differentiating eq(1) with respect to y, we get
𝑑𝑥 𝑑𝑝 𝑑𝑝
2 = 𝑝−1 − 𝑦𝑝−2 −𝑝−𝑦
𝑑𝑦 𝑑𝑦 𝑑𝑦
𝑑𝑝 𝑑𝑝
2𝑝−1 = 𝑝−1 − 𝑦𝑝−2 −𝑝−𝑦
𝑑𝑦 𝑑𝑦
𝑑𝑝 𝑑𝑝
𝑝−1 + 𝑦𝑝−2 +𝑝+𝑦 =0 …*(𝑝2 )
𝑑𝑦 𝑑𝑦
𝑑𝑝 𝑑𝑝
𝑝+𝑦 + 𝑝3 + 𝑦𝑝2 =0
𝑑𝑦 𝑑𝑦
𝑑𝑝
(1 + 𝑝2 )(𝑦 + 𝑝) = 0
𝑑𝑦

𝑝2 − 1 = 0
𝑑𝑝
Or 𝑦 +𝑝 =0
𝑑𝑦
1 1
𝑑𝑝 = − 𝑑𝑦
𝑝 𝑦

𝑙𝑛(𝑝) + 𝑙𝑛(𝑥) = 𝑙𝑛(𝑐)


𝑐
𝑝=
𝑥

Sub the value of p in eq(1), we get


𝑥𝑦 𝑦𝑐
2𝑥 = − is general solution.
𝑐 𝑥

Exercises:

1) 𝑥 2 𝑝2 + 𝑥𝑦𝑝 − 6𝑦 2 = 0
2) 𝑦 2 + 𝑝2 = 0
3) 𝑦 + 𝑝𝑥 = 𝑝2 𝑥 4
4) 𝑥 2 = 𝑎2 (1 + 𝑝2 )
5) 𝑦 2 ln(𝑦) = 𝑥𝑦𝑝 + 𝑝2
6) 𝑦 2 𝑝2 − 3𝑥𝑝 + 𝑦 = 0
7) 𝑦𝑝2 + 2𝑥𝑝 = 𝑦

34
Engineering analysis Lecture 5

Clairaut’s equation:

The differential equation of the form :

𝑌 = 𝑝𝑥 + 𝑓(𝑝) ……(1)
𝑑𝑦
Is called Clairaut’s equation where 𝑝 = = 𝑦′.
𝑑𝑥

Differentiating eq(1) with respect to x, we get


𝑑𝑦 𝑑𝑝
=𝑝+𝑥 + 𝑓 ′ (𝑝)
𝑑𝑥 𝑑𝑥

𝑑𝑝 𝑑𝑝
𝑝 =𝑝+𝑥 + 𝑓 ′ (𝑝)
𝑑𝑥 𝑑𝑥

𝑑𝑝 𝑑𝑝
𝑥 + 𝑓 ′ (𝑝) =0
𝑑𝑥 𝑑𝑥

𝑑𝑝
𝑑𝑥
(𝑥 + 𝑓 ′ (𝑝)) = 0

We have
𝑑𝑝
=0
𝑑𝑥

𝑑𝑝
∫ 𝑑𝑥 = ∫ 0

𝑝=𝑐

Putting the value of p in eq(1), the required solution is 𝑦 = 𝑐𝑥 + 𝑓(𝑐) is general


solution.

𝑥 + 𝑓 ′ (𝑝) = 0 , we obtain the value of p and subs. In eq(1) we get the singular solution.
1
Example: solve 𝑦 = 𝑥𝑝 + .
𝑝

Solution:

𝑦 = 𝑥𝑝 + 𝑝−1 is Clairaut’s equation

Differentiating with respect to x ,we have

35
Engineering analysis Lecture 5

𝑑𝑦 𝑑𝑝 𝑑𝑝
=𝑝+𝑥 − 𝑝−2
𝑑𝑥 𝑑𝑥 𝑑𝑥

𝑑𝑝
(𝑥 − 𝑝−2 ) = 0
𝑑𝑥

𝑑𝑝
= 0 integrating with respect to x
𝑑𝑥

𝑝=𝑐

Subs. the value of p in eq(1)

𝑦 = 𝑥𝑐 + 𝑐 −1 is the general solution

Or 𝑥 − 𝑝−2 = 0
1
𝑝=
√𝑥

Subs. the value of p in eq (1), we have

1 1 −1
𝑦 = 𝑥( )+( ) = 4𝑥 is the general solution
𝑥 𝑥
√ √

Exercise:

1) 𝑦 = 𝑥𝑝 + 𝑝2

36

You might also like