Chapter 1 - 1st Order Differential Equation - Part 1
Chapter 1 - 1st Order Differential Equation - Part 1
II
BDA 14103
Chapter 1 – 1st Order Differential Equation
By:
Bukhari bin Manshoor, PhD
Assoc. Prof.
Dept. of Energy & Thermofluid 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
● In most cases, general solutions exist, and every solution not containing an arbitrary
constant is obtained as a particular solution by assigning a suitable value to c.
● A particular solution is obtained from a general solution by an initial condition
𝑦 𝑥𝑜 = 𝑦𝑜 .
● With given values 𝑥𝑜 and 𝑦𝑜 , a value of the arbitrary constant c can be obtained.
● Geometrically this condition means that the solution curve should pass through the
point in the xy-plane.
● An ODE, together with an initial condition, is called an initial value problem.
● Thus, if the ODE is explicit, 𝑦 ′ = 𝑓 𝑥, 𝑦 , the initial value problem is of the form;
𝑦 ′ = 𝑓 𝑥, 𝑦 𝑦 𝑥𝑜 = 𝑦𝑜
Exercise 2
Determine from y the particular solution of the initial value problem.
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 𝐹 𝑥, 𝑦 .
Type of ODE 𝑭 𝒙, 𝒚
Separable 𝐹 𝑥, 𝑦 = 𝑓 𝑥 𝑔 𝑦
𝑦
Homogeneous 𝐹 𝑥, 𝑦 = 𝐹
𝑥
𝑀 𝑥, 𝑦
Exact 𝐹 𝑥, 𝑦 = −
𝑁 𝑥, 𝑦
Linear 𝐹 𝑥, 𝑦 = 𝑟 𝑥 − 𝑝 𝑥 𝑦
Separating variables. By calculus;
● Many practically useful ODEs can be reduced to the form; 𝑑𝑦
𝑦′ =
𝑑𝑥
𝑔 𝑦 𝑦′ = 𝑓 𝑥 ------------------------------ (1)
𝑔 𝑦 𝑑𝑦 = 𝑓 𝑥 𝑑𝑥 --------------------- (2)
𝑔 𝑦 𝑑𝑦 = 𝑓 𝑥 𝑑𝑥 + 𝑐 ---------- (3)
● Eqn. (1) is called a separable equation because in Eqn. (3) the variable are now
separated – x only appears only on the right and y only on the left.
Example: ODE giving tan x and exponential function as a solution.
𝑦′ = 1 + 𝑦2 tan−1 𝑦 + 𝑐1 = 𝑥 + 𝑐2
tan−1 𝑦 = 𝑥 + 𝑐2 − 𝑐1
𝑑𝑦 𝑑𝑦
= 1 + 𝑦2 = 𝑑𝑥 𝑦 = tan 𝑥 + 𝑐
𝑑𝑥 1 + 𝑦2 𝑤ℎ𝑒𝑟𝑒 𝑐 = 𝑐2 − 𝑐1
1
Integrating both side; 𝑑𝑦 = 𝑑𝑥 tan−1 𝑦 + 𝑐1 = 𝑥 + 𝑐2
1 + 𝑦2
𝑥 + 1 𝑒 −𝑥 𝑑𝑥
𝑦 = tan 𝑥 + 𝑐
Integrate by parts;
𝑢𝑣 ′ 𝑑𝑥 = 𝑢𝑣 − 𝑢′ 𝑣 𝑑𝑥
𝑦 ′ = 𝑥 + 1 𝑒 −𝑥 𝑦 2
𝑢 = 𝑥+1 𝑢′ = 1
𝑑𝑦 𝑑𝑦 𝑣 ′ = 𝑒 −𝑥 𝑣 = −𝑒 −𝑥
= 𝑥 + 1 𝑒 −𝑥 𝑦 2 2 = 𝑥 + 1 𝑒 −𝑥 𝑑𝑥 𝑥 + 1 𝑒 −𝑥 𝑑𝑥
𝑑𝑥 𝑦
= 𝑥 + 1 −𝑒 −𝑥 − −𝑒 −𝑥 𝑑𝑥
1 = 𝑥 + 1 −𝑒 −𝑥 − 𝑒 −𝑥
Integrating both side; 𝑑𝑦 = 𝑥+1 𝑒 −𝑥 𝑑𝑥 −𝑦 −1 =− 𝑥+2 𝑒 −𝑥 +𝑐 = −𝑥𝑒 −𝑥 − 𝑒 −𝑥 − 𝑒 −𝑥
𝑦2
1 = − 𝑥 + 2 𝑒 −𝑥 + c
𝑦=
𝑥 + 2 𝑒 −𝑥 − 𝑐
Example: A mixing problem for a single tank.
The tank contains 1000 litre of water in which initially 10 kg of salt is dissolved. Brine runs in at a
rate of 5 litre/min, and each litre contains 2 kg of dissolved salt. The mixture in the tank is kept
uniform by stirring. Find the amount of salt in the tank at any time t.
𝑦 ′ = 10 − 0.005𝑦
𝑑𝑦 𝑑𝑦
= −0.005 𝑦 − 2000 = −0.005 𝑑𝑡
𝑑𝑡 𝑦 − 2000
1
- Integrating both side; 𝑑𝑦 = −0.005 𝑑t ln 𝑦 − 2000 = −0.005𝑡 + 𝑐 ∗
𝑦 − 2000
𝑦 − 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𝑡 + 𝑐 ∗
∗
𝑦 − 2000 = 𝑒 −0.005𝑡+𝑐
∗
𝑦 0 = 2000 + 𝑐𝑒 −0.005(0) = 10 𝑐 = −1990 𝑦 − 2000 = 𝑒 −0.005𝑡 𝑒 𝑐
∗
𝑦 = 2000 + 𝑐𝑒 −0.005𝑡 where 𝑐 = 𝑒 𝑐
- Particular solution; Natural logarithm rules;
ln 𝑥 = 𝑦 , 𝑒𝑦 = 𝑥
𝑦 𝑡 = 2000 − 1990𝑒 −0.005𝑡 2500 Exponential laws;
𝑥 𝑎+𝑏 = 𝑥 𝑎 𝑥 𝑏
2000
1500
y(t) 1000
500
0
0 1000 2000 3000 4000 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;
𝑇 4 = 7.5 + 16.5𝑒 4𝑘 = 18 24
18 − 7.5 22
𝑒 4𝑘 = = 0.636
Inside temp. oC
16.5 20
1 18
𝑘 = 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.
2𝑥𝑦
a) 𝑦′ =
𝑥 2 +4
b) 𝑦 ′ = 𝑥𝑒 𝑦
𝑒𝑥
c) 𝑦′ =
1+𝑒 𝑥
1
d) 𝑧′ =
1 𝑡+2
e) 𝑦′ + 𝑥 + 2 𝑦 2 =0
f) 𝑦 ′ = 𝑦 + 9𝑥 2 𝑦 + 9𝑥 = 𝑣
g) 𝑦𝑦 ′ + 4𝑥 = 0 the initial value, 𝑦 0 = 3
𝑑𝑟 𝑑𝑟 𝜋
h) =𝑏 cos 𝜃 + 𝑟 sin 𝜃 the initial value, r =𝜋 for 0<𝑏<1
𝑑𝜃 𝑑𝜃 2
Homogeneous (Reduction to separable form)
● Certain non-separable ODEs can be made separable by introduce a new unknown
function to function of y.
● Such an ODE is sometimes called a homogeneous ODE – may be written in the form;
′
𝑦
𝑦 =𝑓 -------------- (1) 𝑦 = 𝑢𝑥
𝑥
By product differentiation;
𝑦
● The form of such an ODE, let we set = 𝑢; thus, 𝑑𝑦 𝑑 𝑢𝑥
= =
𝑑𝑢
.𝑥 +
𝑑𝑥
.𝑢
𝑥 𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑑𝑥
𝑦 = 𝑢𝑥 by differentiation; 𝑦 ′ = 𝑢′ 𝑥 + 𝑢 ------------ (2) = 𝑢′ 𝑥 + 𝑢
𝑑𝑢 𝑑𝑥
= -------------- (3)
𝑓 𝑢 −𝑢 𝑥
Example:
′
𝑦2 + 𝑥2 Find the particular solution for the differential equation that satisfy the
𝑦 =
2𝑥𝑦 initial condition y(1) = 2
𝑑𝑢 𝑢𝑥 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; 𝑑𝑢 = 𝑑𝑥 For the LHS, let 𝑎 = 1 − 𝑢2
1 − 𝑢2 𝑥
- Hence; 𝑑𝑎 = −2𝑢 𝑑𝑢
2𝑢 1
− ln 1 − 𝑢2 + 𝑐1 = ln 𝑥 + 𝑐2 𝑑𝑢 = − 𝑑𝑎
1 − 𝑢2 𝑎
ln 𝑥 + ln 1 − 𝑢2 = 𝐶 *𝐶 = 𝑐1 − 𝑐2
2𝑢
𝑑𝑢 = − ln 𝑎 + 𝑐1
ln 𝑥 1 − 𝑢2 =𝐶 1 − 𝑢2
𝑥 1 − 𝑢2 = 𝐴 *𝐴 = ∓𝑒 𝑐 2𝑢
2 𝑑𝑢 = − ln 1 − 𝑢2 + 𝑐1
𝑦 1−𝑢
- Know that 𝑢 = 𝑥
𝑦 2 - General solution can be written as;
𝑥 1− =𝐴
𝑥 𝑦(𝑥) = 𝑥 2 − 𝐴𝑥
𝑥 2 − 𝑦 2 = 𝐴𝑥 By applying the initial condition, 𝑦 1 = 2
𝑦 2 = 𝑥 2 − 𝐴𝑥 𝑦 1 = 12 − 𝐴 = 2 𝐴 = −3
a) 𝑦 ′ = 4𝑥 2 + 𝑦 2 / 𝑥𝑦
1
b) 𝑥𝑦 ′ = 𝑦 2 + 𝑦
2
c) 2𝑥𝑦𝑦 ′ = 𝑦 2 − 𝑥 2
d) 2𝑥𝑦𝑦 ′ = 3𝑦 2 + 𝑥 2 the initial value, 𝑦 1 = 2
𝑦 2𝑥 3
e) 𝑦′ = + cos 𝑥 2 the initial value, 𝑦 𝜋 2 = 𝜋
𝑥 𝑦
f) 𝑥𝑦 ′ = 𝑦 + 4𝑥 5 cos 2 𝑦 𝑥 the initial value, 𝑦 2 = 0
Exact ODEs.
𝑑𝑦 1 + 2𝑥𝑦 3
=− -------- (1)
𝑑𝑥 3𝑥 2 𝑦 2
In differential form;
1 + 2𝑥𝑦 3 𝑑𝑥 + 3𝑥 2 𝑦 2 𝑑𝑦 = 0 -------- (2)
● A first-order differential equation of the form;
The LHS is the differential of 𝑢 𝑥, 𝑦 = 𝑥 + 𝑥 2 𝑦 3
Prove: Let say the fn. u(x,y) has a continuous partial
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0 derivatives, it differential is;
𝜕𝑢 𝜕𝑢
𝑑𝑢 = 𝑑𝑥 + 𝑑𝑦
is called exact differential equation if and only if, 𝜕𝑥 𝜕𝑦
𝜕 𝑥 + 𝑥2𝑦3 𝜕 𝑥 + 𝑥2𝑦3
= 𝑑𝑥 + 𝑑𝑦
𝜕𝑀 𝜕𝑁 𝜕𝑥 𝜕𝑦
= = 1 + 2𝑥𝑦 3 𝑑𝑥 + 3𝑥 2 𝑦 2 𝑑𝑦
𝜕𝑦 𝜕𝑥 Therefore; 𝑑𝑢 = 0
By integration; 𝑑𝑢 = 𝑢 + 𝐶 = 0 i.e. 𝑢 = 𝐶
● The general solution of an exact equation is 𝑢 𝑥, 𝑦 = 𝑥 + 𝑥 2 𝑦 3 = 𝐶 is the general solution to (1)
given by;
Let generalize the method outline above;
𝑑𝑦 𝑀 𝑥, 𝑦
=− -------- (1a)
𝑑𝑥 𝑁 𝑥, 𝑦
𝐹 𝑥, 𝑦 = 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 𝐶 In differential form; 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0 -------- (2a)
Or; 𝑑𝐹 𝑥, 𝑦 = 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0
𝐹 𝑥, 𝑦 = 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 𝐶
From where this eqn. come?
* The general solution to (1a)
How to solve this integration?
Example:
′
3𝑥 2 − 2𝑦 2
𝑦 =− Find the general solution for the differential equation.
1 − 4𝑥𝑦
𝑑𝑦 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𝑥𝑦 2
= 3𝑥 2 − 2𝑦 2 𝑑𝑥 + 𝑓 𝑦
𝐹 𝑥, 𝑦 = 𝑥 3 − 2𝑥𝑦 2 + 𝑦
= 𝑥 3 − 2𝑥𝑦 2 + 𝑓 𝑦 ------------ (1)
- General solution for the exact ODE;
- 2nd step;
𝑥 3 − 2𝑥𝑦 2 + 𝑦 = 𝐶
𝐹 𝑥, 𝑦 = 𝑓(𝑥) + 𝑁 𝑥, 𝑦 𝑑𝑦
= 𝑓(𝑥) + 1 − 4𝑥𝑦 𝑑𝑦
- Check an exactness;
𝜕𝑀 𝜕𝑁
=
𝜕𝑦 𝜕𝑥
- From the general equation;
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0
i.e. 𝑀 𝑥, 𝑦 = 2𝑥𝑦
𝑁 𝑥, 𝑦 = 𝑥 2 + 3𝑦 2
𝜕𝑀 𝜕 2𝑥𝑦
= = 2𝑥
𝜕𝑦 𝜕𝑦
Exact.
𝜕𝑁 𝜕 𝑥2 + 3𝑦 2
= = 2𝑥
𝜕𝑥 𝜕𝑥
The general solution of an exact equation is given by;
𝐹 𝑥, 𝑦 = 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 𝐶
𝐹 𝑥, 𝑦 = 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑓 𝑦 𝑥 2𝑦 + 𝑓 𝑦 = 𝑓 𝑥 + 𝑥 2𝑦 + 𝑦3
𝑓 𝑥 = 𝑐1
= 2𝑥𝑦 𝑑𝑥 + 𝑓 𝑦
𝐹 𝑥, 𝑦 = 𝑥 2 𝑦 + 𝑦 3
= 𝑥 2𝑦 + 𝑓 𝑦 ------------ (1)
- General solution for the exact ODE;
- 2nd step;
𝑥 2𝑦 + 𝑦3 = 𝐶
𝐹 𝑥, 𝑦 = 𝑓(𝑥) + 𝑁 𝑥, 𝑦 𝑑𝑦
= 𝑓(𝑥) + 𝑥 2 + 3𝑦 2 𝑑𝑦
= 𝑓 𝑥 + 𝑥 2𝑦 + 𝑦3 ------------ (2)
𝜕𝑀 𝜕 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) 𝑥 − 𝑦 𝑑𝑥 − 𝑑𝑦 = 0
b) 𝑒 𝑦 − 𝑦𝑒 𝑥 𝑑𝑥 + 𝑥𝑒 𝑦 − 𝑒 𝑥 𝑑𝑦 = 0
c) 𝑒 𝑥 cos 𝑦 𝑑𝑥 − sin 𝑦 𝑑𝑦 = 0
1 𝑦 1 𝑥
d) 2𝑥 + − 𝑑𝑥 + 2𝑦 + − 𝑑𝑦 = 0
𝑦 𝑥2 𝑥 𝑦2
e) −2𝑥𝑦 sin 𝑥2
𝑑𝑥 + cos 𝑥 2 𝑑𝑦 = 0
f) − sin 𝑥𝑦 𝑦 𝑑𝑥 + 𝑥 𝑑𝑦 = 0 the initial value, 𝑦 1 = 𝜋
InExact ODEs.
● A first-order differential equation of the form;
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0
𝑓 𝑥 𝑑𝑥 1 𝜕𝑀 𝜕𝑁
𝑖 𝑥 =𝑒 where 𝑓 𝑥 = −
𝑁 𝜕𝑦 𝜕𝑥
𝑔 𝑦 𝑑𝑦 1 𝜕𝑁 𝜕𝑀
𝑖 𝑦 =𝑒 where 𝑔 𝑦 = −
𝑀 𝜕𝑥 𝜕𝑦
Example:
𝑑𝑦 2 3𝑦
=− − Solve the following differential equation.
𝑑𝑥 𝑦 2𝑥
2 𝑑𝑦 2 3𝑦
- In differential form; 4𝑥 + 3𝑦 𝑑𝑥 + 2𝑥𝑦 𝑑𝑦 = 0 𝑑𝑥
=− −
𝑦 2𝑥
- Check an exactness; 4𝑥 + 3𝑦 2
=−
𝜕𝑀 𝜕𝑁 2𝑥𝑦
= 4𝑥 + 3𝑦 2 𝑑𝑥 + 2𝑥𝑦 𝑑𝑦 = 0
𝜕𝑦 𝜕𝑥
- From the general equation;
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0
i.e. 𝑀 𝑥, 𝑦 = 4𝑥 + 3𝑦 2
𝑁 𝑥, 𝑦 = 2𝑥𝑦
𝜕𝑀 𝜕 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
= = 6𝑥 2 𝑦
𝜕𝑦 𝜕𝑦
Exact !!!
𝜕 𝑖𝑁 𝜕 2𝑥 3 𝑦
= = 6𝑥 2 𝑦
𝜕𝑥 𝜕𝑥
The general solution of an exact equation;
𝐹 𝑥, 𝑦 = 𝑖𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑖𝑁 𝑥, 𝑦 𝑑𝑦 = 𝐶
𝐹 𝑥, 𝑦 = 𝑖𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑓 𝑦 𝑥 4 + 𝑥 3𝑦2 + 𝑓 𝑦 = 𝑓 𝑥 + 𝑥 3𝑦2
𝑓 𝑦 = 𝑐1
= 4𝑥 3 + 3𝑥 2 𝑦 2 𝑑𝑥 + 𝑓 𝑦
𝐹 𝑥, 𝑦 = 𝑥 4 + 𝑥 3 𝑦 2 = 𝐶
= 𝑥 4 + 𝑥 3𝑦2 + 𝑓 𝑦 ------------ (1)
- General solution for the exact ODE;
- 2nd step;
𝑥 4 + 𝑥 3𝑦2 = 𝐶
𝐹 𝑥, 𝑦 = 𝑓(𝑥) + 𝑁 𝑥, 𝑦 𝑑𝑦
= 𝑓(𝑥) + 2𝑥 3 𝑦 𝑑𝑦
𝐹 𝑥, 𝑦 = 𝑖𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑖𝑁 𝑥, 𝑦 𝑑𝑦 = 𝐶
- Check an exactness;
𝜕𝑀 𝜕𝑁
=
𝜕𝑦 𝜕𝑥
- From the general equation;
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0
i.e. 𝑀 𝑥, 𝑦 = 𝑥𝑦 2 + 4𝑥 2 𝑦
𝑁 𝑥, 𝑦 = 3𝑥 2 𝑦 + 4𝑥 3
𝜕𝑀 𝜕 𝑥𝑦 2 + 4𝑥 2 𝑦
= = 2𝑥𝑦 + 4𝑥
𝜕𝑦 𝜕𝑦
Not exact !!!
𝜕𝑁 𝜕 3𝑥 2 𝑦
+ 4𝑥 3
= = 6𝑥𝑦 + 12𝑥 2
𝜕𝑥 𝜕𝑥
The differential equation;
𝑥𝑦 2 + 4𝑥 2 𝑦 𝑑𝑥 + 3𝑥 2 𝑦 + 4𝑥 3 𝑑𝑦 = 0
- Let the integrating factor, 𝐹 = 𝑥 𝑚 𝑦 𝑛 .
- Multiply the differential equation by integrating factor,
𝐹 𝑥𝑦 2 + 4𝑥 2 𝑦 𝑑𝑥 + 3𝑥 2 𝑦 + 4𝑥 3 𝑑𝑦 = 𝐹 0
𝑥 𝑚 𝑦 𝑛 𝑥𝑦 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)
𝑑𝑦 + 𝑝 𝑥 𝑦 − 𝑟 𝑥 𝑑𝑥 = 0
1 𝜕𝑀 𝜕𝑁 1
𝑓 𝑥 = − = 𝑝 𝑥 −0 =𝑝 𝑥
𝑁 𝜕𝑦 𝜕𝑥 1
𝑓 𝑥 𝑑𝑥 𝑝 𝑥 𝑑𝑥
𝑖 𝑥 =𝑒 =𝑒
● 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;
𝑝 𝑥 𝑑𝑥 𝑝 𝑥 𝑑𝑥
𝑑 𝑒 ∗𝑦 = 𝑒 𝑟 𝑥 𝑑𝑥
𝑝 𝑥 𝑑𝑥 𝑝 𝑥 𝑑𝑥
𝑒 ∗𝑦 = 𝑒 𝑟 𝑥 𝑑𝑥
𝑦 = 𝑒− 𝑝 𝑥 𝑑𝑥
𝑒 𝑝 𝑥 𝑑𝑥
𝑟 𝑥 𝑑𝑥 -------------------- (2)
Example:
𝑑𝑦
+ 2𝑥𝑦 = 4𝑥 Solve the following differential equation.
𝑑𝑥
2
- Compare with the eqn. (1); 𝑝 𝑥 = 2𝑥 𝑟 𝑥 = 4𝑥 𝑒 𝑥 . 4𝑥 𝑑𝑥
𝑦 = 𝑒− 𝑝 𝑥 𝑑𝑥
𝑒 𝑝 𝑥 𝑑𝑥
𝑟 𝑥 𝑑𝑥 2
𝑒 𝑥 . 4𝑥 𝑑𝑥 = 2 𝑒 𝑢 𝑑𝑢
= 2𝑒 𝑢 + 𝐶
𝑦 = 𝑒− 2𝑥 𝑑𝑥
𝑒 2𝑥 𝑑𝑥
4𝑥 𝑑𝑥 2𝑥 𝑑𝑥 = 𝑥 2
2
= 2𝑒 𝑥 + 𝐶
−𝑥 2 𝑥 2
𝑦= 𝑒 𝑒 4𝑥 𝑑𝑥
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 𝑥 𝑑𝑥
2 sin 𝑥 cos 𝑥 𝑑𝑥 Apply the initial value;
𝑦 𝑥 = 𝐶 cos 𝑥 − 2 cos2 𝑥
𝑦= 𝑒 ln cos 𝑥 𝑒 − ln cos 𝑥 2 sin 𝑥 cos 𝑥 𝑑𝑥
𝑦 0 = 𝐶 cos 0 − 2 cos2 0 = 1
1
𝑦 = cos 𝑥 2 sin 𝑥 cos 𝑥 𝑑𝑥 =𝐶−2=1
cos 𝑥
i. 𝑒. 𝐶 = 3
𝑦 = cos 𝑥 2 sin 𝑥 𝑑𝑥
The particular solution;
𝑦 = cos 𝑥 −2 cos 𝑥 + 𝐶 𝑦 = 3 cos 𝑥 − 2 cos 2 𝑥
𝑦 = 𝐶 cos 𝑥 − 2 cos 2 𝑥
Exercise 10
Find the general solution. If an initial condition is given, find also the corresponding particular
solution.
a) 𝑦 ′ = 4𝑦 + 𝑥
b) 𝑥 2 𝑦 ′ + 3𝑥𝑦 = 1 𝑥 𝑦 1 = −1
𝜋
c) 𝑦 ′ + 2𝑦 = 4 cos 2𝑥 𝑦 =2
4
2
d) 𝑦 ′ + 4𝑥 2 𝑦 = 4𝑥 2 − 𝑥 𝑒 −𝑥 /2
𝜋
e) 𝑦 ′ tan 𝑥 = 2𝑦 − 8 𝑦 =0
2
f) 𝑦 ′ + 𝑦 tan 𝑥 = 𝑒 −0.01𝑥 cos 𝑥 𝑦 0 =0
𝜋 4
g) 𝑦 ′ + cos 2 𝑥 + 3𝑦 = 1 𝑦 =
4 3