ODE Topic 3 Notes
ODE Topic 3 Notes
LINEAR EQUATIONS
dy
u + P uy = Qu (2)
dx
d dy
but dx
(uy) = u dx + y du
dx
d du
⇒ (uy) + P uy − y = Qu
dx dx
d du
⇒ (uy) + (uP − )y = Qu
dx dx
Then put (uP − du
dx
) =0
du
⇒ = Pu
dx
du
⇒ = P dx
u
1
∫ ∫
du
⇒ = P dx + c
u
∫
hence ln u = P dx + c, making u the subject;
∫
eln u = e P dx+c
∫
P dx
u=e
∫
P dx
The function u = e is called an integrating factor (I.F), the equation
then reduces to
d
(uy) = Qu
dx
∫
⇒ uy = Qudx + c
dy
+ Py = Q
dx
dy 1
− y = ex (1 + x)
dx (1 + x)
⇒ P = − (1+x)
1
and Q = ex (1 + x), which are functions of x only. Then we
find the integrating factor (I.F) u.
∫ ∫
= e−
dx
∴ I.F = e P dx x+1 = e− ln(1+x)
1 1
∴ u = eln 1+x =
1+x
Then solution is given by
∫
uy = Qudx + c
2
1 1
= y = ex (1 + x)( )dx + c
1+x 1+x
∫
1
)y = ex dx + c
1+x
∫
1
)y = ex + c
1+x
⇒ y = (x + 1)ex + c(x + 1)
Assignment 3a
Find the general solution of the equations
(i) dy
dx
− x1 y = x2 + 2
dy
(ii) sin 2x dx + 2y sin2 x = 2 sin x
(iii) (1 − 2xe2y ) dx
dy
− e2y = 0
3
dz
⇒ + (1 − n)P z = Q(1 − n)
dx
Example
Solve
dy
x dx + y = x3 y 6
(Bernoulli differential equation) and standard Bernoulli differential equation
is given as
dy
+ P y = Qy n
dx
dy y
∴ + = x2 y 6
dx x
Divide through by y n i.e y 6 to obtain,
dy y −5
y −6 + = x2
dx x
dy dz
−5y −6 =
dx dx
dy 1 dz
⇒ y −6 =−
dx 5 dx
substituting for y −6 dx
dy
, gives;
1 dz z
− + = x2
5 dx x
dz 5
⇒ − z = −5x2
dx x
which is linear first order differential equation with variables in x and z.
we then find Integrating factor as
∫
e P dx
and P = − x5
∫ ∫ 1
∴ e− = e−5 = e−5 ln x = eln x5
5 dx
x
dx x
1
u=
x5
4
and solution is given as
∫
uz = Qudx + c
∫
1 1
5
z = −5x2 5 dx + c
x x
∫
1
z = −5 x−3 dx + c
x5
z 5
⇒ 5 = x−2 + c
x 2
But y −5 = z
y −5 5
5
= x−2 + c
x 2
Assignment 3b
Solve
dy
(i) dx
+ x1 y = xy 2
dy −4
(ii) x3 dx + x2 y = 2y 3
dy
(iii) 2x3 dx + 4x2 y = −5y 4
5
If (1) is the exact differential of the equation w(x, y) = c, we have
∂w ∂w
dw = dx + dy
∂x ∂y
from which dϕ
dy
= ϕ′ (y) and hence ϕ(y) can be found.
Example 1
Solve 2xydx + (x2 − 1)dy = 0
Solution
Identify M (x, y) and N (x, y) as M (x, y) = 2xy and N (x, y) = (x2 − 1)
respectively.
Although the equation is separable it is also exact since
∂M ∂N
= 2x =
∂y ∂x
∂f
= x2 + g ′ (y) = N (x, y) = x2 − 1
∂y
6
It follows that g ′ (y) = −1 and g(y) = −y after integration.
The constant of integration need not be included in the preceding line since
the solution is f (x, y) = c. Some of the family of curves f (x, y) = x2 y+g(y) =
x2 y − y = c.
The solution of the equation is not f (x, y) = x2 y − y, rather it is f (x, y) = c
or f (x, y) = 0 if a constant is used in the integration of g ′ (y).
Example 2
Solve (e2y − y cos xy)dx + (2xe2y − x cos xy + 2y)dy = 0
Solution
Identify M (x, y) and N (x, y) as M (x, y) = (e2y − y cos xy) and N (x, y) =
(2xe2y − x cos xy + 2y) respectively.
The equation is neither separable nor homogeneous, but is exact since
∂M ∂N
= 2e2y + xy sin xy − cos xy =
∂y ∂x
∂f
Thus we know that there exist a function f (x, y) such that ∂x
= M (x.y) and
∂f
∂y
= N (x, y)
∂f
For variety we shall start with the assumption that ∂y
= N (x, y)
That is
∂f
= 2xe2y − x cos xy + 2y
∂y
∫ ∫ ∫
∴ f (x, y) = 2x e dy − x cos xydy + 2 ydy
2y
∫
Remember, the reason that x can come out in front of the symbol is that
in the integration with respect to y, x is treated as an ordinary constant. It
follows
f (x, y) = xe2y − sin xy + y 2 + h(x)
Differentiating
∂f
= e2y − y cos xy + h′ (x) = M (x, y)
∂x
7
= e2y − y cos xy
xe2y − sin xy + y 2 + c = 0
Example 3
Solve 2y(y − 1)dx + x(2y − 1)dy = 0
Solution
The equation is not exact since if
M (x, y) = 2y(y − 1) and N (x, y) = x(2y − 1)
then ∂M
∂y
= 4y − 2 and ∂N
∂x
= 2y − 1
It is interesting to note that if we simply multiply the given equation by x,
we then obtain
dy
(ii) y + ex + x dx =0
x y dy
(iii) x2 +y 2
+ x2 +y 2 dx
=0
8
1 dy
(iv) x
+ y + (3y 2 + x) dx =0