0% found this document useful (0 votes)
452 views54 pages

Chapter 1 - 1st Order Differential Equation - Part 1

The document discusses first order differential equations including concepts like initial and boundary value problems, methods of solution such as separating variables, and applications. It provides examples of common first order differential equations and their solutions.

Uploaded by

Hafzal Gani
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)
452 views54 pages

Chapter 1 - 1st Order Differential Equation - Part 1

The document discusses first order differential equations including concepts like initial and boundary value problems, methods of solution such as separating variables, and applications. It provides examples of common first order differential equations and their solutions.

Uploaded by

Hafzal Gani
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/ 54

Engineering Maths.

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

© 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
interpretation
● Before we can turn to methods of solution, we must first define
some basic concepts needed throughout this chapter. Modelling,
solving, interpreting
Some application of differential equations

* 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 𝑥 −3 𝑦 ′ − 4𝑦 2 = 0 (where 𝑥 ≠ 0) can be written


explicitly as 𝑦 ′ = 4𝑥 3 𝑦 2
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 𝑥 ≠ 0.
a) 𝑥𝑦 ′ = −𝑦 𝑦 = 𝑐/𝑥 (c an arbitrary constant)
b) 𝑦 ′ + 4𝑦 = 1.4, 𝑦 = 𝑐𝑒 −4𝑥 + 0.35
2
c) 𝑦 ′ + 5𝑥𝑦 = 0 𝑦 = 𝑐𝑒 −2.5𝑥
d) 𝑦 ′′ + 𝜋 2 𝑦 = 0 𝑦 = 𝑎 cos 𝜋𝑥 + 𝑏 sin 𝜋𝑥
e) 𝑦 ′′′ = cos 𝑥 𝑦 = −sin 𝑥 + 𝑎𝑥 2 + 𝑏𝑥 + 𝑐
f) 𝑦 ′′ + 𝑦 = 0 𝑦 = 𝑎 cos 𝑥 + 𝑏 sin 𝑥
g) 𝑦 ′′ + 2𝑦 ′ + 10𝑦 = 0 𝑦 = 4𝑒 −𝑥 sin 3𝑥
h) 𝑦 ′ + 2𝑦 = 4 𝑥 + 1 2 𝑦 = 5𝑒 −2𝑥 + 2𝑥 2 + 2𝑥 + 1
i) 𝑦 ′ tan 𝑥 = 2𝑦 − 8 𝑦 = 𝑐 sin2 𝑥 + 4
j) 𝑦′ + 𝑦 = 𝑥2 − 2 𝑦 = 𝑐𝑒 −𝑥 + 𝑥 2 − 2𝑥
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) 𝑦 ′ + 4𝑦 = 1.4 𝑦 = 𝑐𝑒 −4𝑥 + 0.35 𝑦 0 =2


2
b) 𝑦′ + 5𝑥𝑦 = 0 𝑦= 𝑐𝑒 −2.5𝑥 𝑦 0 =𝜋
1
c) 𝑦 ′ tan 𝑥 = 2𝑦 − 8 𝑦 = 𝑐 sin2 𝑥 + 4 𝑦 𝜋 =0
2
d) 𝑦 ′ = 0.5𝑦 𝑦 = 𝑐𝑒 0.5𝑥 𝑦 2 =2
1
e) 𝑦 ′ = 1 + 4𝑦 2 𝑦 = tan 2𝑥 + 𝑐 𝑦 0 =0
2
f) 𝑦′ = 𝑦 − 𝑥 𝑦 = 𝑐𝑒 𝑥 + 𝑥 + 1 𝑦 0 =3
2 1
g) 𝑦 ′ + 2𝑥𝑦 = 0 𝑦 = 𝑐𝑒 −𝑥 𝑦 1 =
𝑒
1
h) 𝑦 ′ = 𝑦 tan 𝑥 𝑦 = 𝑐 sec 𝑥 𝑦 0 = 𝜋
2
i) 𝑦′ + 2𝑦 = 2.8 𝑦 = 𝑐𝑒 −2𝑥 + 1.4 𝑦=1 when 𝑥=0
j) 𝑦𝑦 ′ = 2𝑥 𝑦 2 − 2𝑥 2 = 𝑐 𝑦 > 0 𝑦 1 = 3
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, 𝑦 ′′ = 𝑑2 𝑦/𝑑𝑡 2 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 𝑦 = 𝑔𝑡 2 /2.
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
𝑑𝑦 𝑑𝑦
= 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.

- 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; 𝑑𝑦 = −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;

𝑇 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

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

● Substitute (2) into (1);

𝑢′ 𝑥 + 𝑢 = 𝑓 𝑢 or 𝑢′ 𝑥 = 𝑓 𝑢 − 𝑢 if 𝑓 𝑢 − 𝑢 ≠ 0, 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; 𝑑𝑢 = 𝑑𝑥 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

- The particular solution;


𝑦 2 = 𝑥 2 + 3𝑥
Example:
𝑦 𝑦
𝑦′ = + tan Find the general solution for the differential equation.
𝑥 𝑥

Let 𝑦 = 𝑢𝑥 ; thus, 𝑦 ′ = 𝑢′ 𝑥 + 𝑢 Substitute into the differential eqn.


𝑑𝑢 sin 𝑢
𝑥 + 𝑢 = 𝑢 + tan 𝑢 =𝐴
𝑑𝑥 𝑥
𝑑𝑢 1 1 𝑦
𝑥 = tan 𝑢 Separating variable; 𝑑𝑢 = 𝑑𝑥 sin = 𝐴𝑥
𝑑𝑥 tan 𝑢 𝑥 𝑥
1 1 𝑦
- Integrating both side; 𝑑𝑢 = 𝑑𝑥 = sin−1 𝐴𝑥
tan 𝑢 𝑥 𝑥

ln sin 𝑢 + 𝑐1 = ln 𝑥 + 𝑐2 - General solution for the ODE;


ln sin 𝑢 − ln 𝑥 = 𝑐2 − 𝑐1 𝑦 = 𝑥 sin−1 𝐴𝑥
sin 𝑢 sin 𝑢
ln =𝐶 =𝐴 𝐴 = ∓𝑒 𝑐
𝑥 𝑥
Exercise 6
Solve the following differential equations.

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;

𝐹 𝑥, 𝑦 = 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 𝐶

- 1st step; Since 1 = 2 = 𝐹 𝑥, 𝑦 ;

𝐹 𝑥, 𝑦 = 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑓 𝑦 𝑥 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𝑥𝑦𝑑𝑥 + 𝑥 2 + 3𝑦 2 𝑑𝑦 = 0 Solve the following differential equation.

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

𝐹 𝑥, 𝑦 = 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 𝐶

- 1st step; Since 1 = 2 = 𝐹 𝑥, 𝑦 ;

𝐹 𝑥, 𝑦 = 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑓 𝑦 𝑥 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)

*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.
𝑑𝑥

- In differential form; 3𝑥 + 𝑦 𝑑𝑥 + 𝑥𝑑𝑦 = 0


- 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) 𝑥 − 𝑦 𝑑𝑥 − 𝑑𝑦 = 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

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;

𝑓 𝑥 𝑑𝑥 1 𝜕𝑀 𝜕𝑁
𝑖 𝑥 =𝑒 where 𝑓 𝑥 = −
𝑁 𝜕𝑦 𝜕𝑥

● If the integrating factor is a function of y alone, 𝑖 = 𝑖 𝑦 , then;

𝑔 𝑦 𝑑𝑦 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;

𝐹 𝑥, 𝑦 = 𝑖𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑖𝑁 𝑥, 𝑦 𝑑𝑦 = 𝐶

- 1st step; Since 1 = 2 = 𝐹 𝑥, 𝑦 ;

𝐹 𝑥, 𝑦 = 𝑖𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑓 𝑦 𝑥 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 𝑦 𝑑𝑦

= 𝑓 𝑥 + 𝑥 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.
1 𝜕𝑀 𝜕𝑁 1 2
- Check an exactness; 𝑓 𝑥 = − = −1 − 1 = −
𝑁 𝜕𝑦 𝜕𝑥 𝑥 𝑥
𝜕𝑀 𝜕𝑁
= - 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,
𝑦 1
i.e. 𝑀 𝑥, 𝑦 = −𝑦 − 2 𝑑𝑥 + 𝑑𝑦 = 0
𝑥 𝑥
𝑁 𝑥, 𝑦 = 𝑥
𝑦 1
𝑖𝑀 𝑥, 𝑦 = − 𝑖𝑁 𝑥, 𝑦 =
𝜕𝑀 𝜕 −𝑦 𝑥2 𝑥
= = −1
𝜕𝑦 𝜕𝑦 𝑦
𝜕 𝑖𝑀 𝜕 −
Not exact !!!
= 𝑥2 = − 1
𝜕𝑁 𝜕 𝑥
= =1 𝜕𝑦 𝜕𝑦 𝑥2
𝜕𝑥 𝜕𝑥 Exact
1
𝜕 𝑖𝑁 𝜕 𝑥 1
= =− 2
𝜕𝑥 𝜕𝑥 𝑥
The general solution of an exact equation;

𝐹 𝑥, 𝑦 = 𝑖𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑖𝑁 𝑥, 𝑦 𝑑𝑦 = 𝐶

- 1st step; Since 1 = 2 = 𝐹 𝑥, 𝑦 ;


𝑦 𝑦
𝐹 𝑥, 𝑦 = 𝑖𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑓 𝑦 +𝑓 𝑦 =𝑓 𝑥 +
𝑥 𝑥
𝑦
= − 𝑑𝑥 + 𝑓 𝑦 𝑓 𝑦 = 𝑐1 𝑓 𝑦 = 𝑐2
𝑥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

𝜕𝑀 𝜕 𝑥𝑦 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 𝑦 𝑛+2 + 4𝑥 𝑚+2 𝑦 𝑛+1


=
𝜕𝑦 𝜕𝑥 𝑁 𝑥, 𝑦 = 3𝑥 𝑚+2 𝑦 𝑛+1 + 4𝑥 𝑚+3 𝑦 𝑛

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


= = 𝑛 + 2 𝑥 𝑚+1 𝑦 𝑛+1 + 4 𝑛 + 1 𝑥 𝑚+2 𝑦 𝑛
𝜕𝑦 𝜕𝑦
𝜕𝑁 𝜕 3𝑥 𝑚+2 𝑦 𝑛+1 + 4𝑥 𝑚+3 𝑦 𝑛
= = 3 𝑚 + 2 𝑥 𝑚+1 𝑦 𝑛+1 + 4 𝑚 + 3 𝑥 𝑚+2 𝑦 𝑛
𝜕𝑥 𝜕𝑥
𝜕𝑀 𝜕 𝑥 𝑚+1 𝑦 𝑛+2 + 4𝑥 𝑚+2 𝑦 𝑛+1
= = 𝑛 + 2 𝑥 𝑚+1 𝑦 𝑛+1 + 4 𝑛 + 1 𝑥 𝑚+2 𝑦 𝑛
𝜕𝑦 𝜕𝑦
𝜕𝑁 𝜕 3𝑥 𝑚+2 𝑦 𝑛+1 + 4𝑥 𝑚+3 𝑦 𝑛
= = 3 𝑚 + 2 𝑥 𝑚+1 𝑦 𝑛+1 + 4 𝑚 + 3 𝑥 𝑚+2 𝑦 𝑛
𝜕𝑥 𝜕𝑥
- 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, 𝐹 = 𝑥 −1 𝑦1 = ;
𝑥
Exercise 8
1. Test for exactness, then solve the differential equation.
a) 𝑒 𝑥+𝑦 − 𝑦 𝑑𝑥 + 𝑥𝑒 𝑥+𝑦 + 1 𝑑𝑦 = 0
12, 14, 20
b) sin 𝑦 cos 𝑦 + 𝑥 cos 2 𝑦 𝑑𝑥 + 𝑥 𝑑𝑦 = 0
c) 𝑥 4 + 𝑦 2 𝑑𝑥 − 𝑥𝑦 𝑑𝑦 = 0 the initial value, 𝑦 2 = 1
1
d) 3𝑦 2 𝑑𝑥 + 𝑥 𝑑𝑦 = 0 the initial value, 𝑦 1 = 2
e) 2𝑥𝑦 𝑑𝑦 = 𝑥 2 + 𝑦 2 𝑑𝑥 the initial value, 𝑦 1 = 2

2. Under what condition is 𝑎𝑥 + 𝑏𝑦 𝑑𝑥 + 𝑘𝑥 + 𝑙𝑦 𝑑𝑦 = 0 exact? (a, b, k, l are constant.) Solve


for the exact equation.
3. Verify that 𝑦, 𝑥𝑦 3 and 𝑥 2 𝑦 5 are integrating factors of 𝑦 𝑑𝑥 + 2𝑥 𝑑𝑦 = 0 and solve.
Exercise 9
1. Show the given function is an integrating factor and solve.
a) sin 𝑦 𝑑𝑥 + cos 𝑦 𝑑𝑦 = 0, 𝑒𝑥
b) 𝑎 + 1 𝑦 𝑑𝑥 + 𝑏 + 1 𝑥 𝑑𝑦 = 0 𝑥𝑎 𝑦𝑏
c) 2𝑦 + 𝑥𝑦 𝑑𝑥 + 2𝑥 𝑑𝑦 = 0 1/𝑥𝑦

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


a) 2 cosh 𝑥 cos 𝑥 𝑦 𝑑𝑥 = sinh 𝑥 sin 𝑦 𝑑𝑦
b) 2 cos 𝑦 + 4𝑥 2 𝑑𝑥 = 𝑥 sin 𝑦 𝑑𝑦
c) 2𝑥 tan 𝑦 𝑑𝑥 + sec 2 𝑦 𝑑𝑦 = 0
d) 𝑥 −1 cosh 𝑦 𝑑𝑥 + sinh 𝑦 𝑑𝑦 = 0
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
𝑓 𝑥 = − = 𝑝 𝑥 −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;

𝑝 𝑥 𝑑𝑥 𝑝 𝑥 𝑑𝑥
𝑑 𝑒 ∗𝑦 = 𝑒 𝑟 𝑥 𝑑𝑥
𝑝 𝑥 𝑑𝑥 𝑝 𝑥 𝑑𝑥
𝑒 ∗𝑦 = 𝑒 𝑟 𝑥 𝑑𝑥

● 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)); 𝑢 = 𝑥2 𝑑𝑢 = 2𝑥 𝑑𝑥

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

- 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𝑥 = 2 sin 𝑥 cos 𝑥


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

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

You might also like