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

Lectures 04 PDF

This document discusses methods for solving ordinary differential equations (ODEs) with constant or linear coefficients. It presents the general forms for ODEs with constant coefficients and linear coefficients. Examples are provided to demonstrate solving ODEs of the form dy/dx = f(x,y) by finding integrating factors and separating variables. Key steps include determining if the ODE is homogeneous, finding the intersection point of lines, or using an integrating factor to solve the ODE.

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)
77 views7 pages

Lectures 04 PDF

This document discusses methods for solving ordinary differential equations (ODEs) with constant or linear coefficients. It presents the general forms for ODEs with constant coefficients and linear coefficients. Examples are provided to demonstrate solving ODEs of the form dy/dx = f(x,y) by finding integrating factors and separating variables. Key steps include determining if the ODE is homogeneous, finding the intersection point of lines, or using an integrating factor to solve the ODE.

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 4

2.5 Equation with constant coefficients:

consider the following ordinary differential equation with linear coefficients:


𝑑𝑦 𝑎1 𝑥+𝑏1 𝑦+𝑐1
= or (𝑎1 𝑥 + 𝑏1 𝑦 + 𝑐1 )𝑑𝑥 + (𝑎2 𝑥 + 𝑏2 𝑦 + 𝑐2 )𝑑𝑦 = 0 ……(1)
𝑑𝑥 𝑎2 𝑥+𝑏2 𝑦+𝑐2

Where a, s , b , s and c , s are constants. This ordinary differential equation can be


solved as follows:

1) If 𝑐1 = 𝑐2 = 0, then the equation becomes (𝑎1 𝑥 + 𝑏1 𝑦)𝑑𝑥 + (𝑎2 𝑥 + 𝑏2 𝑦)𝑑𝑦 = 0


, which is a homogeneous equation.
2) If 𝑎1 𝑏2 = 𝑎2 𝑏1 , then the straight lines
𝑎1 𝑥 + 𝑏1 𝑦 + 𝑐1 = 0 and 𝑎2 𝑥 + 𝑏2 𝑦 + 𝑐2 = 0 are parallel and for some k the
equality (𝑎1 𝑥 + 𝑏1 𝑦) = 𝑘(𝑎2 𝑥 + 𝑏2 𝑦)

We suppose that 𝑧 = 𝑎1 𝑥 + 𝑏1 𝑦

Differentiating z with respect to x, we get


𝑑𝑦 1 𝑑𝑧
= ( − 𝑎1 )
𝑑𝑥 𝑏1 𝑑𝑥
1 dz 𝑧+c
Hence eq(1) has the form
b1
(dx − a1 ) = kz+c1
2

and it can be solved by separable of variables.


3) If 𝑎1 𝑏2 ≠ 𝑎2 𝑏1 , then the straight lines 𝑎1 𝑥 + 𝑏1 𝑦 + 𝑐1 = 0 and 𝑎2 𝑥 + 𝑏2 𝑦 + 𝑐2 =
0 cross at the same point (ℎ, 𝑘)
Suppose that 𝑥 = 𝑥1 + ℎ ⇒ 𝑑𝑥 = 𝑑𝑥1 and 𝑦 = 𝑦1 + 𝑘 ⇒ 𝑑𝑦 = 𝑑𝑦1
Equation (1) is brought to the equation
(𝑎1 𝑥1 + 𝑏1 𝑦1 )𝑑𝑥1 + (𝑎2 𝑥1 + 𝑏2 𝑦1 )𝑑𝑦1 = 0
Which is homogeneous equation.

20
Engineering analysis Lecture 4

𝑑𝑦 3𝑥−𝑦−6
Example(1): solve =
𝑑𝑥 𝑥+𝑦+2

Solution:

𝑎1 𝑏2 = 3 ∗ 1 = 3; 𝑎2 𝑏1 = 1 ∗ −1 = −1

𝑎1 𝑏2 ≠ 𝑎2 𝑏1

∴ the two straight lines are intersecting at same point (ℎ, 𝑘).

To find the intersection points, we need to solve the two equations.

3𝑥 − 𝑦 − 6 = 0

𝑥+𝑦+2=0

The solution is 𝑥 = 1 and 𝑦 = −3

∴ the intersection point is (1, −3) = (ℎ, 𝑘)

Let 𝑥 = 𝑥1 + ℎ = 𝑥1 + 1 ⇒ 𝑑𝑥 = 𝑑𝑥1

And

𝑦 = 𝑦1 + 𝑘 = 𝑦1 − 3 ⇒ 𝑑𝑦 = 𝑑𝑦1
d𝑦1 3(𝑥1 +1)−(𝑦1 −3)−6
=
d𝑥1 (𝑥1 +1)+(𝑦1 −3)+2

d𝑦1 3𝑥1 −𝑦1


=
d𝑥1 𝑥1 +𝑦1

Which is homogeneous equation.

Put 𝑥1 = 𝑢𝑦1 and d𝑥1 = 𝑢d𝑦1 + 𝑦1 𝑑𝑢


d𝑦1 3𝑢𝑦1 −𝑦1 3𝑢−1
= =
𝑢d𝑦1 +𝑦1 𝑑𝑢 𝑢𝑦1 +𝑦1 𝑢+1

(𝑢 + 1)d𝑦1 = (3𝑢 − 1)(𝑢d𝑦1 + 𝑦1 𝑑𝑢)

(𝑢 + 1)d𝑦1 = (3𝑢)(𝑢d𝑦1 + 𝑦1 𝑑𝑢) − (𝑢d𝑦1 + 𝑦1 𝑑𝑢)

(𝑢 + 1)d𝑦1 = 3𝑢2 d𝑦1 + 3𝑢𝑦1 𝑑𝑢 − 𝑢d𝑦1 − 𝑦1 𝑑𝑢

21
Engineering analysis Lecture 4

(𝑢 + 1)d𝑦1 − 3𝑢2 d𝑦1 + 𝑢d𝑦1 = 3𝑢𝑦1 𝑑𝑢 − 𝑦1 𝑑𝑢

(𝑢 + 1 − 3𝑢2 + 𝑢)d𝑦1 = 𝑦1 (3𝑢 − 1)𝑑𝑢

(2𝑢 + 1 − 3𝑢2 )d𝑦1 = 𝑦1 (3𝑢 − 1)𝑑𝑢


−1 (3𝑢−1)
d𝑦1 = (3𝑢2 𝑑𝑢
𝑦1 −2𝑢−1)

−1 1 2(3𝑢−1)
∫ 𝑦 d𝑦1 = 2 ∫ (3𝑢2 −2𝑢−1) 𝑑𝑢
1

1
− ln(𝑦1 ) = 𝑙𝑛(3𝑢2 − 2𝑢 − 1) + 𝑐
2

1 𝑥 2 𝑥
− ln(𝑦1 ) = 𝑙𝑛 (3 ( 1) − 2 1 − 1) + 𝑐
2 𝑦 𝑦 1 1

1 𝑥−1 2 𝑥−1
ln(𝑦 + 3) + 𝑙𝑛 (3 ( ) − 2 𝑦+3 − 1) + 𝑐 = 0
2 𝑦+3

𝑑𝑦 1−4𝑥−4𝑦
Example (2): Find the general solution of =
𝑑𝑥 𝑥+𝑦

Solution:

a1 b2 = −4 ∗ 1 = −4; a2 b1 = 1 ∗ −4 = −4

a1 b2 = a2 b1

∴ the straight lines are parallel


𝑑𝑦 1−4(𝑥+𝑦)
=
𝑑𝑥 𝑥+𝑦

Let 𝑧 = 𝑥 + 𝑦
𝑑𝑧 𝑑𝑦 𝑑𝑦 𝑑𝑧
=1+ ⇒ = −1
𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑑𝑥

𝑑𝑧 1−4𝑧
−1=
𝑑𝑥 𝑧

𝑑𝑧 1−4𝑧 1−3𝑧
= +1=
𝑑𝑥 𝑧 𝑧

22
Engineering analysis Lecture 4

𝑧
∫ 1−3𝑧 𝑑𝑧 = ∫ 𝑑𝑥

1 1 1
∫ (3 (1−3𝑧) − 3) 𝑑𝑧 = 𝑥 + 𝑐

−1 1
ln(1 − 3𝑧) − 𝑧 = 𝑥 + 𝑐
9 3

−1 1
ln(1 − 3(𝑥 + 𝑦)) − (𝑥 + 𝑦) = 𝑥 + 𝑐
9 3

Exercise:

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


b. (𝑦 − 𝑥 + 2)𝑑𝑥 − (𝑥 + 𝑦 + 6)𝑑𝑦 = 0
c. (2𝑥 − 5𝑦 + 3)𝑑𝑥 − (2𝑥 + 4𝑦 − 6)𝑑𝑦 = 0
dy −x−y−1
d. =
dx x+y+5

2.6 Linear equations

A first-order differential equation is said to be linear if it can be written in the form


𝑑𝑦
+ 𝑝(𝑥)𝑦 = 𝑄(𝑥) …….(1)
𝑑𝑥

where 𝑝(𝑥) and 𝑔(𝑥) are functions of the independent variable.

every first-order linear differential equation can be solved in a similar fashion by


multiplying both sides of Equation 1 by 𝐼(𝑥) a suitable function I(x) called an
integrating factor which is always a function of x alone.

Multiplied eq(1) by 𝐼(𝑥), we get


𝑑𝑦 𝑑
𝐼(𝑥) ( + 𝑝(𝑥)𝑦) = (𝐼(𝑥)𝑦) = 𝐼(𝑥)𝑄(𝑥)
𝑑𝑥 𝑑𝑥
𝑑
(𝐼(𝑥)𝑦) = 𝐼(𝑥)𝑄(𝑥) …... (2)
𝑑𝑥

Where 𝐼(𝑥) satisfy the following


𝑑
𝐼(𝑥)𝑝(𝑥) = (𝐼(𝑥)) …….. (3)
𝑑𝑥

23
Engineering analysis Lecture 4

Integrating eq(3) with respect to x, we get

𝐼(𝑥) = 𝑒 ∫ 𝑝(𝑥)𝑑𝑥 …… (4)


Integrating eq (2) with respect to x, we get
1
𝑦= [∫ 𝐼(𝑥)𝑄(𝑥) 𝑑𝑥] ……. (5)
𝐼(𝑥)

Thus, a formula for the general solution to Equation 1 is provided by Equation 5,


where I is given by Equation 4.

𝑑𝑦
Example (1): solve 𝑥 4 + 4𝑥 3 𝑦 = sin3 (𝑥)
𝑑𝑥

Solution:
𝑑𝑦 1 sin3 (𝑥)
+4 𝑦 =
𝑑𝑥 𝑥 𝑥4
4 sin3 (𝑥)
𝑝(𝑥) = 𝑄(𝑥) =
𝑥 𝑥4
4
𝐼(𝑥) = 𝑒 ∫ 𝑝(𝑥)𝑑𝑥 = 𝑒 ∫𝑥𝑑𝑥 = 𝑥 4
1
𝑦= [∫ 𝐼(𝑥)𝑄(𝑥) dx]
𝐼(𝑥)

1 si n3 (𝑥) 1
𝑦= [ 𝑥4
4 ∫
dx ] = [∫ si n3 (𝑥) dx ]
𝑥 𝑥4 𝑥4
1
= [∫(sin (x) − sin (x)cos 2 (𝑥) dx ]
𝑥4
1 co s3 (𝑥)
= 4
[− cos(𝑥) + + 𝑐]
𝑥 3

24
Engineering analysis Lecture 4

𝑑𝑥
Example(2): solve + 2𝑡𝑥 = 𝑥 + 4𝑡 − 2 .
𝑑𝑡

Solution:

𝑑𝑥
+ (2𝑡 − 1)𝑥 = 4𝑡 − 2
𝑑𝑡

𝑝(𝑡) = (2𝑡 − 1) 𝑄(𝑡) = 4𝑡 − 2

2 −𝑡
𝐼(𝑡) = 𝑒 ∫ 𝑝(𝑡)𝑑𝑡 = 𝑒 ∫(2𝑡−1)𝑑𝑡 = 𝑒 𝑡

1
𝑥= [∫ 𝐼(𝑡)𝑄(𝑡) dt]
𝐼(𝑡)

1 2 −𝑡 1 2 −𝑡 1 2 −𝑡
𝑥= 2 [∫ 𝑒 𝑡 (4𝑡 − 2)dt] = 2 [2 ∫ 𝑒 𝑡 (2𝑡 − 1)dt] = 2 [2𝑒 𝑡 + 𝑐]
𝑒 𝑡 −𝑡 𝑒 𝑡 −𝑡 𝑒 𝑡 −𝑡

Exercise: find the general solution of the given differential equation.


1. 𝑥𝑦 ′ + (1 + 𝑥)𝑦 = 𝑒 −𝑥 sin (2𝑥)
2. 𝑦𝑑𝑥 − 4(𝑥 + 𝑦 6 )𝑑𝑦 = 0
𝑑𝑦
3. 𝑐𝑜𝑠 2 (𝑥) sin(𝑥) + 𝑐𝑜𝑠 3 (𝑥)𝑦 = 1
𝑑𝑥
𝑑𝑦
4. (1 + 𝑥) + (𝑥 + 2)𝑦 = 2𝑥𝑒 −𝑥
𝑑𝑥

5. 𝑦 ′ + tan(𝑥) 𝑦 = 𝑐𝑜𝑠 2 (𝑥), 𝑦(0) = −1

25

You might also like