Chapter 1 - 1st Order Differential Equation - Part 1
Chapter 1 - 1st Order Differential Equation - Part 1
Chapter 1 - 1st Order Differential Equation - Part 1
Equations
BDA 24303
Chapter 1 – 1st Order Differential Equation
By:
Bukhari bin Manshoor, PhD, P.Eng, P.Tech, C.Eng MIET
Assoc Prof.
Dept. of Mechanical d Engineering
Faculty of Mechanical & Manufacturing Engineering
′ 𝑑𝑦
𝑦= =sin 𝑥
𝑑𝑥
𝑦 ′ ′ + 5 𝑦 ′ +3 𝑦 =0
𝑥 𝑦 𝑦 +2 𝑒 𝑦 =( 𝑥 + 𝑦 ) 𝑦
2 ′′′ ′ 𝑥 ′′ 2 2 2
Basic Concepts
● The order of a differential equation is the order of the highest derivative that appears
in the equation.
′ 𝑑𝑦
𝑦= =sin 𝑥 1st order
𝑑𝑥
𝑦 ′ ′ + 5 𝑦 ′ +3 𝑦 =0 2nd order
𝑥 𝑦 𝑦 +2 𝑒 𝑦 =( 𝑥 + 𝑦 ) 𝑦
2 ′′′ ′ 𝑥 ′′ 2 2 2
3rd order
Basic Concepts
● The 1st order ODEs; Equations contain only the first derivative and may contain
and any given functions of .
● Hence we can write them as;
𝐹 ( 𝑥 , 𝑦 , 𝑦 ) =0
′
-------- implicit form
𝑦 ′ = 𝑓 ( 𝑥 , 𝑦 ) 𝑦 ( 𝑥 𝑜 ) =( 𝑦 𝑜 )
Exercise 2
Determine from y the particular solution of the initial value problem.
a)
b)
c)
d)
e)
f)
g)
h)
i) when
j)
Modelling & application
● Differential equations are of great importance in engineering since many physical
laws and relations appear mathematically in the form of differential equations.
● The following exercises consider a basic physical problem that will show the details
of the typical steps of modelling.
- Step 1: Setting up a mathematical model (a differential equation) of the physical system.
- Step 2: Solving the differential equation.
- Step 3: Determination of a particular solution from an initial condition.
- Step 4: Checking
Exercise 3
In dropping a stone or an iron ball, air resistance is practically negligible. Experiments show that
the acceleration of the motion, is constant (equal to called the acceleration of gravity, g = 9.80
m/s2). Model this as an ODE for y(t), the distance fallen as a function of time t. Solve the ODE to
get the familiar law of free fall
If the stone starts at t = 0 from initial position yo, with initial velocity v = vo, how long does a fall
off 100 m take if the body falls from rest? A fall of 200 m?
Exercise 4
Experiment show that a radioactive substance decomposes at a rate proportional to the amount
present. Starting with a given amount of substance, say 2 grams, at a certain time, let say t = 0,
what can be said about the amount available at a later time.
Methods of Solution
● ODE can be classified into four types according to the form of
Separable 𝐹 ( 𝑥 , 𝑦 )= 𝑓 ( 𝑥 ) 𝑔 ( 𝑦 )
Homogeneous
Exact
𝑀 (𝑥 , 𝑦)
𝐹 ( 𝑥 , 𝑦 )=−
𝑁 (𝑥, 𝑦)
Linear
𝐹 ( 𝑥 , 𝑦 )=𝑟 ( 𝑥 ) −𝑝 ( 𝑥 ) 𝑦
Separating variables. By calculus;
● Many practically useful ODEs can be reduced to the form; ′ 𝑑𝑦
𝑦=
𝑑𝑥
′
𝑔 ( 𝑦 ) 𝑦 = 𝑓 ( 𝑥) ------------------------------ (1)
𝑔 ( 𝑦 ) 𝑑 𝑦= 𝑓 ( 𝑥 ) 𝑑𝑥 --------------------- (2)
1
Integrating both side; ∫( 𝑑𝑦 =∫ 𝑑𝑥 tan −1 𝑦 +𝑐1 = 𝑥+𝑐 2
1+𝑦 )
2
𝑦 =tan ( 𝑥 +𝑐 ) ∫ 𝑑𝑥
( 𝑥+1 ) 𝑒 −𝑥
Integrate by parts;
𝑦 ′ = ( 𝑥 +1 ) 𝑒− 𝑥 𝑦 2 ∫ 𝑢𝑣 ′
𝑑𝑥=𝑢𝑣− ∫ 𝑣𝑑𝑥
𝑢 ′
𝑢= ( 𝑥 +1 ) 𝑢 ′ =1
𝑑𝑦 𝑑𝑦 𝑣 ′ =𝑒 − 𝑥 𝑣 =− 𝑒 − 𝑥
𝑦 ′ =10 −0.005 𝑦
𝑑𝑦 𝑑𝑦
=− 0.005 ( 𝑦 − 2000 ) =−0.005 𝑑𝑡
𝑑𝑡 ( 𝑦 −2000 )
1
- Integrating both side; ∫ ( 𝑦 −2000 ) 𝑑𝑦=∫ − 0.005 𝑑t ln | 𝑦 −2000|=− 0.005 𝑡 +𝑐 ∗
𝑦 −2000=𝑐𝑒 − 0.005𝑡
𝑦 =2000+𝑐𝑒 −0.005 𝑡
- Initially (at t = 0) the tank contains 10 kg of salts. i.e. y(0) = 10
- General solution can be written as; 𝑦 ( 𝑡 ) =2000+𝑐 𝑒− 0.005 𝑡 ln | 𝑦 − 2000|=¿ − 0.005 𝑡 +𝑐 ∗ ¿
∗
− 0.005𝑡 +𝑐
𝑦 − 2000 =𝑒
∗
𝑦 ( 0 )=2000+ 𝑐 𝑒
−0.005 (0)
=10 𝑐=−1990 𝑦 − 2000 =𝑒 − 0.005𝑡 𝑒𝑐
∗
1500
y(t) 1000
500
0
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
time
Example: Newton’s law of cooling.
Suppose that in winter the daytime temperature in a certain office building is maintained at 24°C.
The heating is shut off at 10 p.m. and turned on again at 6 a.m. On a certain day the temperature
inside the building at 2 a.m. was found to be 18°C. The outside temperature was 10°C at 10 p.m.
and had dropped to 5°C by 6 a.m. What was the temperature inside the building when the heat was
turned on at 6 a.m.?
- Newton’s law of cooling; The rate of change of the temperature of an object is proportional to the
difference between its own temperature and the ambient temperature (i.e. the temperature of its
surroundings).
𝑑𝑇
=𝑘 ( 𝑇 −𝑇 𝐴 ) T = Object temp. TA = Ambient temp.
𝑑𝑡
𝑑𝑇
- By separating variable; =𝑘 𝑑𝑡
( 𝑇 −𝑇 𝐴 )
1
- Integrating both side; ∫ ( 𝑇 − 𝑇 ) 𝑑𝑇 =∫ 𝑘 𝑑 t ln |𝑇 −𝑇 𝐴|=𝑘𝑡 +𝑐 ∗
𝐴
𝑇 − 𝑇 𝐴 =𝑐𝑒 𝑘𝑡
𝑇 =𝑇 𝐴 +𝑐𝑒 𝑘𝑡
- We do not know the exact value of TA, but we know it varied between 10°C and 5°C. Let we guess
the value of TA is an average of the known values. i.e. TA = 7.5°C.
- General solution of the ODE can be written as; 𝑇 ( 𝑡 )=7.5+𝑐 𝑒𝑘𝑡
- Let the initial condition set at 10 p.m., i.e. T(0) = 24;
𝑇 ( 0 )=7.5+ 𝑐 𝑒
𝑘( 0)
= 24 𝑐=16.5
- Particular solution;
𝑇 ( 𝑡 )=7.5+16.5 𝑒 𝑘𝑡 At t = 4, (2 a.m), the temp. inside the building = 18°C
𝑇 ( 4 ) =7.5+16 .5 𝑒 4 𝑘=18 24
22
4𝑘 18 −7.5
𝑒 = =0.636
16.5
Inside temp. oC
20
18
1
𝑘= ln 0. 636=−0.113
4 16
14
𝑇 ( 𝑡 )=7.5+16.5 𝑒 −0.113 𝑡 12
0 1 2 3 4 5 6 7 8
Time, t
Exercise 5
Solve the following differential equations.
a)
b) 0
c)
𝑑𝑢 𝑑𝑥
= -------------- (3)
𝑓 ( 𝑢 ) −𝑢 𝑥
Example:
′𝑦 2+ 𝑥 2 Find the particular solution for the differential equation that satisfy the
𝑦=
2 𝑥𝑦 initial condition y(1) = 2
Let 𝑦 =𝑢𝑥 ; thus, 𝑦 ′ =𝑢′ 𝑥+𝑢 Substitute into the differential eqn.
2 2
𝑑𝑢 ( 𝑢𝑥 ) + 𝑥
𝑥 +𝑢=
𝑑𝑥 2 𝑥 ( 𝑢𝑥 )
𝑥 2 ( 1+𝑢 2) ( 1+𝑢 2)
¿ =
2 𝑥2𝑢 2𝑢
𝑑𝑢 ( 1+𝑢2 ) 1 −𝑢
2
. 𝑥= − 𝑢= this eqn. can be separated:
𝑑𝑥 2𝑢 2𝑢
2𝑢 1
𝑑𝑢= 𝑑𝑥
1 −𝑢
2
𝑥
* The next step for this solution is to integrate both side of the equation.
2𝑢 1
- Integrating both side; ∫ 1− 𝑢2 ∫ 𝑥 𝑑𝑥
𝑑𝑢= For the LHS, let
- Hence; 𝑑𝑎=−2 𝑢𝑑𝑢
2𝑢 1
− ln|1− 𝑢2|+𝑐 1= ln| 𝑥|+𝑐 2 ∫ 1− 𝑢2 𝑑𝑢=−∫ 𝑎 𝑑𝑎
ln |𝑥|+ln |1− 𝑢 |=𝐶
2
*
2𝑢
ln |𝑥 ( 1 − 𝑢 2 )|=𝐶
∫ 1− 𝑢2 𝑑𝑢=− ln|𝑎|+𝑐 1
𝑥 ( 1− 𝑢2 ) = 𝐴 2𝑢
- Know that
*
∫ 1− 𝑢2 𝑑𝑢=− ln |1− 𝑢
2
|+𝑐 1
- General solution can be written as;
( ( ))
2
𝑦
𝑥 1− =𝐴
𝑥 𝑦 ( 𝑥)=√ 𝑥2 − 𝐴𝑥
𝑥2 − 𝑦 2= 𝐴𝑥 By applying the initial condition,
𝑦 2 =𝑥2 − 𝐴𝑥 𝑦 ( 1 )= √ 1 2 − 𝐴 =2
- The particular solution;
𝑦 2 =𝑥2 +3 𝑥
Example:
𝑦′ =
𝑦
𝑥
+ tan (𝑦 ) the general solution for the differential equation.
𝑥 Find
Let 𝑦 =𝑢𝑥 ; thus, 𝑦 ′ =𝑢′ 𝑥+𝑢 Substitute into the differential eqn.
𝑑𝑢 sin𝑢
𝑥 +𝑢=𝑢+tan 𝑢 =𝐴
𝑑𝑥 𝑥
𝑑𝑢 1 1 𝑦
𝑥 =tan 𝑢 Separating variable; 𝑑𝑢= 𝑑𝑥 sin = 𝐴𝑥
𝑑𝑥 tan 𝑢 𝑥 𝑥
1 1 𝑦
∫ tan 𝑢 𝑑𝑢=∫ 𝑥 𝑑𝑥
−1
- Integrating both side; =sin 𝐴𝑥
𝑥
ln | |
sin 𝑢
𝑥
=𝐶
sin 𝑢
𝑥
= 𝐴 ( 𝐴 =∓ 𝑒 )
𝑐
Exercise 6
Solve the following differential equations.
Or; 𝑑𝐹 ( 𝑥 , 𝑦 ) =𝑀 ( 𝑥 , 𝑦 ) 𝑑𝑥 + 𝑁 ( 𝑥 , 𝑦 ) 𝑑𝑦 =0
𝑑𝑦 2 𝑥𝑦
=− In differential form;( 2 𝑥𝑦 ) 𝑑𝑥+ ( 4 𝑦 +𝑥 2 ) 𝑑𝑦 = 0
𝑑𝑥 4 𝑦 +𝑥
2
- Check an exactness;
𝜕𝑀 𝜕𝑁
=
𝜕𝑦 𝜕𝑥
- From the general equation;
𝑀 ( 𝑥 , 𝑦 ) 𝑑𝑥+ 𝑁 ( 𝑥 , 𝑦 ) 𝑑𝑦 =0
𝑀 ( 𝑥 , 𝑦 )=( 2 𝑥𝑦 )
𝑁 ( 𝑥 , 𝑦 ) =( 4 𝑦 + 𝑥 )
2
𝜕 𝑀 𝜕 ( 2 𝑥𝑦 )
= =2 𝑥
𝜕𝑦 𝜕𝑦
Exact.
𝜕 𝑁 𝜕( 4 𝑦 + 𝑥 )
2
= =2 𝑥
𝜕𝑥 𝜕𝑥
Assume is a solution.
𝜕𝑢
- Let =𝑀 ( 𝑥 , 𝑦 )=2 𝑥𝑦 ------------ (1)
𝜕𝑥
Integrate both side to get
𝜕𝑢 2
=𝑁 ( 𝑥 , 𝑦 )=4 𝑦 + 𝑥 -------- (2)
∫ 𝑔 ( 𝑦 ) 𝑑𝑦=∫ 4𝑦 𝑑𝑦
- Let
𝜕𝑦 ′
𝜕𝑢
Obtain by 𝑢=∫ 𝑑𝑥
𝜕𝑥 𝑔 ( 𝑦 )=2 𝑦 2+ 𝐶
Therefore,
𝑑𝑦 ( 3 𝑥 2 −2 𝑦 2 )
=− In differential form; ( 3 𝑥2 − 2 𝑦 2 ) 𝑑𝑥 + ( 1− 4 𝑥𝑦 ) 𝑑𝑦= 0
𝑑𝑥 ( 1 − 4 𝑥𝑦 )
- Check an exactness;
𝜕𝑀 𝜕𝑁
=
𝜕𝑦 𝜕𝑥
- From the general equation;
𝑀 ( 𝑥 , 𝑦 ) 𝑑𝑥+ 𝑁 ( 𝑥 , 𝑦 ) 𝑑𝑦 =0
i.e. 𝑀 ( 𝑥 , 𝑦 )=( 3 𝑥 2 − 2 𝑦 2 )
𝑁 ( 𝑥 , 𝑦 ) =( 1 −4 𝑥𝑦 )
𝜕 𝑀 𝜕 ( 3 𝑥 −2 𝑦 )
2 2
= =− 4 𝑦
𝜕𝑦 𝜕𝑦
Exact.
𝜕 𝑁 𝜕 (1 − 4 𝑥𝑦 )
= =− 4 𝑦
𝜕𝑥 𝜕𝑥
The general solution of an exact equation is given by;
¿∫ ( 3𝑥 −2𝑦 ) 𝑑𝑥+𝑓 ( 𝑦 )
2 2
𝐹 ( 𝑥 , 𝑦 )=𝑥 3 − 2 𝑥 𝑦 2 + 𝑦
¿ 𝑥3 −2 𝑥 𝑦 2+ 𝑓 ( 𝑦 ) ------------ (1)
- General solution for the exact ODE;
- 2nd step;
𝑥3 −2 𝑥 𝑦 2+ 𝑦=𝐶
𝐹 ( 𝑥,𝑦 )=∫ 𝑓 (𝑥)+𝑁 ( 𝑥,𝑦 ) 𝑑𝑦
¿∫ 𝑓 (𝑥)+ ( 1−4𝑥𝑦 ) 𝑑𝑦
2
¿ 𝑓 ( 𝑥 ) + 𝑦 − 2 𝑥𝑦 ------------ (2)
- Check an exactness;
𝜕𝑀 𝜕𝑁
=
𝜕𝑦 𝜕𝑥
- From the general equation;
𝑀 ( 𝑥 , 𝑦 ) 𝑑𝑥+ 𝑁 ( 𝑥 , 𝑦 ) 𝑑𝑦 =0
i.e. 𝑀 ( 𝑥 , 𝑦 )=( 2 𝑥𝑦 )
𝑁 ( 𝑥 , 𝑦 ) =( 𝑥 +3 𝑦 )
2 2
𝜕 𝑀 𝜕 ( 2 𝑥𝑦 )
= =2 𝑥
𝜕𝑦 𝜕𝑦
Exact.
𝜕 𝑁 𝜕 ( 𝑥 +3 𝑦 )
2 2
= =2 𝑥
𝜕𝑥 𝜕𝑥
The general solution of an exact equation is given by;
( 3 𝑥 + 𝑦 ) 𝑑𝑥 +𝑥𝑑𝑦 = 0
- In differential form;
- Check an exactness;
𝜕𝑀 𝜕𝑁
=
𝜕𝑦 𝜕𝑥
- From the general equation;
𝑀 ( 𝑥 , 𝑦 ) 𝑑𝑥+ 𝑁 ( 𝑥 , 𝑦 ) 𝑑𝑦 =0
i.e. 𝑀 ( 𝑥 , 𝑦 )=( 3 𝑥+ 𝑦 )
𝑁 ( 𝑥 , 𝑦 ) =( 𝑥 )
𝜕 𝑀 𝜕 ( 3 𝑥+ 𝑦 )
= =1
𝜕𝑦 𝜕𝑦
Exact.
𝜕 𝑁 𝜕 (𝑥 )
= =1
𝜕𝑥 𝜕𝑥
The general solution of an exact equation is given by;
𝐹 ( 𝑥 , 𝑦 )=∫ 𝑀 ( 𝑥 , 𝑦 ) 𝑑𝑥 −∫ { 𝜕 (∫ 𝑀 ( 𝑥 , 𝑦 ) 𝑑𝑥 )
𝜕𝑦 }
− 𝑁 ( 𝑥 , 𝑦 ) 𝑑𝑦 =𝐶
3 𝑥2
∫ 𝑀 ( 𝑥 , 𝑦 ) 𝑑𝑥=∫ ( 3 𝑥+𝑦 ) 𝑑𝑥= 2 +𝑥𝑦
3 𝑥2
𝜕 (∫ 𝑀 ( 𝑥 , 𝑦 ) 𝑑𝑥 ) 𝜕 2 + 𝑥𝑦
=
(
=𝑥
)
𝜕𝑦 𝜕𝑦
3 𝑥2
𝐹 ( 𝑥 , 𝑦 )= +𝑥𝑦 −∫ { 𝑥 − 𝑥 } 𝑑𝑦=𝐶
2
3 𝑥2
𝐹 ( 𝑥 , 𝑦 )= + 𝑥𝑦 =𝐶
2
- General solution for the exact ODE;
3 𝑥2
+ 𝑥𝑦 =𝐶
2
Exercise 7
Test for exactness. If exact, solve the differential equation.
a)
b)
c) the initial value,
InExact ODEs.
● A first-order differential equation of the form;
𝑀 ( 𝑥 , 𝑦 ) 𝑑𝑥+ 𝑁 ( 𝑥 , 𝑦 ) 𝑑𝑦 =0
𝜕 ( 𝑖𝑀 ) 𝜕 ( 𝑖𝑁 )
=
𝜕𝑦 𝜕𝑥
● For an integrating factor that is a function of both x and y, there is no general method
to solve it.
● If an integrating factor exists that is a function of either x or y alone, then the eqn.
can be solve to find it.
How to determine the integrating factor?
● If we assume that the integrating factor is a function of x alone, , the integrating
factor is then given by;
𝑖 ( 𝑥 )= 𝑒∫
𝑓 ( 𝑥 ) 𝑑𝑥
where 𝑓 ( 𝑥 ) = (
1 𝜕𝑀 𝜕𝑁
𝑁 𝜕𝑦
−
𝜕𝑥 )
● If the integrating factor is a function of y alone, , then;
𝑖 ( 𝑦 ) =𝑒∫ 𝑔
( 𝑦 ) 𝑑𝑦
where 𝑔 ( 𝑦 )= (
1 𝜕𝑁 𝜕𝑀
𝑀 𝜕𝑥
−
𝜕𝑦 )
To Linear ODEs
Example:
𝑑𝑦 2 3𝑦
=− − Solve the following differential equation.
𝑑𝑥 𝑦 2𝑥
𝑑𝑦 2 3𝑦
- In differential form; ( 4 𝑥+3 𝑦 2 ) 𝑑𝑥 + ( 2 𝑥𝑦 ) 𝑑𝑦= 0 𝑑𝑥
=−
𝑦
−
2𝑥
- Check an exactness; 4 𝑥 +3 𝑦 2
¿−
𝜕𝑀 𝜕𝑁 2 𝑥𝑦
=
𝜕𝑦 𝜕𝑥 ( 4 𝑥+3 𝑦 2 ) 𝑑𝑥 + ( 2 𝑥𝑦 ) 𝑑𝑦= 0
𝜕 𝑀 𝜕 ( 4 𝑥 +3 𝑦 )
2
= =6 𝑦 We can transform the equation to be
𝜕𝑦 𝜕𝑦
Not exact !!! an exact by multiplying the equation
𝜕 𝑁 𝜕 ( 2 𝑥𝑦 ) with the integrating factor, i(x,y).
= =2 𝑦
𝜕𝑥 𝜕𝑥
Let;
𝑓 ( 𝑥 )= (
1 𝜕𝑀 𝜕𝑁
𝑁 𝜕𝑦
−
𝜕𝑥
=
1
2 𝑥𝑦 )
(6 𝑦 − 2 𝑦 )=
2
𝑥
- The integrating factor that have only the function of x,
∫ 𝑓 ( 𝑥 ) 𝑑𝑥 ∫ 2𝑥 𝑑𝑥 2 ln 𝑥 2
𝑖 ( 𝑥 )= 𝑒 =𝑒 =𝑒 =𝑥
- Multiply the differential equation by integrating factor,
( 4 𝑥3 +3 𝑥 2 𝑦 2 ) 𝑑𝑥 + ( 2 𝑥 3 𝑦 ) 𝑑𝑦= 0
𝑖𝑀 ( 𝑥 , 𝑦 )=( 4 𝑥 + 3 𝑥 𝑦 )
3 2 2
𝑖𝑁 ( 𝑥 , 𝑦 ) =( 2 𝑥3 𝑦 )
𝜕 ( 𝑖𝑀 ) 𝜕 ( 4 𝑥 +3 𝑥 𝑦 )
3 2 2
2
= =6 𝑥 𝑦
𝜕𝑦 𝜕𝑦
Exact !!!
𝜕 ( 𝑖𝑁 ) 𝜕 ( 2 𝑥 𝑦 )
3
2
= =6 𝑥 𝑦
𝜕𝑥 𝜕𝑥
The general solution of an exact equation;
¿∫ ( 4 𝑥 +3 𝑥 𝑦 ) 𝑑𝑥+𝑓 ( 𝑦 )
3 2 2 𝑓 ( 𝑦 )=𝑐1
𝐹 ( 𝑥 , 𝑦 )=𝑥 4 + 𝑥3 𝑦 2=𝐶
¿ 𝑥4 +𝑥 3 𝑦 2 + 𝑓 ( 𝑦 ) ------------ (1)
- General solution for the exact ODE;
- 2nd step;
𝑥 4 +𝑥 3 𝑦 2 =𝐶
𝐹 ( 𝑥,𝑦 )=∫ 𝑓 (𝑥)+𝑁 ( 𝑥,𝑦 ) 𝑑𝑦
¿∫ 𝑓 (𝑥)+ ( 2𝑥 𝑦 ) 𝑑𝑦
3
3 2
¿ 𝑓 ( 𝑥 ) +𝑥 𝑦 ------------ (2)
i.e. 𝑀 ( 𝑥 , 𝑦 )=( − 𝑦 )
𝑁 ( 𝑥 , 𝑦 ) =( 𝑥 )
( −
𝑦
𝑥
2 ) 𝑑𝑥 + ( ) 𝑑𝑦 =0
1
𝑥
𝜕 𝑀 𝜕 (− 𝑦 )
= =−1
𝑖𝑀 ( 𝑥 , 𝑦 )= −
( 𝑦
𝑥
2 ) 𝑖𝑁 ( 𝑥 , 𝑦 ) = () 1
𝑥
𝜕𝑦 𝜕𝑦
𝜕 𝑁 𝜕 (𝑥 )
Not exact !!! 𝜕 ( 𝑖𝑀 )
=
(
𝜕 −
𝑥
𝑦
2 )
1
=− 2
= =1 𝜕𝑦 𝜕𝑦 𝑥
𝜕𝑥 𝜕𝑥 Exact
𝜕 ( 𝑖𝑁 )
=
𝜕
1
𝑥 ( )
1
=− 2
𝜕𝑥 𝜕𝑥 𝑥
The general solution of an exact equation;
¿∫ −
( ) 𝑦
𝑥
2
𝑑𝑥+ 𝑓 ( 𝑦 ) 𝑓 ( 𝑦 )=𝑐1
𝑦
𝑓 ( 𝑦 )=𝑐 2
𝑦 ------------ (1) 𝐹 ( 𝑥 , 𝑦 )= =𝐶
¿ +𝑓 (𝑦) 𝑥
𝑥
- General solution for the exact ODE;
- 2nd step;
¿∫ 𝑓 (𝑥)+ ()
1
𝑥
𝑑𝑦
𝑦
¿ 𝑓 (𝑥 )+ ------------ (2)
𝑥
- Check an exactness;
𝜕𝑀 𝜕𝑁
=
𝜕𝑦 𝜕𝑥
- From the general equation;
𝑀 ( 𝑥 , 𝑦 ) 𝑑𝑥+ 𝑁 ( 𝑥 , 𝑦 ) 𝑑𝑦 =0
i.e. 𝑀 ( 𝑥 , 𝑦 )=( 𝑥 𝑦 2 +4 𝑥 2 𝑦 )
𝑁 ( 𝑥 , 𝑦 ) =( 3 𝑥 2 𝑦 + 4 𝑥 3 )
𝜕 𝑀 𝜕(𝑥 𝑦 +4 𝑥 𝑦 )
2 2
2
= =2 𝑥𝑦 + 4 𝑥
𝜕𝑦 𝜕𝑦
Not exact !!!
𝜕 𝑁 𝜕( 3 𝑥 𝑦 + 4 𝑥 )
2 3
2
= =6 𝑥𝑦 +12 𝑥
𝜕𝑥 𝜕𝑥
The differential equation;
( 𝑥 𝑦 2+ 4 𝑥 2 𝑦 ) 𝑑𝑥 + ( 3 𝑥2 𝑦 + 4 𝑥 3 ) 𝑑𝑦 =0
- Let the integrating factor,
- Multiply the differential equation by integrating factor,
𝐹 [ ( 𝑥 𝑦 + 4 𝑥 𝑦 ) 𝑑𝑥 + ( 3 𝑥 𝑦 + 4 𝑥 ) 𝑑𝑦 ]= 𝐹 ( 0 )
2 2 2 3
𝑥
𝑚
𝑦
𝑛
[ ( 𝑥 𝑦 2 +4 𝑥 2 𝑦 ) 𝑑𝑥+ ( 3 𝑥 2 𝑦 +4 𝑥 3 ) 𝑑𝑦 ]= 𝑥 𝑚 𝑦 𝑛 ( 0 )
( 𝑥𝑚 +1 𝑦 𝑛+2 + 4 𝑥𝑚 +2 𝑦 𝑛+1 ) 𝑑𝑥+ ( 3 𝑥 𝑚+2 𝑦 𝑛 +1+ 4 𝑥 𝑚+3 𝑦 𝑛 ) 𝑑𝑦 = 𝑥𝑚 𝑦 𝑛 ( 0 )
- The equation is exact if;
𝜕𝑀 𝜕𝑁 𝑀 ( 𝑥 , 𝑦 )=( 𝑥
𝑚+1
𝑦
𝑛 +2
+4 𝑥
𝑚+2
𝑦
𝑛 +1
)
=
𝜕𝑦 𝜕𝑥 𝑁 ( 𝑥 , 𝑦 ) =( 3 𝑥𝑚 +2 𝑦 𝑛 +1+ 4 𝑥𝑚 +3 𝑦 𝑛 )
12, 14, 20
2. Under what condition is exact? (a, b, k, l are constant.) Solve for the exact equation.
3. Verify that and are integrating factors of and solve.
Exercise 9
1. Show the given function is an integrating factor and solve.
𝑦 ′ +𝑝 ( 𝑥 ) 𝑦= 𝑟 ( 𝑥 ) -------------------- (1)
𝑑𝑦 + ( 𝑝 ( 𝑥 ) 𝑦 − 𝑟 ( 𝑥 ) ) 𝑑𝑥=0
𝑓 ( 𝑥 )= (
1 𝜕𝑀 𝜕𝑁 1
𝑁 𝜕𝑦
−
𝜕𝑥 1 )
= ( 𝑝 ( 𝑥 ) −0 )=𝑝 ( 𝑥 )
𝑖 ( 𝑥 )= 𝑒∫ 𝑓 =𝑒∫ 𝑝
( 𝑥 ) 𝑑𝑥 ( 𝑥 ) 𝑑𝑥
● Multiply equation (1) on both sides by the integrating factor;
( 𝑒∫ 𝑝 ( 𝑥 ) 𝑑𝑥 ) 𝑑𝑦 + (𝑒∫ 𝑝 ( 𝑥) 𝑑𝑥 ) 𝑝 ( 𝑥 ) 𝑦 =( 𝑒∫ 𝑝 ( 𝑥 ) 𝑑𝑥 ) 𝑟 ( 𝑥 )
𝑑𝑥
Solve by chain rule method;
- LHS terms are derivative of special product; 𝑑𝑢
𝑢=∫ 𝑝 ( 𝑥 ) 𝑑𝑥 =𝑝 ( 𝑥 )
𝑑𝑥
𝑑𝑦 𝑢 𝑢
𝑦 =𝑒 =𝑒
𝑑(𝑒 ∫ 𝑝 ( 𝑥 ) 𝑑𝑥
∗ 𝑦) 𝑑𝑢
= (𝑒 )𝑟 (𝑥 )
∫ 𝑝 (𝑥 ) 𝑑𝑥 𝑑𝑦 𝑑𝑦 𝑑𝑢
= . =𝑒 𝑢 . 𝑝 ( 𝑥¿ )
𝑑𝑥 𝑑𝑥 𝑑𝑢 𝑑𝑥
𝑒∫
𝑝 ( 𝑥 )𝑑𝑥
𝑑 ( 𝑒∫ ∗ 𝑦 ) =( 𝑒∫ ) 𝑟 ( 𝑥 ) 𝑑𝑥
𝑝 ( 𝑥 ) 𝑑𝑥 𝑝 ( 𝑥 ) 𝑑𝑥 ¿𝑒 . 𝑝 (𝑥 )
y
● By integrating both side;
∫ 𝑑 (𝑒 ∫ 𝑝 ( 𝑥) 𝑑𝑥
∗ 𝑦 )=∫ (𝑒 ∫ 𝑝 ( 𝑥) 𝑑𝑥 )
𝑟 ( 𝑥 ) 𝑑𝑥
𝑒∫𝑝 (𝑥 ) 𝑑𝑥
∗𝑦=∫ 𝑒 ( )
∫ 𝑝 ( 𝑥) 𝑑𝑥
𝑟 ( 𝑥) 𝑑𝑥
● The general solution of the linear ODEs is given by;
𝑦=𝑒
−∫ 𝑝 ( 𝑥) 𝑑𝑥
∫ (𝑒∫ 𝑝 ( 𝑥) 𝑑𝑥 )
𝑟 ( 𝑥 ) 𝑑𝑥
-------------------- (2)
Example:
𝑑𝑦
+2 𝑥𝑦 = 4 𝑥 Solve the following differential equation.
𝑑𝑥
∫𝑒
2
𝑥
- Compare with the eqn. (1); 𝑝 ( 𝑥 )=2 𝑥 𝑟 ( 𝑥 ) = 4 𝑥 .4 𝑥 𝑑𝑥
- By using the general solution for linear ODEs (eqn. (2));
𝑦=𝑒 (𝑒 𝑟 ( 𝑥 ) 𝑑𝑥
−∫ 𝑝 ( 𝑥 ) 𝑑𝑥
∫ ∫ 𝑝 ( 𝑥) 𝑑𝑥 ) ∫ 𝑒 .4 𝑥 𝑑𝑥=2∫ 𝑒 𝑑𝑢
𝑥
2
𝑢
−∫ 2𝑥 𝑑𝑥
∫ ( 𝑒 ) 4 𝑥 𝑑𝑥 ∫
∫ ¿ 2 𝑒𝑢 + 𝐶
2𝑥 𝑑𝑥 2 𝑥 𝑑𝑥=𝑥 2
𝑦=𝑒 ¿2𝑒
𝑥
2
+𝐶
∫ ((𝑒 ) 4 𝑥 𝑑𝑥 )
2 2
−𝑥 𝑥
𝑦 =𝑒 2 2
−𝑥 𝑥
𝑦 =𝑒 2𝑒 +𝐶
2
− 𝑥
𝑦 =2 + 𝐶 𝑒
Example:
𝑑𝑦 2𝑥
− 𝑦 =𝑒 Solve the following differential equation.
𝑑𝑥
𝑦=𝑒 (𝑒 𝑟 ( 𝑥 ) 𝑑𝑥
−∫ 𝑝 ( 𝑥 ) 𝑑𝑥
∫ ∫ 𝑝 ( 𝑥) 𝑑𝑥 )
𝑦=𝑒
−∫ − 1𝑑𝑥
∫ ( 𝑒 ) 𝑒 𝑑𝑥
∫ −1𝑑𝑥 2𝑥
𝑦 =𝑒 ∫ ( 𝑒 ) 𝑒 𝑑𝑥
𝑥 −𝑥 2𝑥
𝑦 =𝑒 ∫ 𝑒 𝑑𝑥
𝑥 𝑥
𝑦 =𝑒 𝑥 ( 𝑒 𝑥 + 𝐶 )
𝑦 =𝑒 2 𝑥 + 𝐶 𝑒 𝑥
Example:
𝑑𝑦
+ 𝑦 tan 𝑥=sin 2 𝑥 𝑦 ( 0 ) =1 Solve the following differential equation.
𝑑𝑥
𝑦=𝑒
−∫ tan 𝑥 𝑑𝑥
∫(𝑒 ∫ tan 𝑥 𝑑𝑥 )
2sin𝑥 cos 𝑥 𝑑𝑥 Apply the initial value;
∫ 𝑒1
ln |cos 𝑥| −ln |cos 𝑥| 𝑦 ( 𝑥 ) =𝐶 cos 𝑥 − 2 cos2 𝑥
𝑦=𝑒 2sin 𝑥cos𝑥 𝑑𝑥 𝑦 ( 0 ) =𝐶 cos ( 0 ) − 2 cos 2 ( 0 )=1