Chapter 1 - 1st Order Differential Equation - Part 1

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 57

Differential

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

© Bukhari bin Manshoor


1st Order Differential Equation
● Formation and solution of differential equation.
● Initial and boundary value problems.
● Methods of solution:
- Separating the variables.
- Homogeneous (Reduction to separable form)
- Linear.
- Exact.
● Application of first order differential equation:
- Growth population.
- Newton’s Law of cooling.
- Linear motion.
- Simple electric circuit.
Introduction
● 1st step in solving an engineering problem – formulate the
problem as a mathematical expression in terms of variables, Physical system
functions, and equations.
● The expression is known as a mathematical model.
Mathematical
● Setting up a model, solving it mathematically, and interpreting the model
result is called mathematical modelling or, briefly, modelling.
● Many physical concepts, such as velocity and acceleration, are Mathematical
derivatives – a model is called a differential equation. solution
● From the model, we can find a solution, explore its properties,
graph it, find values of it, and interpret it in physical terms.
Physical
● Before we can turn to methods of solution, we must first define interpretation
some basic concepts needed throughout this chapter. Modelling,
solving, interpreting
Some application of differential
equations

Anytime you wish to find out how


something changes with time (and
sometimes space), ODE’s is there…

* Source: Advanced Engineering Mathematics – Erwin Kreyszig


Basic Concepts
● Ordinary Differential Equations (ODEs):
- An equation that contains one or several derivatives of an unknown function, y(x)
(or sometimes y(t) if the independent variable is time t).
- The equation may also contain y itself, known functions of x (or t), and constants.
- Example:

′ 𝑑𝑦
𝑦= =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

or often in the form

𝑦′ = 𝑓 ( 𝑥 , 𝑦 ) -------- explicit form

● For instance, the implicit ODE (where ) can be written explicitly as


Concept of solution
● A function is called a solution of a given ODE on some open interval if is
defined and differentiable throughout the interval and is such that the equation
becomes an identity if y and are replaced with h and , respectively.
● The curve (the graph) of h is called a solution curve.
● Here, open interval means that the endpoints a and b are not regarded as points
belonging to the interval.
● Also, includes infinite intervals (the real line) as special cases.
Exercise 1
Verify that y is a solution of the ODEs for all
a) (c an arbitrary constant)
b)
c)
d)
e)
f)
g)
h)
i)
j)
Initial and Boundary Value
Problem
● Solution of ODE containing an arbitrary constant (e.g., c) is called a general solution
of the ODE.
● Geometrically, the general solution of an ODE is a family of infinitely many solution
curves, one for each value of the constant c.
● If we choose a specific c (e.g., c = 5.5 or 0 or -3.32) we obtain what is called a
particular solution of the ODE.
● A particular solution does not contain any arbitrary constants.
● 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.

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

Type of ODE 𝑭 (𝒙, 𝒚)

Separable 𝐹 ( 𝑥 , 𝑦 )= 𝑓 ( 𝑥 ) 𝑔 ( 𝑦 )

Homogeneous
Exact
𝑀 (𝑥 , 𝑦)
𝐹 ( 𝑥 , 𝑦 )=−
𝑁 (𝑥, 𝑦)
Linear
𝐹 ( 𝑥 , 𝑦 )=𝑟 ( 𝑥 ) −𝑝 ( 𝑥 ) 𝑦
Separating variables. By calculus;
● Many practically useful ODEs can be reduced to the form; ′ 𝑑𝑦
𝑦=
𝑑𝑥

𝑔 ( 𝑦 ) 𝑦 = 𝑓 ( 𝑥) ------------------------------ (1)

● By algebraic manipulation, the ODEs above be more convenient to written as;

𝑔 ( 𝑦 ) 𝑑 𝑦= 𝑓 ( 𝑥 ) 𝑑𝑥 --------------------- (2)

● To solve the ODEs, integrate both sides wrt x, obtaining;

∫ 𝑔 ( 𝑦 ) 𝑑𝑦=∫ 𝑓 ( 𝑥) 𝑑𝑥 ---------- (3)

● This method of solving ODEs is called the Method of separating variables.


● 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
𝑑𝑦 2 𝑑𝑦
=1+ 𝑦 = 𝑑𝑥 𝑦 =tan ( 𝑥 +𝑐   )
𝑑𝑥 ( 1+ 𝑦 2 ) 𝑤h𝑒𝑟𝑒 𝑐=𝑐 2 −𝑐 1

1
Integrating both side; ∫( 𝑑𝑦 =∫ 𝑑𝑥   tan −1 𝑦 +𝑐1 = 𝑥+𝑐 2
1+𝑦 )
2

𝑦 =tan ( 𝑥 +𝑐   ) ∫ 𝑑𝑥
( 𝑥+1 ) 𝑒 −𝑥
Integrate by parts;

𝑦 ′ = ( 𝑥 +1 ) 𝑒− 𝑥 𝑦 2 ∫ 𝑢𝑣 ′
𝑑𝑥=𝑢𝑣− ∫ 𝑣𝑑𝑥
𝑢 ′
𝑢= ( 𝑥 +1 ) 𝑢 ′ =1

𝑑𝑦 𝑑𝑦 𝑣 ′ =𝑒 − 𝑥 𝑣 =− 𝑒 − 𝑥

∫¿ ( 𝑥+1) (−𝑒𝑑𝑥−𝑥) − −𝑒−𝑥 𝑑𝑥


−𝑥
= ( 𝑥 +1 ) 𝑒− 𝑥 𝑦 2 = ( 𝑥 +1 ) 𝑒 𝑑𝑥 −𝑥
𝑑𝑥 𝑦
2
( 𝑥+1 ) 𝑒
1 ¿ ( 𝑥+1 ) ( − 𝑒
∫ ) − ( 𝑒− 𝑥 )
∫ 𝑦2 ∫
−𝑥
−𝑥
Integrating both side; 𝑑𝑦= ( 𝑥+1 ) 𝑒 𝑑𝑥   −𝑦 −1
=− ( 𝑥 +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.

- Let y(t) is the amount of salt in the tank at any time.


′ 𝑑𝑦
𝑦= Rate of change of the salt content in the tank.
𝑑𝑡
¿ salt   inflow   rate  −  salt   outflow   rate Brine runs into a tank.
- Salt inflow rate = 2 kg salts x 5 litres brine = 10 kg (1 litre brine contain 2 kg salts)
- Salt outflow rate = y(t) kg salts x 5/1000 litres brine = 0.005 y(t)
- Therefore, rate of change of the salt content in the tank can be written in ODE as;

𝑦 ′ =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𝑡 𝑒𝑐

𝑦 =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 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)

d) the initial value,

e) the initial value, r


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) ¿ 𝑢′ 𝑥+ 𝑢

● Substitute (2) into (1);

𝑢′ 𝑥 +𝑢= 𝑓 ( 𝑢 ) or 𝑢′ 𝑥= 𝑓 ( 𝑢 ) −𝑢 if this eqn. can be separated:

𝑑𝑢 𝑑𝑥
= -------------- (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 𝑢|+𝑐 1= ln|𝑥|+𝑐 2 - General solution for the ODE;


ln |sin 𝑢|− ln|𝑥|=𝑐 2 − 𝑐1 𝑦 =𝑥 sin− 1 𝐴𝑥  

ln | |
sin 𝑢
𝑥
=𝐶
sin 𝑢
𝑥
= 𝐴 ( 𝐴 =∓ 𝑒 )
𝑐
Exercise 6
Solve the following differential equations.

a) the initial value,


b) the initial value,
c) the initial value,
1+2 𝑥 𝑦 3
Exact ODEs.
𝑑𝑦
=− -------- (1)
𝑑𝑥 2 2
3𝑥 𝑦
I n differential form ;
( 1+2 𝑥 𝑦 3 ) 𝑑𝑥+ ( 3 𝑥 2 𝑦 2 ) 𝑑𝑦 =0
● A first-order differential equation of the form; -------- (2)

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;
By integration; i.e.
● The general solution of an exact equation is 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?
Step in solving Exact ODEs
● Step 1 – Write the differential equation in the form of
Check the exactness of the differential equation, that is;
𝜕𝑀 𝜕𝑁
=
𝜕𝑦 𝜕𝑥
● Step 2 – Assume is a solution and let 𝜕𝑢 𝜕𝑢
=𝑀 and =𝑁
𝜕𝑥 𝜕𝑦
𝜕𝑢
● Step 3 – Obtain by using 𝑢=∫ 𝑑𝑥+𝑔(𝑦)
𝜕𝑥 𝜕𝑢
● Step 4 – Differentiate with respect to and compare with =𝑁to obtain .
𝜕𝑦
● Step 5 – Write the solution in the form of where is arbitrary constant.

● Step 6 – Consider the initial condition, if applicable.


Example:
𝑑𝑦 2 𝑥𝑦
=− Solve the following differential equation.
𝑑𝑥 4 𝑦 +𝑥
2

𝑑𝑦 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+ 𝐶

𝑢=∫ 2𝑥𝑦𝑑𝑥=𝑥 𝑦+𝑔(𝑦) 2 Substitute into the solution;


𝑢( 𝑥 , 𝑦 )=𝑥 2 𝑦 +2 𝑦 2 =𝐶
𝜕 𝑢 𝜕 ( 𝑥 𝑦 +𝑔 ( 𝑦 ) )
2
2
= =𝑥 + 𝑔 ′ ( 𝑦 ) ------ (3)
𝜕𝑦 𝜕𝑦

Compare (2) & (3) to obtain


4 𝑦 + 𝑥 2= 𝑥 2+𝑔 ′ ( 𝑦)

Therefore,

*Integrate w.r.t x, function of y become constant


*Integrate w.r.t y, function of x become constant
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;

𝐹 ( 𝑥,𝑦 )=∫ 𝑀 ( 𝑥,𝑦 ) 𝑑𝑥+𝑁 ( 𝑥,𝑦 ) 𝑑𝑦=𝐶


- 1st step; Since ;

𝐹 ( 𝑥,𝑦 )=∫ 𝑀 ( 𝑥,𝑦 ) 𝑑𝑥+𝑓 ( 𝑦 ) 𝑥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𝑥𝑦 ) 𝑑𝑦
2
¿ 𝑓 ( 𝑥 ) + 𝑦 − 2 𝑥𝑦 ------------ (2)

*Integrate w.r.t x, function of y become constant


*Integrate w.r.t y, function of x become constant
Example:
2 𝑥𝑦𝑑𝑥 + ( 𝑥 +3 𝑦 ) 𝑑𝑦 =0
2 2
Solve the following differential equation.

- 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;

𝐹 ( 𝑥,𝑦 )=∫ 𝑀 ( 𝑥,𝑦 ) 𝑑𝑥+𝑁 ( 𝑥,𝑦 ) 𝑑𝑦=𝐶


- 1st step; Since ;

𝐹 ( 𝑥,𝑦 )=∫ 𝑀 ( 𝑥,𝑦 ) 𝑑𝑥+𝑓 ( 𝑦 ) 𝑥2 𝑦 + 𝑓 ( 𝑦 ) = 𝑓 ( 𝑥 ) + 𝑥2 𝑦 + 𝑦 3

¿∫ ( 2𝑥𝑦 ) 𝑑𝑥+𝑓 ( 𝑦 ) 𝑓 ( 𝑥 )=𝑐1


𝐹 ( 𝑥 , 𝑦 )=𝑥 2 𝑦 + 𝑦 3
¿ 𝑥2 𝑦 + 𝑓 ( 𝑦 ) ------------ (1)
- General solution for the exact ODE;
- 2nd step;
𝑥2 𝑦 + 𝑦 3=𝐶
𝐹 ( 𝑥,𝑦 )=∫ 𝑓 (𝑥)+𝑁 ( 𝑥,𝑦 ) 𝑑𝑦
¿∫ 𝑓 (𝑥)+ ( 𝑥 +3 𝑦 ) 𝑑𝑦
2 2
2 3
¿ 𝑓 ( 𝑥 ) +𝑥 𝑦 + 𝑦 ------------ (2)

*Integrate w.r.t x, function of y become constant


*Integrate w.r.t y, function of x become constant
Example:
𝑑𝑦
𝑥 +3 𝑥+ 𝑦= 0 Solve the following differential equation.
𝑑𝑥

( 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

is called inexact differential equation if,


𝜕𝑀 𝜕𝑁

𝜕 𝑦 𝜕𝑥

● It can always be made exact by multiplying integrating factor that obeys;

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

● 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

- 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
2
= =6 𝑥 𝑦
𝜕𝑦 𝜕𝑦
Exact !!!
𝜕 ( 𝑖𝑁 ) 𝜕 ( 2 𝑥 𝑦 )
3
2
= =6 𝑥 𝑦
𝜕𝑥 𝜕𝑥
The general solution of an exact equation;

𝐹 ( 𝑥,𝑦 )=∫ 𝑖𝑀 ( 𝑥,𝑦 ) 𝑑𝑥+𝑖𝑁 ( 𝑥,𝑦 ) 𝑑𝑦=𝐶


- 1st step; Since ;

𝐹 ( 𝑥,𝑦 )=∫ 𝑖𝑀 ( 𝑥,𝑦 ) 𝑑𝑥+𝑓 ( 𝑦 )


4 3 2 3 2
𝑥 +𝑥 𝑦 + 𝑓 ( 𝑦 ) = 𝑓 ( 𝑥 ) + 𝑥 𝑦

¿∫ ( 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)

*Integrate w.r.t x, function of y become constant


*Integrate w.r.t y, function of x become constant
Example:
−2
−2 ln 𝑥 ln 𝑥 −2
𝑒 =𝑒 =𝑥
− 𝑦 𝑑𝑥 +𝑥 𝑑𝑦 =0 Solve the following
differential equation.
- Check an exactness; 𝑓 ( 𝑥 )= (
1 𝜕𝑀 𝜕𝑁
𝑁 𝜕𝑦

𝜕𝑥
1
= ( −1 −1 )=−
𝑥
2
𝑥 )
𝜕𝑀 𝜕𝑁
= - The integrating factor that have only the function of x,
𝜕𝑦 𝜕𝑥
∫𝑓 ( 𝑥 ) 𝑑𝑥 ∫ − 2𝑥 𝑑𝑥 1
- From the general equation; 𝑖 ( 𝑥 )= 𝑒 =𝑒 = 𝑒− 2 ln 𝑥 = 2
𝑥
𝑀 ( 𝑥 , 𝑦 ) 𝑑𝑥+ 𝑁 ( 𝑥 , 𝑦 ) 𝑑𝑦 =0 - Multiply the differential equation by integrating factor,

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;

𝐹 ( 𝑥,𝑦 )=∫ 𝑖𝑀 ( 𝑥,𝑦 ) 𝑑𝑥+𝑖𝑁 ( 𝑥,𝑦 ) 𝑑𝑦=𝐶


- 1st step; Since ;

𝐹 ( 𝑥,𝑦 )=∫ 𝑖𝑀 ( 𝑥,𝑦 ) 𝑑𝑥+𝑓 ( 𝑦 )


𝑦 𝑦
+ 𝑓 ( 𝑦 )= 𝑓 ( 𝑥 ) +
𝑥 𝑥

¿∫ −
( ) 𝑦
𝑥
2
𝑑𝑥+ 𝑓 ( 𝑦 ) 𝑓 ( 𝑦 )=𝑐1
𝑦
𝑓 ( 𝑦 )=𝑐 2

𝑦 ------------ (1) 𝐹 ( 𝑥 , 𝑦 )= =𝐶
¿ +𝑓 (𝑦) 𝑥
𝑥
- General solution for the exact ODE;
- 2nd step;

𝐹 ( 𝑥,𝑦 )=∫ 𝑓 (𝑥)+𝑁 ( 𝑥,𝑦 ) 𝑑𝑦


𝑦
=𝐶
𝑥

¿∫ 𝑓 (𝑥)+ ()
1
𝑥
𝑑𝑦
𝑦
¿ 𝑓 (𝑥 )+ ------------ (2)
𝑥

*Integrate w.r.t x, function of y become constant


*Integrate w.r.t y, function of x become constant
Example:

( 𝑥 𝑦 2+ 4 𝑥 2 𝑦 ) 𝑑𝑥 + ( 3 𝑥2 𝑦 + 4 𝑥 3 ) 𝑑𝑦 =0 Solve the following differential equation.

- 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 𝑦 𝑛 )

𝜕 𝑀 𝜕(𝑥 𝑦 𝑛+2 + 4 𝑥𝑚 +2 𝑦 𝑛+1 )


𝑚 +1
𝑚+1 𝑛 +1 𝑚 +2 𝑛
= = (𝑛+ 2 ) 𝑥 𝑦 + 4 ( 𝑛+1 ) 𝑥 𝑦
𝜕𝑦 𝜕𝑦
𝜕𝑁 𝜕( 3 𝑥 𝑚+ 2
𝑦 𝑛+1 +4 𝑥 𝑚+ 3 𝑦 𝑛 ) 𝑚+1 𝑛 +1 𝑚+2 𝑛
= =3 (𝑚+ 2 ) 𝑥 𝑦 + 4 ( 𝑚+3 ) 𝑥 𝑦
𝜕𝑥 𝜕𝑥
𝜕 𝑀 𝜕(𝑥 𝑦 𝑛+2 + 4 𝑥𝑚 +2 𝑦 𝑛+1 )
𝑚 +1
𝑚+1 𝑛 +1 𝑚 +2 𝑛
= = (𝑛+ 2 ) 𝑥 𝑦 + 4 ( 𝑛+1 ) 𝑥 𝑦
𝜕𝑦 𝜕𝑦
𝜕𝑁 𝜕( 3 𝑥 𝑚+ 2
𝑦 𝑛+1 +4 𝑥 𝑚+ 3 𝑦 𝑛 ) 𝑚+1 𝑛 +1 𝑚+2 𝑛
= =3 (𝑚+ 2 ) 𝑥 𝑦 + 4 ( 𝑚+3 ) 𝑥 𝑦
𝜕𝑥 𝜕𝑥
- From the above, we conclude that;
(1)------ ( 𝑛+2 )= 3 ( 𝑚+2 ) Solve these equations to obtain the constant of m and n,
(2)------ 4 ( 𝑛+1 ) =4 ( 𝑚+3 ) hence obtain the integrating factor,
(1) x -4 − 4 𝑛 −8=− 12𝑚 − 24 ------ (3)
4 𝑛+4=4 𝑚+12 ------ (2)
(3) + (2) − 4=− 8 𝑚− 12
8=− 8 𝑚
𝑚=−1 Substitute into (1), 𝑛=1
- Therefore, the integrating factor, ;
Exercise 8
1. Test for exactness, then solve the differential equation.

12, 14, 20

a) the initial value,


b) the initial value,
c) the initial value,

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.

2. Find an integrating factor and solve the following differential equations.


Linear ODEs
● A first-order ODE is said to be linear if it can be brought into the form;

𝑦 ′ +𝑝 ( 𝑥 ) 𝑦= 𝑟 ( 𝑥 ) -------------------- (1)

● Linear first-order ODEs is a special case of inexact ODEs.


● Such equations can be made exact by multiplying with an appropriate integrating
factor (as discussed in previous slide)
● For the purpose, let the equation (1) above written as below:

𝑑𝑦 + ( 𝑝 ( 𝑥 ) 𝑦 − 𝑟 ( 𝑥 ) ) 𝑑𝑥=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.
𝑑𝑥

- Compare with the eqn. (1); 𝑝 ( 𝑥 ) =− 1 𝑟 ( 𝑥 ) =𝑒 2 𝑥


- By using the general solution for linear ODEs (eqn. (2));

𝑦=𝑒 (𝑒 𝑟 ( 𝑥 ) 𝑑𝑥
−∫ 𝑝 ( 𝑥 ) 𝑑𝑥
∫ ∫ 𝑝 ( 𝑥) 𝑑𝑥 )

𝑦=𝑒
−∫ − 1𝑑𝑥
∫ ( 𝑒 ) 𝑒 𝑑𝑥
∫ −1𝑑𝑥 2𝑥

𝑦 =𝑒 ∫ ( 𝑒 ) 𝑒 𝑑𝑥
𝑥 −𝑥 2𝑥

𝑦 =𝑒 ∫ 𝑒 𝑑𝑥
𝑥 𝑥

𝑦 =𝑒 𝑥 ( 𝑒 𝑥 + 𝐶 )

𝑦 =𝑒 2 𝑥 + 𝐶 𝑒 𝑥
Example:
𝑑𝑦
+ 𝑦 tan 𝑥=sin 2 𝑥 𝑦 ( 0 ) =1 Solve the following differential equation.
𝑑𝑥

- Compare with the eqn. (1); 𝑝 ( 𝑥 )= tan 𝑥 𝑟 ( 𝑥 )= sin 2 𝑥= 2sin 𝑥 cos 𝑥


- By using the general solution for linear ODEs (eqn. (2));

𝑦=𝑒
−∫ 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

𝑦 =cos 𝑥 ∫ 2 sin 𝑥 cos 𝑥 𝑑𝑥 ¿ 𝐶 − 2= 1


cos 𝑥
𝑦=cos 𝑥 ∫ 2sin 𝑥 𝑑𝑥
i . 𝑒 . 𝐶 =3
The particular solution;
𝑦 =cos 𝑥 ( − 2 cos 𝑥+ 𝐶 )
𝑦 =3 cos 𝑥 − 2 cos 2 𝑥
𝑦 =𝐶 cos 𝑥 − 2 cos2 𝑥
Exercise 10
Find the general solution. If an initial condition is given, find also the corresponding particular
solution.

You might also like