0% found this document useful (0 votes)
162 views7 pages

Engineering Analysis: Faculty of Engineering Petroleum Engineering

1) The document discusses methods for solving first order differential equations, including separable equations and exact equations. 2) Separable equations can be solved by separating the variables and integrating both sides. Exact equations are those where the partial derivatives are equal, indicating there is an underlying function. 3) Examples are provided of solving separable and exact first order differential equations. The process for exact equations involves finding the underlying function through integration and then equating the partial derivatives.

Uploaded by

Nazeer Alyas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
162 views7 pages

Engineering Analysis: Faculty of Engineering Petroleum Engineering

1) The document discusses methods for solving first order differential equations, including separable equations and exact equations. 2) Separable equations can be solved by separating the variables and integrating both sides. Exact equations are those where the partial derivatives are equal, indicating there is an underlying function. 3) Examples are provided of solving separable and exact first order differential equations. The process for exact equations involves finding the underlying function through integration and then equating the partial derivatives.

Uploaded by

Nazeer Alyas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

ENGINEERING ANALYSIS

Faculty of Engineering
Petroleum Engineering

Fourth year
seven semesters
Engineering analysis Lecture 2

Chapter (2)
First order differential equations

First degree first order ODEs contain only 𝑑𝑦 = 𝑑𝑥 equated to some function of x and
dy
y, and can be written in either of two equivalent standard forms = 𝑓(𝑥, 𝑦) or
dx
𝑀(𝑥, 𝑦)𝑑𝑥 + 𝑁(𝑥, 𝑦)𝑑𝑦 = 0.

Methods of solving first order first degree ordinary differential equations:


1.1 Separable Equations
A separable differential equation is any differential equation that we can write in the
following form.
𝑁(𝑦)𝑑𝑦 = 𝑀(𝑥)𝑑𝑥
It is easy to solve this special type ordinary differential equation by integrating both
sides.
∫ 𝑁(𝑦)𝑑𝑦 = ∫ 𝑀(𝑥)𝑑𝑥
.
Example:
a)
𝑑𝑦
= 𝑦 −2 𝑥𝑒 3𝑥−4𝑦
𝑑𝑥

∫ 𝑦 2 𝑒 4𝑦 𝑑𝑦 = ∫ 𝑥𝑒 3𝑥 𝑑𝑥
let 𝑢=𝑥 → 𝑑𝑢 = 𝑑𝑥
1
𝑑𝑣 = 𝑒 3𝑥 𝑑𝑥 → 𝑣 = 𝑒 3𝑥
3
1 1
∫ 𝑥𝑒 3𝑥 𝑑𝑥 = 3 𝑥𝑒 3𝑥 − ∫ 3 𝑒 3𝑥 𝑑𝑥
1 1
= 𝑥𝑒 3𝑥 − 𝑒 3𝑥 + 𝑐
3 9

let 𝑢 = 𝑦2 → 𝑑𝑢 = 2𝑦𝑑𝑦
1
𝑑𝑣 = 𝑒 4𝑦 𝑑𝑥 → 𝑣 = 𝑒 4𝑦
4

7
Engineering analysis Lecture 2

1 1
∫ 𝑦 2 𝑒 4𝑦 𝑑𝑦 = 4 𝑦 2 𝑒 4𝑦 − 2 ∫ 𝑒 4𝑦 𝑦𝑑𝑦
1
𝑑𝑣 = 𝑒 4𝑦 𝑑𝑦 → 𝑣 = 𝑒 4𝑦
4
1 1 1 1
∫ 𝑦 2 𝑒 4𝑦 𝑑𝑦 = 4 𝑦 2 𝑒 4𝑦 − 2 (4 𝑒 4𝑦 𝑦 − 4 ∫ 𝑒 4𝑦 𝑑𝑦)
1 1 1 1 1
= 𝑦 2 𝑒 4𝑦 − ( 𝑒 4𝑦 𝑦 − ∗ 𝑒 4𝑦 )
4 2 4 4 4
1 1 1 1 1
∴ 𝑦 2 𝑒 4𝑦 − 𝑒 4𝑦 𝑦 + 𝑒 4𝑦 = 𝑥𝑒 3𝑥 − 𝑒 3𝑥 + 𝑐
4 8 32 3 9
1 1 1 1 1
𝑦 2 𝑒 4𝑦 − 𝑒 4𝑦 𝑦 + 𝑒 4𝑦 − 𝑥𝑒 3𝑥 + 𝑒 3𝑥 = 𝑐
4 8 32 3 9

b)
𝑑𝑦
= 3𝑥 2 𝑦
𝑑𝑥

∫ 𝑦𝑑𝑦 = ∫ 3𝑥 2 𝑑𝑥
𝑦2
= 𝑥3 + 𝑐
2
𝑦2
− 𝑥3 = 𝑐
2

Exercise:
Solve the differential equation:
𝑑𝑦 2+𝑠𝑖𝑛(𝑥)
1. =
𝑑𝑥 3(𝑦−1)2

2. 𝑥 2 (1 + 𝑦 2 )𝑑𝑥 + 𝑦(1 + 𝑥 2 )𝑑𝑦 = 0


3. 𝑥 2 𝑑𝑦 = (1 − 𝑥 2 + 𝑥 3 )(𝑦 2 − 3𝑦 + 2)𝑑𝑥

8
Engineering analysis Lecture 2

2.2 Exact equations


Consider a first order differential equation of the form
𝑀(𝑥, 𝑦)𝑑𝑥 + 𝑁(𝑥, 𝑦)𝑑𝑦 = 0. . . . . . . . . . . . . . . . . . . (1)
Equation (1) is exact if and only if
𝜕𝑀(𝑥,𝑦) 𝜕𝑁(𝑥,𝑦)
=
𝜕𝑦 𝜕𝑥

This mean that there exist a function u(x,y), such that


𝜕𝑢 𝜕𝑢
𝑑𝑢 = 𝑑𝑥 + 𝑑𝑦 = 𝑀(𝑥, 𝑦)𝑑𝑥 + 𝑁(𝑥, 𝑦)𝑑𝑦
𝜕𝑥 𝜕𝑦

Therefor
𝜕𝑢 𝜕𝑢
= 𝑁(𝑥, 𝑦), = 𝑀(𝑥, 𝑦)𝑑𝑥
𝜕𝑦 𝜕𝑥

𝜕𝑢 𝜕𝑢
Solve = 𝑁(𝑥, 𝑦)𝑎𝑛𝑑 = 𝑀(𝑥, 𝑦)𝑑𝑥 to find 𝑢(𝑥, 𝑦).
𝜕𝑦 𝜕𝑥

Method of solution:

𝜕𝑢 𝜕𝑢
A) = 𝑁(𝑥, 𝑦) …… (1) B) = 𝑀(𝑥, 𝑦) ……... (1)
𝜕𝑦 𝜕𝑥

find 𝑢by integrating 𝑁(𝑥, 𝑦) with respect to find 𝑢by integrating 𝑀(𝑥, 𝑦) with respect to
y while holding x constant: x while holding y constant:

𝑢(𝑥, 𝑦) = ∫ 𝑁(𝑥, 𝑦) 𝑑𝑦 + ℎ(𝑥) ……... (2) 𝑢(𝑥, 𝑦) = ∫ 𝑀(𝑥, 𝑦) 𝑑𝑥 + 𝑔(𝑦) ……., (2)
where the arbitrary function ℎ( 𝑥) is the where the arbitrary function ℎ( 𝑦) is the
“constant” of integration “constant” of integration

Now differentiate eq(2) with respect to y Now differentiate eq(2) with respect to y and
𝜕𝑢 𝜕𝑢
and assume that = 𝑀(𝑥, 𝑦) assume that = 𝑁(𝑥, 𝑦)
𝜕𝑥 𝜕𝑦

𝜕𝑢 𝜕 𝜕𝑢 𝜕
= (∫ 𝑁(𝑥, 𝑦) 𝑑𝑦) + ℎ′ (𝑥) = 𝑀(𝑥, 𝑦) 𝜕𝑦 = 𝜕𝑦 (∫ 𝑀(𝑥, 𝑦) 𝑑𝑦) + ℎ′ (𝑦) = 𝑁(𝑥, 𝑦)
𝜕𝑥 𝜕𝑥
… (3) … (3)

Finally, integrate (3) with respect to x and Finally, integrate (3) with respect to y and
substitute the result in (2). substitute the result in (2).

9
Engineering analysis Lecture 2

The general solution of the equation is 𝑢(𝑥, 𝑦) = 𝑐

Example: find the general solution of the following differential equations:


𝑦 3
1) (3𝑥 2 + 2 ) 𝑑𝑥 + (2 𝑙𝑛( 3𝑥) + ) 𝑑𝑦 = 0
𝑥 𝑦

Solution:
𝑦 𝜕𝑀 2
𝑀(𝑥, 𝑦) = 3𝑥 2 + 2 ⇒ =
𝑥 𝜕𝑦 𝑥
3 𝜕𝑁 2
𝑁(𝑥, 𝑦) = 2 𝑙𝑛( 3𝑥) + ⇒ =
𝑦 𝜕𝑥 𝑥
𝜕𝑁 𝜕𝑀
∵ =
𝜕𝑥 𝜕𝑦

Thus, the equation is exact,


𝜕𝑢
= 𝑀(𝑥, 𝑦)
𝜕𝑥
𝑦
∫ 𝑑𝑢 = ∫ (3𝑥 2 + 2 𝑥 ) 𝑑𝑥
𝑢(𝑥, 𝑦) = 𝑥 3 + 2𝑦 𝑙𝑛( 𝑥) + ℎ(𝑦) . . . . . . . . . (∗)
𝜕𝑢
= 2 𝑙𝑛( 𝑥) + ℎ′ (𝑦) = 𝑁(𝑥, 𝑦)
𝜕𝑦
3
2 𝑙𝑛( 𝑥) + ℎ′ (𝑦) = 2 𝑙𝑛( 3𝑥) +
𝑦
3
ℎ′ (𝑦) = 2 𝑙𝑛( 3𝑥) − 2 𝑙𝑛( 𝑥) +
𝑦
3
ℎ′ (𝑦) = 2 𝑙𝑛( 3) +
𝑦
ℎ(𝑦) = 2 𝑙𝑛( 3)𝑦 + 3 𝑙𝑛( 𝑦)
Sub h(y) in eq (*), we get
𝑢(𝑥, 𝑦) = 𝑥 3 + 2𝑦 𝑙𝑛( 𝑥) + 2 𝑙𝑛( 3)𝑦 + 3 𝑙𝑛( 𝑦) = 𝑐

10
Engineering analysis Lecture 2

2) (𝑒 2𝑦 − 𝑦 𝑐𝑜𝑠( 𝑥𝑦))𝑑𝑥 + (2𝑥𝑒 2𝑦 − 𝑥 𝑐𝑜𝑠( 𝑥𝑦) + 2𝑦)𝑑𝑦 = 0


Solution:
𝜕𝑀 𝜕𝑁
= 2𝑒 2𝑦 + 𝑥𝑦 𝑠𝑖𝑛( 𝑥𝑦) − 𝑐𝑜𝑠( 𝑥𝑦) =
𝜕𝑦 𝜕𝑥
therefore, the equation is exact
𝜕𝑢
= 𝑀(𝑥, 𝑦)
𝜕𝑥
∫ 𝑑𝑢 = ∫(𝑒 2𝑦 − 𝑦 𝑐𝑜𝑠( 𝑥𝑦))𝑑𝑥
𝑢(𝑥, 𝑦) = 𝑥𝑒 2𝑦 − 𝑠𝑖𝑛( 𝑥𝑦) + ℎ(𝑦) . . . . . . . . . (∗)
𝜕𝑢
= 2𝑥𝑒 2𝑦 − 𝑥 𝑐𝑜𝑠( 𝑥𝑦) + ℎ′ (𝑦) = 𝑁(𝑥, 𝑦)
𝜕𝑦

2𝑥𝑒 2𝑦 − 𝑥 𝑐𝑜𝑠( 𝑥𝑦) + ℎ′ (𝑦) = 2𝑥𝑒 2𝑦 − 𝑥 𝑐𝑜𝑠( 𝑥𝑦) + 2𝑦


ℎ′ (𝑦) = 2𝑦
ℎ(𝑦) = 𝑦 2
Sub h(y) in eq(*), we get
𝑢(𝑥, 𝑦) = 𝑥𝑒 2𝑦 − 𝑠𝑖𝑛( 𝑥𝑦) + 𝑦 2 = 𝑐
Example: Find the solution and interval of validity for the following IVP.
𝑑𝑦
3𝑦 3 𝑒 3𝑥𝑦 − 1 + (2𝑦𝑒 3𝑥𝑦 + 3𝑥𝑦 2 𝑒 3𝑥𝑦 ) = 0 𝑦(0) = 1
𝑑𝑥
𝜕𝑀 𝜕𝑁
= 9𝑥𝑦 2 𝑒 3𝑥𝑦 + 9𝑥𝑦 3 𝑒 3𝑥𝑦 =
𝜕𝑦 𝜕𝑥

So, it’s exact.


𝑢(𝑥, 𝑦) = ∫(3𝑦 3 𝑒 3𝑥𝑦 − 1)𝑑𝑥 = 𝑦 2 𝑒 3𝑥𝑦 − 𝑥 + ℎ(𝑦)
𝜕𝑢
= 2𝑦𝑒 3𝑥𝑦 + 3𝑥𝑦 2 𝑒 3𝑥𝑦 + ℎ′ (𝑦) = 𝑁(𝑥, 𝑦)
𝜕𝑦

ℎ′ (𝑦) = 0 → ℎ(𝑦) = 0
𝑢(𝑥, 𝑦) = 𝑦 2 𝑒 3𝑥𝑦 − 𝑥 = 𝑐 is general solution
𝑐=1
𝑦 2 𝑒 3𝑥𝑦 − 𝑥 = 1 is particular solution

11
Engineering analysis Lecture 2

Exercise:
1) Show whether the linear differential equation below is exact or not 𝑦 ′ =
𝑦(𝑥)𝑎(𝑥) + 𝑏(𝑥), 𝑎(𝑥) ≠ 0
2) determine whether the given differential equation is exact. If it is exact, solve it.
𝑦
1. (1 + ln(𝑥) + ) 𝑑𝑥 = (1 + ln(𝑥))𝑑𝑦
𝑥
2. 𝑒 𝑥 sin(𝑦) − 2𝑥 + (𝑒 𝑥 cos(𝑦) + 1)𝑦 ′ = 0
3. (𝑥 2 + 3𝑥𝑦) + (4𝑥𝑦 + 2𝑥)𝑦 ′ = 0

12

You might also like