Course Material 2
Course Material 2
Differential Equations
Concordia University
Course Material 2
1
Outline
• 2.2 First-order separable differential equations
• 2.3 First-order linear differential equation
• 2.4 Exact Equations
– Change a non-exact differential equation into an
exact one
2
2.2 First-order separable
differential equations
First-order separable differential
equations
• Consider
𝑑𝑦
= 𝑓(𝑥, 𝑦) f1 Estatgex
𝑑𝑥
Lotdevirative ç
𝑑𝑦
– When 𝑓(𝑥, 𝑦) does not depend on 𝑦, i.e., =
𝑑𝑥
𝑔(𝑥), the DE can be solved by integration
– The solution 𝑦 = 𝑥 𝐺 = 𝑥𝑑 𝑥 𝑔 + 𝑐, where
𝐺 𝑥 is an antiderivative (indefinite integral).
– The function 𝑔 𝑥 is termed elementary when it
possesses an antiderivative.
– The function 𝑔(𝑥) is termed nonelementary when
it does not possess an antiderivative.
separate in product of 2functions
4
Example:
𝑑𝑦 3𝑥+2 sin 𝑥
= 3 + 2 cos 𝑥 𝑒
𝑑𝑥
𝑦 = න 3 + 2 cos 𝑥 𝑒 3𝑥+2 sin 𝑥 𝑑𝑥 integrate
Let
𝑢 = 3𝑥 + 2 sin 𝑥
ou sub
𝑑𝑢 = 3 + 2 cos 𝑥 𝑑𝑥
𝑦 = න𝑒 𝑢 𝑑𝑢 = 𝑒 𝑢 + 𝑐 = 𝑒 3𝑥+2 sin 𝑥 + 𝑐
5
First-order separable differential
equations (cont’d.) hey pty
6
𝑑𝑦 𝑔 𝑥
=
𝑑𝑥 𝑝 𝑦
𝑝 𝑦 𝑑𝑦 = 𝑔 𝑥 𝑑𝑥
න𝑝 𝑦 𝑑𝑦 = න𝑔 𝑥 𝑑𝑥
𝑃 𝑦 + 𝑐1 = 𝐺 𝑥 + 𝑐2JeambInc
𝑃 𝑦 =𝐺 𝑥 +𝑐 Cz C
C
𝑃 𝑦 = 𝐺 𝑥 + 𝑐 an implicit solution to
the DE.
7
Example:
𝑑𝑦 2𝑥 + 𝑥𝑦
= 2
𝑑𝑥 𝑦 +1
is separable, since
𝑑𝑦 2+𝑦 𝑔 𝑥
=𝑥 2
=𝑔 𝑥 ℎ 𝑦 =
𝑑𝑥 𝑦 +1 𝑝 𝑦
where Ë ça 3 y
𝑔 𝑥 =𝑥
2
2+𝑦 𝑦 +1
ℎ 𝑥 = 2 𝑜𝑟 𝑝 𝑦 =
𝑦 +1 2+𝑦
next
fly 8
Example:
𝑑𝑦
= 1 + 𝑥𝑦
𝑑𝑥
separate
is not separable
1 Is it separable
if lineary
9
Example:
𝑑𝑦 𝑥 − 5
=
𝑑𝑥 𝑦2
is separable. Therefore,
𝑦 2 𝑑𝑦 = 𝑥 − 5 𝑑𝑥 rearrange
Integrating both sides: y with dy
with dx
න𝑦 2 𝑑𝑦 = න 𝑥 − 5 𝑑𝑥
𝑦3 𝑥2
= − 5𝑥 + 𝑐1 , implicit solution
3 2
3
3 2
𝑦 = 𝑥 − 15𝑥 + 3𝑐1
2
3 2
1
3
L
𝑦= 𝑥 − 15𝑥 + 𝑐 , explicit solution
2
10
Example:
Solve the nonlinear first-order DE:
𝑑𝑦 6𝑥 5 − 2𝑥 + 1
=
𝑑𝑥 cos 𝑦 + 𝑒 𝑦
Separating the variables and integrating:
cos 𝑦 + 𝑒 𝑦 𝑑𝑦 = 6𝑥 5 − 2𝑥 + 1 𝑑𝑥
න cos 𝑦 + 𝑒 𝑦 𝑑𝑦 = න 6𝑥 5 − 2𝑥 + 1 𝑑𝑥
sin 𝑦 + 𝑒 𝑦 = 𝑥 6 − 𝑥 2 + 𝑥 + 𝑐
This is an implicit solution, we cannot obtain an
explicit solution, which is often the case in solving
nonlinear DEs.
11
Example:
Solve the initial-value problem:
𝑑𝑦 𝑦 − 1
= , 𝑦 −1 = 0 to obtain value
𝑑𝑥 𝑥 + 3
Separating the variables and integrating: afc
1 1
𝑑𝑦 = 𝑑𝑥
𝑦−1 𝑥+3
1 1
න 𝑑𝑦 = න 𝑑𝑥
𝑦−1 𝑥+3
ln 𝑦 − 1 = ln 𝑥 + 3 + 𝑐1 (1)
Exponentiating both sides:
𝑒 ln 𝑦−1 = 𝑒 ln 𝑥+3 +𝑐1 log propriety
𝑐 ln 𝑥+3 2
𝑦−1 =𝑒 𝑒 1
𝒚 − 𝟏 = 𝒆 𝒄𝟏 𝒙 + 𝟑
12
𝑦 − 1 = 𝑒 𝑐1 𝑥 + 3
Depending on the value of 𝑦
𝑦 − 1 = ±(𝑦 − 1) dependson
𝑐1 = − ln 2 have explicit
to find C
just do it
directly on implicit 14
Thus, from (1) :
ln 𝑦 − 1 = ln 𝑥 + 3 − ln 2
𝑥+3
= ln
2
𝑥+3
𝑦−1= ± 2 solutions
2
Only the minus sign satisfies the initial condition
𝑥+3 1
𝑦−1= − ➔ 𝑦= − 𝑥+1 soi
spects
2 2 on d
initial
This solution agrees with the one given by (2)
15
2.3 First-order linear
differential equation
First-order linear differential equation
• A first-order linear DE of the form:
𝑑𝑦
𝑎1 𝑥 + 𝑎0 𝑥 𝑦 = 𝑔 𝑥 1
𝑑𝑥
is linear equation in the dependent variable 𝑦.
• The DE is homogeneous when 𝑔 𝑥 = 0; otherwise, it
is nonhomogeneous.
• The standard form of a linear DE is obtained by
dividing both sides by the lead coefficient.
𝒅𝒚
+𝑷 𝒙 𝒚=𝒇 𝒙 (𝟐)
𝒅𝒙
𝑎0 𝑥 𝑔 𝑥
where 𝑃 𝑥 = and 𝑓 𝑥 =
𝑎1 𝑥 𝑎1 𝑥
17
Property of the standard form (2):
Its solution 𝑦 is given by
𝑦 = 𝑦𝑐 + 𝑦𝑝 ,
where 𝑦𝑐 is a solution of the associated
homogeneous equation:
𝑑𝑦
+𝑃 𝑥 𝑦 =0 (3)
𝑑𝑥
It means that
𝑑𝑦𝑐
+ 𝑃 𝑥 𝑦𝑐 = 0 (4)
𝑑𝑥
41ᵉ Pix yo 18
𝑦𝑝 is the particular solution of the nonhomogeneous equation
which can be solved using the variation of parameters
method.
It means that
𝑑𝑦𝑝
+ 𝑃 𝑥 𝑦𝑝 = 𝑓(𝑥) (5)
𝑑𝑥
Substituting 𝑦 = 𝑦𝑐 + 𝑦𝑝 to the LHS of 2 :
𝑑𝑦 pa
𝐿𝐻𝑆 =
𝑑𝑥
+𝑃 𝑥 𝑦
dyj
𝑑
36= 𝑑𝑥 𝑦𝑐 + 𝑦𝑝 + 𝑃 𝑥 𝑦𝑐 + 𝑦𝑝
𝑑𝑦𝑐 𝑑𝑦𝑝
2 =
ID
𝑑𝑥
+ 𝑃 𝑥 𝑦𝑐 +
0 (𝑢𝑠𝑖𝑛𝑔 4 )
𝑑𝑥
+ 𝑃 𝑥 𝑦𝑝
𝑓 𝑥 (𝑢𝑠𝑖𝑛𝑔 5 )
=𝑓 𝑥
= 𝑅𝐻𝑆 𝑜𝑓 (2)
19
(i) The homogeneous DE
𝑑𝑦
+𝑃 𝑥 𝑦 =0
𝑑𝑥
Separation of variables
𝑑𝑦
= −𝑃 𝑥 𝑑𝑥
𝑦
𝑑𝑦
න = − න𝑃 𝑥 𝑑𝑥
𝑦
ln 𝑦 = − න𝑃 𝑥 𝑑𝑥 + c1
solution of 𝑦𝑐 = 𝑐𝑒 − 𝑃 𝑥 𝑑𝑥
= 𝑐𝑦1
Homogeneous
part
where for convenience, we have denoted 𝑒 − 𝑃 𝑥 𝑑𝑥
as
𝑦1 .
20
(ii) The nonhomogeneous DE
𝑑𝑦
+𝑃 𝑥 𝑦 =𝑓 𝑥 (2)
𝑑𝑥
Find the particular solution 𝑦𝑝 of (2) by the
method of the variation of parameter.
Find a function 𝑢(𝑥) such that
Hors 𝑦 = 𝑢 𝑥 𝑦
− 𝑥𝑑 𝑥 𝑃
parti 𝑝 1 𝑥 = 𝑢 𝑥 𝑒 (3)
parameter
is the solution of (2)
𝑑𝑦𝑝
+ 𝑃 𝑥 𝑦𝑝 = 𝑓 𝑥
𝑑𝑥
𝑑
𝑢 𝑦1 + 𝑃 𝑥 𝑢 𝑦1 = 𝑓 𝑥
𝑑𝑥
21
𝑑
𝑢 𝑦1 + 𝑃 𝑥 𝑢 𝑦1 = 𝑓 𝑥
𝑑𝑥
𝑑𝑦1 𝑑𝑢
𝑢 + 𝑦1 + 𝑃 𝑥 𝑢 𝑦1 = 𝑓 𝑥
𝑑𝑥 𝑑𝑥
𝑑𝑦1 𝑑𝑢
𝑢 + 𝑃 𝑥 𝑦1 + 𝑦1 =𝑓 𝑥
𝑑𝑥 𝑑𝑥
0 homogenous part
𝑑𝑢
𝑦1 =𝑓 𝑥
𝑑𝑥
Separating the variables in the above
equation:
22
𝑑𝑢
𝑦1 =𝑓 𝑥
𝑑𝑥
Separating the variables in the above equation:
𝑓 𝑥
𝑑𝑢 = 𝑑𝑥 separate
𝑦1 𝑥
Integrating both sides:
𝑓 𝑥 𝑓 𝑥
𝑢=න 𝑑𝑥 = න − 𝑃 𝑥 𝑑𝑥 𝑑𝑥
𝑦1 𝑥 𝑒
sing 𝑢 = න𝑒 𝑃 𝑥 𝑑𝑥
𝑓 𝑥 𝑑𝑥 (4)
23
− 𝑥𝑑 𝑥 𝑃 𝑥𝑑 𝑥 𝑃
𝑦𝑝 = 𝑢𝑦1 = 𝑒 න𝑒 𝑓 𝑥 𝑑𝑥
Thus,
𝑦 = 𝑦𝑐 + 𝑦𝑝
𝑦 = 𝑐𝑒 − 𝑃 𝑥 𝑑𝑥
+ 𝑒− 𝑃 𝑥 𝑑𝑥
න𝑒 𝑃 𝑥 𝑑𝑥
𝑓 𝑥 𝑑𝑥
𝑥𝑑 𝑥 𝑃
where 𝑒 is called the integrating factor.
loop
24
Summary
𝑑𝑦
𝑎1 𝑥 + 𝑎0 𝑥 𝑦 = 𝑔 𝑥 1
𝑑𝑥
Divide (1) by 𝑎1 𝑥 to obtain the standard form of the first-
order linear DE
𝑑𝑦
+𝑃 𝑥 𝑦 =𝑓 𝑥 2
𝑑𝑥
Equation (2) has solution
𝑦 = 𝑦𝑐 + 𝑦𝑝
𝑦𝑐 is a solution associated with the homogenous DE:
𝑑𝑦
+𝑃 𝑥 𝑦 =0
𝑑𝑥
𝑦𝑐 = 𝑐 𝑒 − 𝑦𝑐 = 𝑥𝑑 𝑥 𝑃 1
where 𝑦1 = 𝑒 − 𝑥𝑑 𝑥 𝑃
25
𝑦𝑝 is the particular solution of the nonhomogeneous DE
given in (2). We obtain 𝑦𝑝 by using the method of
variation of parameter. We assume that 𝑦𝑝 = 𝑢 𝑥 𝑦1 =
𝑢 𝑥 𝑒 − 𝑥𝑑 𝑥 𝑃 and then obtain:
𝑢 = න𝑒 𝑃 𝑥 𝑑𝑥
𝑓 𝑥 𝑑𝑥
𝑦𝑝 = 𝑢 𝑥 𝑦1 = 𝑒 − 𝑃 𝑥 𝑑𝑥 න𝑒 𝑃 𝑥 𝑑𝑥 𝑓 𝑥 𝑑𝑥
Thus,
𝑦 = 𝑦𝑐 + 𝑦𝑝
𝑦 = 𝑐𝑒 − 𝑃 𝑥 𝑑𝑥
+ 𝑒− 𝑃 𝑥 𝑑𝑥
න𝑒 𝑃 𝑥 𝑑𝑥
𝑓 𝑥 𝑑𝑥 (4)
𝑑𝑦
𝑒 𝑥𝑑 𝑥 𝑃 + 𝑃 𝑥 𝑒𝑃 𝑥 𝑑𝑥 𝑦 = 𝑒𝑃 𝑥 𝑑𝑥 𝑓 𝑥
𝑑𝑥
𝒅 𝒙𝒅 𝒙 𝑷
𝒆 𝒚 = 𝒆𝒙 𝒇 𝒙𝒅 𝒙 𝑷 (𝟓)
𝒅𝒙
3. Integrate both sides of (5) to obtain the
solution 𝑦.
28
Example:
Solve
1 𝑑𝑦 2
− 2 𝑦 = 𝑥 cos 𝑥 , 𝑥>0
𝑥 𝑑𝑥 𝑥
Obtain the standard form:
𝑑𝑦 2 2
− 𝑦 = 𝑥 cos 𝑥 1
𝑑𝑥 𝑥
2
𝑃 𝑥 =−
𝑥
2
න𝑃 𝑥 𝑑𝑥 = න − 𝑑𝑥 = −2 ln 𝑥
𝑥
29
Integrating factor
−2 ln 𝑥 ln 𝑥 −2 ln 𝑥 −2
𝑒 =𝑒 =𝑒 = 𝑥 −2
Multiplying (1) by the integrating factor
𝑑𝑦
𝑥 −2 − 2𝑥 −3 𝑦 = cos 𝑥
𝑑𝑥
𝑑 −2
𝑥 𝑦
𝑑𝑥
𝑑 −2
𝑥 𝑦 = cos 𝑥
𝑑𝑥
−2
𝑥 𝑦 = නcos 𝑥 𝑑𝑥 = sin 𝑥 + 𝑐
𝑦 = 𝑥 2 sin 𝑥 + 𝑐𝑥 2
30
Example:
Solve the IVP:
𝑑𝑦
cos 𝑥 + sin 𝑥 𝑦 = cos 3 𝑥 , 𝑦 0 = −1
𝑑𝑥
Standard form:
𝑑𝑦
+ tan 𝑥 𝑦 = cos 2 𝑥 (1)
𝑑𝑥
Then,
𝑃 𝑥 = tan 𝑥
න𝑃 𝑥 𝑑𝑥 = නtan 𝑥 𝑑𝑥 = ln sec 𝑥
Integrating factor:
𝑥𝑑 𝑥 𝑃
𝜋 𝜋
𝑒 = 𝑒 ln sec 𝑥 = sec 𝑥 , − <𝑥<
2 2
31
Multiplying (1) by the integrating factor
𝑑
sec 𝑥 𝑦 = cos 2 𝑥 sec 𝑥 = cos 𝑥
𝑑𝑥
sec 𝑥 𝑦 = නcos 𝑥 𝑑𝑥 + 𝑐 = sin 𝑥 + 𝑐
𝑦 = sin 𝑥 cos 𝑥 + 𝑐 cos 𝑥
Applying the initial condition: 𝑦 0 = −1
−1 = sin
ถ0 cosถ0 + 𝑐 cos
ถ0
0 1 1
𝑐 = −1
Thus,
𝜋 𝜋
𝑦 = sin 𝑥 cos 𝑥 − cos 𝑥 = cos 𝑥 sin 𝑥 − 1 , − < 𝑥 <
2 2
32
2.4 Exact Equations
33
Exact differential equations
1. A differential expression is given by
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 (1)
where 𝑀 𝑥, 𝑦 and 𝑁 𝑥, 𝑦 are functions of two variables 𝑥 and 𝑦
o
2. Given 𝑧 = 𝑓 𝑥, 𝑦 ,
change
the differential of 𝑓 𝑥, 𝑦
no 𝜕𝑓 𝜕𝑓
constant𝑑𝑧 = 𝑑𝑥 + 𝑑𝑦 (2)
𝜕𝑥 𝜕𝑦
3. If 𝑧 = 𝑓 𝑥, 𝑦 = 𝑐, where 𝑐 is a constant, then 𝑑𝑧 = 0, and therefore, (2) becomes:
𝜕𝑓 𝜕𝑓
𝑑𝑥 + 𝑑𝑦 = 0 (3)
𝜕𝑥 𝜕𝑦
4. Hence, given 𝑓 𝑥, 𝑦 = 𝑐, one can obtain
𝜕𝑓 𝜕𝑓
Explicitautiginis 𝑑𝑥 + 𝑑𝑦 = 0
𝜕𝑥 𝜕𝑦
and 𝑓 𝑥, 𝑦 = 𝑐 is the solution of (3).
5. Question: given a DE of the form
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0 4
when one can obtain a solution of the form:
𝑓 𝑥, 𝑦 = 𝑐
34
6. The differential expression 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 is
called an exact differential expression, if one can find
an 𝑓 𝑥, 𝑦 such that
𝜕𝑓 𝜕𝑓
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 𝑑𝑥 + 𝑑𝑦 (5)
𝜕𝑥 𝜕𝑦
7. In this case, the DE
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0 (6)
is an exact DE
8. Necessary and sufficient condition for the DE
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0
to be an exact DE:
𝜕𝑀 𝜕𝑁
=
needs
Effied
𝜕𝑦 𝜕𝑥 Équation
9. In this case, the solution of (6) : Egg
𝑓 𝑥, 𝑦 = 𝑐
35
Example: let 𝑧 = 𝑓 𝑥, 𝑦 = 𝑥 2 + sin 𝑦 + 𝑒 𝑥+𝑦
𝜕𝑓
= 2𝑥 + 𝑒 𝑥+𝑦
𝜕𝑥
𝜕𝑓
= cos 𝑦 + 𝑒 𝑥+𝑦
𝜕𝑦
𝑑𝑧 = 2𝑥 + 𝑒 𝑥+𝑦 𝑑𝑥 + cos 𝑦 + 𝑒 𝑥+𝑦 𝑑𝑦
If 𝑧 = 𝑐, i.e., 𝑓 𝑥, 𝑦 = 𝑐, where 𝑐 is a constant,
then from (2)
𝜕𝑓 𝜕𝑓
𝑑𝑥 + 𝑑𝑦 = 0 (7)
𝜕𝑥 𝜕𝑦
Thus, from a one-parameter family of curves
𝑓 𝑥, 𝑦 = 𝑐, we can generate a first-order
differential equation given by (7).
36
From 𝑥 2 + sin 𝑦 + 𝑒 𝑥+𝑦 = 𝑐, we can generate
2𝑥 + 𝑒 𝑥+𝑦 𝑑𝑥 + cos 𝑦 + 𝑒 𝑥+𝑦 𝑑𝑦 = 0 (𝐴)
Question:
Given the first-order differential equation, for
example A, under what condition it is equivalent to
𝑑 𝑥 2 + sin 𝑦 + 𝑒 𝑥+𝑦 = 0,
and, therefore,
𝑥 2 + sin 𝑦 + 𝑒 𝑥+𝑦 = 𝑐 (𝐵)
(B) (i.e., 𝑓 𝑥, 𝑦 = 𝑐) is then an implicit solution of
the first-order differential equation given by (A)
37
• Exact differential equation
A first-order differential equation of the form:
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0
is said to be an exact differential equation if the
expression on the LS is an exact differential
• Let 𝑀 𝑥, 𝑦 and 𝑁(𝑥, 𝑦) be continuous and have
continuous first partial derivatives in a rectangular
region 𝑅 𝑎 < 𝑥 < 𝑏, 𝑐 < 𝑦 < 𝑑. Then a necessary
and sufficient condition that the differential
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦
be an exact differential is
𝜕𝑀 𝜕𝑁
= (8)
𝜕𝑦 𝜕𝑥
38
• Proof of Necessity:
Given that 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 is an exact differential
expression, prove (8)
Since 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 is an exact differential
expression, there exists a function 𝑓 𝑥, 𝑦 such that
𝜕𝑓 𝜕𝑓
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 𝑑𝑥 + 𝑑𝑦
𝜕𝑥 𝜕𝑦
Therefore,
𝜕𝑓 𝜕𝑓
𝑀 𝑥, 𝑦 = and 𝑁 𝑥, 𝑦 =
𝜕𝑥 𝜕𝑦
𝜕𝑀 𝜕 𝜕𝑓 𝜕 𝜕𝑓 𝜕𝑁
= = =
𝜕𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑥
39
Sufficiency of the condition consists of showing
𝜕𝑓 𝜕𝑓
that = 𝑀 𝑥, 𝑦 and = 𝑁 𝑥, 𝑦 , given that
𝜕𝑥 𝜕𝑦
𝜕𝑀 𝜕𝑁
=
𝜕𝑦 𝜕𝑥
We will not prove this part here.
40
Method of finding solution
1. Given the first-order DE:
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0 (9)
2. Check whether it is an exact DE by checking
whether the condition
𝜕𝑀 𝜕𝑁
=
𝜕𝑦 𝜕𝑥
is satisfied
41
3. If this condition is satisfied, then 𝑀 𝑥, 𝑦 𝑑𝑥 +
𝑁 𝑥, 𝑦 𝑑𝑦 = 0 is an exact differential equation, then
𝜕𝑓
= 𝑀 𝑥, 𝑦 10
𝜕𝑥
𝜕𝑓
= 𝑁 𝑥, 𝑦 11
𝜕𝑦
4. Finding a solution of (9), i. e. , 𝑓 𝑥, 𝑦 = 𝑐, means
finding 𝑓 𝑥, 𝑦 from (10) and (11).
5. Integrate (10) with respect to 𝑥 to find 𝑓 𝑥, 𝑦 as
mine
à 𝑓 𝑥, 𝑦 = න𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑔 𝑦 (12)
w
where 𝑔 𝑦 is a constant of integration, that is, it is not a
function of 𝑥.
42
6. Differentiate (12) with respect to 𝑦
𝜕𝑓 𝜕
= න𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑔′ (𝑦) (13)
𝜕𝑦 𝜕𝑦
7. From (11) and (13):
𝜕 ′
න𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑔 𝑦 = 𝑁(𝑥, 𝑦)
𝜕𝑦
That is,
′
𝜕
𝑔 𝑦 = 𝑁 𝑥, 𝑦 − න𝑀 𝑥, 𝑦 𝑑𝑥 (14)
𝜕𝑦
43
8. Integrate (14) with respect to 𝑦 to determine
𝑔 𝑦
9. Substitute 𝑔 𝑦 ,thus found, into (12) to find
𝑓 𝑥, 𝑦
We could have started from (11)
𝑓 𝑥, 𝑦 = න𝑁 𝑥, 𝑦 𝑑𝑦 + ℎ 𝑥 (15)
45
Example 2:
2𝑥𝑦 2 + 1
2
𝑑𝑥 + 𝑑𝑦 = 0
2𝑥 𝑦
2𝑥𝑦 2 +1
𝑀 𝑥, 𝑦 = 2 , 𝑁 𝑥, 𝑦 = 1
2𝑥 𝑦
𝜕𝑀 𝑥, 𝑦 4𝑥𝑦 2𝑥 2 𝑦 − 2𝑥𝑦 2 + 1 2𝑥 2
=
𝜕𝑦 2𝑥 2 𝑦 2
𝜕𝑀 𝑥, 𝑦 8𝑥 3 𝑦 2 − 4𝑥 3 𝑦 2 − 2𝑥 2 2𝑥𝑦 2 − 1
= 4 2
=
𝜕𝑦 4𝑥 𝑦 2𝑥 2 𝑦 2
𝜕𝑁 𝑥, 𝑦
=0
𝜕𝑦
𝜕𝑀 𝜕𝑁
Since ≠ , the given DE is not exact.
𝜕𝑦 𝜕𝑦
46
Example 3:
2𝑥𝑦 − sec 2 𝑥 𝑑𝑥 + 𝑥 2 + 2𝑦 𝑑𝑦 = 0
𝑀 𝑥, 𝑦 = 2𝑥𝑦 − sec 2 𝑥, 𝑁 𝑥, 𝑦 = 𝑥 2 + 2𝑦
𝜕𝑀 𝜕𝑁
= 2𝑥, = 2𝑥
𝜕𝑦 𝜕𝑥
𝜕𝑀 𝜕𝑁
Since = , the given DE is exact.
𝜕𝑦 𝜕𝑥
𝜕𝑓
= 𝑀 𝑥, 𝑦 = 2𝑥𝑦 − sec 2 𝑥
𝜕𝑥
𝜕𝑓
= 𝑁 𝑥, 𝑦 = 𝑥 2 + 2𝑦
𝜕𝑦
𝑓 𝑥, 𝑦 = න 2𝑥𝑦 − sec 2 𝑥 𝑑𝑥 + 𝑔 𝑦
47
deviva
µ 𝑓 𝑥, 𝑦 = 𝑥 2 𝑦 − tan 𝑥 + 𝑔 𝑦
g 9 𝜕𝑓
= 𝑥 2 + 𝑔′ 𝑦 = 𝑥 2 + 2𝑦 𝑁 𝑥, 𝑦
Iii
orgy
𝜕𝑦
𝑔 ′
𝑦 = 2y➔ 𝑔 𝑦 = 𝑦 2 integrate
tofind
2 2 ggly
𝑓 𝑥, 𝑦 = 𝑥 𝑦 − tan 𝑥 + 𝑦 gly
Hence, the implicit solution of the given DE is
𝑥 2 𝑦 − tan 𝑥 + 𝑦 2 = 𝑐
48
Example 4:
Solve the IVP:
1 + 𝑒 𝑥 𝑦 + 𝑥𝑒 𝑥 𝑦 𝑑𝑥 + 𝑥𝑒 𝑥 + 2 𝑑𝑦 = 0
𝑦 0 = 1/2
if
this is satisfied
it is exact
𝑀 𝑥, 𝑦 = 1 + 𝑒 𝑥 𝑦 + 𝑥𝑒 𝑥 𝑦, 𝑁 𝑥, 𝑦 = 𝑥𝑒 𝑥 + 2
𝜕𝑀 𝑥 𝑥 𝜕𝑁
= 𝑒 + 𝑥𝑒 , = 𝑒𝑥 + 𝑥𝑒 𝑥
𝜕𝑦 𝜕𝑥
𝜕𝑀 𝜕𝑁
Since = , the given DE is exact.
𝜕𝑦 𝜕𝑥
𝜕𝑓
= 𝑀 𝑥, 𝑦 = 1 + 𝑒 𝑥 𝑦 + 𝑥𝑒 𝑥 𝑦
𝜕𝑥
𝜕𝑓
= 𝑁 𝑥, 𝑦 = 𝑥𝑒 𝑥 + 2
𝜕𝑦
𝑓 𝑥, 𝑦 = න 𝑥𝑒 𝑥 + 2 𝑑𝑦 + ℎ 𝑥
49
𝑓 𝑥, 𝑦 = 𝑥𝑒 𝑥 𝑦 + 2𝑦 + ℎ(𝑥)
𝜕𝑓
= 𝑒 𝑥 𝑦 + 𝑥𝑒 𝑥 𝑦 + ℎ′ 𝑥 = 1 + 𝑒 𝑥 𝑦 + 𝑥𝑒 𝑥 𝑦
𝜕𝑥
ℎ′ 𝑥 = La1➔integrate
ℎ 𝑥 =𝑥
𝑓 𝑥, 𝑦 = 𝑥𝑒 𝑥 𝑦 + 2𝑦 + 𝑥
Hence, the implicit solution of the given DE is
next Shilx
𝑥𝑒 𝑥 𝑦 + 2𝑦 + 𝑥 = 𝑐
Explicit solution:
𝑐−𝑥
𝑦= 𝑥
𝑥𝑒 + 2
1
Applying the initial condition 𝑦 0 =
2
1 𝑐−0
= ➔𝑐=1
2 0+2
Therefore,
1−𝑥
𝑦= 𝑥
𝑥𝑒 + 2
50
Changing a non-exact differential
equation into an exact one
51
1. Assume that
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0 (1)
is non-exact, that is,
𝜕𝑀 𝜕𝑁
≠
𝜕𝑦 𝜕𝑥
2. Multiply (1) by an integrating factor 𝜇(𝑥, 𝑦) such that the
resulting equation becomes exact
𝜇(𝑥, 𝑦)𝑀 𝑥, 𝑦 𝑑𝑥 + 𝜇(𝑥, 𝑦)𝑁 𝑥, 𝑦 𝑑𝑦 = 0 (2)
𝑀1 𝑁1
that is,
𝜕𝑀1 𝜕𝑁1
=
𝜕𝑦 𝜕𝑥
𝜇𝑀 𝑦 = 𝜇𝑁 𝑥
𝜇𝑦 𝑀 + 𝜇𝑀𝑦 = 𝜇𝑥 𝑁 + 𝜇𝑁𝑥
𝜇𝑥 𝑁 − 𝜇𝑦 𝑀 = 𝑀𝑦 − 𝑁𝑥 𝜇 (3)
52
3. Equation (3) is a partial differential equation; we are
not prepared to solve it.
Simplifying assumptions
4. Assume that 𝜇 is a function of only the variable 𝑥.
Then, 𝜇𝑦 = 0 and from (3):
𝑑𝜇 𝑀𝑦 − 𝑁𝑥
= 𝜇 (4)
𝑑𝑥 𝑁
𝑀𝑦 −𝑁𝑥
If is a function of 𝑥, then (4) a separable
𝑁
differential equation.
𝑑𝜇 𝑀𝑦 − 𝑁𝑥
= 𝑑𝑥
𝜇 𝑁
𝑀𝑦 − 𝑁𝑥
ln 𝜇 = න 𝑑𝑥 (5)
𝑁
53
𝑀𝑦 − 𝑁𝑥
ln 𝜇 = න 𝑑𝑥 5
𝑁
𝑀𝑦 −𝑁𝑥
𝑥𝑑 𝑁
𝜇 𝑥 =𝑒 (6)
5. Similarly if we assume that 𝜇 is a function of
the variable 𝑦 only. Then, 𝜇𝑥 = 0 and from (3):
𝑑𝜇 𝑁𝑥 − 𝑀𝑦
= 𝜇 (7)
𝑑𝑦 𝑀
𝑁𝑥 −𝑀𝑦
If is a function of 𝑦, then (7) is a
𝑀
separable differential equation.
54
𝑑𝜇 𝑁𝑥 − 𝑀𝑦
= 𝑑𝑦 (8)
𝜇 𝑀
𝑁𝑥 − 𝑀𝑦
ln 𝜇 = න 𝑑𝑦 9
𝑀
𝑁𝑥 −𝑀𝑦
𝑦𝑑 𝑀
𝜇 𝑦 =𝑒 (10)
55
Changing a non-exact DE into an exact
one
Given a non-exact DE:
𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0 (1)
That is,
𝜕𝑀 𝜕𝑁
≠
𝜕𝑦 𝜕𝑦
1. Multiply (1) by an integrating factor 𝜇(𝑥) such
that the resulting equation becomes exact
𝜇(𝑥)𝑀 𝑥, 𝑦 𝑑𝑥 + 𝜇(𝑥)𝑁 𝑥, 𝑦 𝑑𝑦 = 0 (2)
𝑀1 𝑁1
Assume now that (2) is exact
56
2. Then
𝜕𝑀1 𝜕𝑁1
=
𝜕𝑦 𝜕𝑥
𝜇 𝑥 𝑀(𝑥, 𝑦) 𝑦 = 𝜇 𝑥 𝑁 𝑥, 𝑦 𝑥
𝑑
𝜇 𝑥 𝑀𝑦 = ( 𝜇 𝑥 )𝑁 + 𝜇 𝑥 𝑁𝑥
𝑑𝑥
𝑑𝜇 𝑀𝑦 − 𝑁𝑥
= 𝜇 𝑥 (3)
𝑑𝑥 𝑁
57
3. Assuming that the bracketed quantity on the
right side of (3) is a function of 𝑥 only, we see
that (3) is a first-order separable DE in 𝜇(𝑥)
4.
𝑑𝜇 𝑀𝑦 − 𝑁𝑥
= 𝑑𝑥
𝜇 𝑁
𝑀𝑦 − 𝑁𝑥
ln 𝜇 = න 𝑑𝑥
𝑁
𝑀𝑦 −𝑁𝑥
𝑥𝑑 𝑁
𝜇 𝑥 =𝑒 (4)
5. Now, with 𝜇 𝑥 given by (4), solve (2), which
is exact.
58
6. Similarly, by using an integrating factor 𝜇(𝑦)
𝑁𝑥 −𝑀𝑦
that is a function of 𝑦 only, and when is a
𝑀
function of 𝑦 only, we can obtain
𝑁𝑥 −𝑀𝑦
𝑦𝑑 𝑀
𝜇 𝑦 =𝑒 (5)
7. Now, with 𝜇 𝑦 given by (5), solve
𝝁 𝒚 𝑴 𝒙, 𝒚 𝒅𝒙 + 𝝁 𝒚 𝑵 𝒙, 𝒚 𝒅𝒚 = 𝟎, which
is exact.
59
Example:
Solve
𝑥 + 3𝑥 3 sin 𝑦 𝑑𝑥 + 𝑥 4 cos 𝑦 𝑑𝑦 = 0 (6)
𝑀 𝑥, 𝑦 = 𝑥 + 3𝑥 3 sin 𝑦
𝑁 𝑥, 𝑦 = 𝑥 4 cos 𝑦
𝜕𝑀
= 3𝑥 3 cos 𝑦
𝜕𝑦
𝜕𝑁
= 4𝑥 3 cos 𝑦
𝜕𝑥
Since
𝜕𝑀 𝜕𝑁
≠
𝜕𝑦 𝜕𝑥
the given differential equation (6) is not exact.
60
𝑀𝑦 − 𝑁𝑥 3𝑥 3 cos 𝑦 − 4𝑥 3 cos 𝑦 1
= 4
=−
𝑁 𝑥 cos 𝑦 𝑥
𝑀𝑦 − 𝑁𝑥 1 1
න 𝑑𝑥 = න − 𝑑𝑥 = − ln 𝑥 = ln
𝑁 𝑥 𝑥
ln
1 1
𝜇 𝑥 = 𝑒 𝑥 = = 𝑥 −1
𝑥
Multiply the given differential equation by
𝜇 𝑥 = 𝑥 −1
2 3
1 + 3𝑥 sin 𝑦 𝑑𝑥 + 𝑥 cos 𝑦 𝑑𝑦 = 0 (7)
61
The new 𝑀(𝑥, 𝑦) and 𝑁(𝑥, 𝑦) are given by:
𝑀 𝑥, 𝑦 = 1 + 3𝑥 2 sin 𝑦
𝑁 𝑥, 𝑦 = 𝑥 3 cos 𝑦
𝜕𝑀
= 3𝑥 2 cos 𝑦
𝜕𝑦
𝜕𝑁
= 3𝑥 2 cos 𝑦
𝜕𝑥
Since
𝜕𝑀 𝜕𝑁
=
𝜕𝑦 𝜕𝑥
The DE (6) is exact
62
𝜕𝑓
= 𝑀 = 1 + 3𝑥 2 sin 𝑦
𝜕𝑥
𝜕𝑓
= 𝑁 = 𝑥 3 cos 𝑦
𝜕𝑦
𝑓 𝑥, 𝑦 = න𝑥 3 cos 𝑦 𝑑𝑦 + ℎ 𝑥 = 𝑥 3 sin 𝑦 + ℎ 𝑥
𝜕𝑓
= 3𝑥 2 sin 𝑦 + ℎ′ 𝑥 = 1 + 3𝑥 2 sin 𝑦𝑀(𝑥, 𝑦)
𝜕𝑥
ℎ′ 𝑥 = 1
ℎ 𝑥 =𝑥
𝑓 𝑥, 𝑦 = 𝑥 3 sin 𝑦 + 𝑥
Hence, the implicit solution:
𝑥 3 sin 𝑦 + 𝑥 = 𝑐, 𝑥 ≠ 0
63
Hence, the implicit solution:
𝒙𝟑 𝒔𝒊𝒏 𝒚 + 𝒙 = 𝒄, 𝒙 ≠ 𝟎
and the explicit solution:
𝑐−𝑥
sin 𝑦 = 3
𝑥
−𝟏 𝒄−𝒙
𝒚= 𝐬𝐢𝐧 ,𝒙≠𝟎
𝒙𝟑
64