Assignment 1
Assignment 1
1. State a first order non-linear and non-homogeneous differential equation. Solve using
(a) Exact Equation Approach (page 1)
(10 marks)
The first order differential equation is (x2+6y) y’+2xy= 8x. Assume that y (0) =1.
First, change the equation to the form of M (x, y) dx + N (x, y) dy =0.
(x2+6y) y’+2xy = 8x
(x2+6y+5) dy+2xydx = 8x dx
(2xy-8x) dx +(x2+6y) dy = 0
M= 2xy-8x N = x2+6y
My=2x Nx =2x
My = Nx
Since My = Nx. So, the differential equation is exact.
We can either integrate M with respect to x or integrate N with respect to y. In this case, I do
integration on M with respect to x.
(2xy-8x) dx +(x2+6y) dy = 0
𝜕𝜑 𝜕𝜑
= 𝜑x = M(x, y) = 𝜑y = N(x, y)
𝜕𝑥 𝜕𝑦
= 2xy - 8x = x2 + 6y
𝜑 = ∫( M (x, y) dx
= 𝑥 2 𝑦 − 4𝑥 2 + ℎ(𝑦)
Differentiating 𝜑 with respect to y and compare the answer to N (x, y):
𝜕𝜑
= 𝜑𝑦
𝜕𝑦
𝜕
= ∫(M (x, y)dx
𝜕𝑦
𝜕
= [𝑥 2 𝑦 − 4𝑥 2 + ℎ(𝑦)]
𝜕𝑦
= 𝑥 2 + ℎ′(𝑦)
By comparison with N (x, y):
ℎ′(𝑦) = 6y
Integrate to find ℎ(𝑦): ℎ (𝑦) = 3𝑦 2 +c1
−𝑏 ± √𝑏 2 − 4𝑎𝑐
𝑦(𝑥) =
2𝑎
−𝑥 2 ± √(𝑥 2 )2 − 4(3)(−4𝑥 2 − 3)
𝑦=
2(3)
−𝑥 2 ± √𝑥 4 + 48𝑥 2 + 36
𝑦=
6
(10 marks)
A differential equation is said to be linear when it is of the first degree in the dependent
variable and all of its derivatives. A differential equation is said to be homogenous
when g(x) =0. So, for the differential equation to be non-homogenous, we just make
sure that the term g(x) ≠ 0.
In this question, the first order linear non-homogenous equation that I have
chosen is an exact equation as the L.H.S of the equation is an exact differential.
(x2+6y) y’+2xy= 8x ⇒ (2xy-8x) dx +(x2+6y) dy = 0
Since this is an exact equation, we do not need to find the integrating factor as the
integrating would be equal to 1. In other words, if it is a non-exact differential equation,
then we need to multiply an integrating factor to the equation to make it exact.
Either using exact equation approach or MATLAB simulation, we will get the
same answer. The exact equation approach is a good method to solve a non-linear
differential equation. Moreover, MATLAB would be a powerful tool in solving the
general equation of differential equation as we can observe the graph plotted of the
equation using the coding method or the MATLAB SIMULNK. MATLAB could save a lot
a time compared to solving the differential equation by manual calculation.