Department of Mathematics
School of Computer Science Engineering and Technology
Bennett University
Course Code: EMAT102L Course Name: Linear Algebra & ODEs
Academic Year: 2023-24 Semester: Even
Date: 05/04/2024 Type: Core (L-T-P: 3-1-0)
Tutorial Sheet 9 Solution
1) Solve the following exact/reducible to exact ODEs:
2 2
(a) 2xyex dx + ex dy = 0, y(0) = 2;
2
(b) cos(x + y)dx + (3y + 2y + cos(x + y))dy = 0;
(c) (1 + 2x) cos ydx + sec ydy = 0;
(d) 3x2 ydx + 4x3 dy = 0.
Solutions:
(a) Comparing given ODE with M (x, y)dx + N (x, y)dy = 0, we get
2 2
M (x, y) = 2xyex and N (x, y) = ex .
∂M 2 ∂N
= 2xex =
∂y ∂x
Clearly given ODE is exact. In order to find a solution of the given ODE, we must find a
function F (x, y) such that
∂F 2 ∂F 2
= M (x, y) = 2xyex , and = N (x, y) = ex .
∂x ∂y
From the first expression we get,
Z
2 2
F (x, y) = 2xyex dx + ϕ(y) ⇒ F (x, y) = yex + ϕ(y).
From the second expression we get,
∂F 2 2
= N (x, y) ⇒ ex + ϕ′ (y) = ex ⇒ ϕ′ (y) = 0 ⇒ ϕ(y) = c0 ,
∂y
where c0 is an arbitrary constant. So,
2
F (x, y) = yex + c0 .
Thus a one-parameter family of solution is given by
2
F (x, y) = c1 ⇒ yex = c1 − c0 = c.
Use initial Condition
2
y(0) = 2 ⇒ c = 2 ⇒ y = 2e−x .
1
(b) Here,
M (x, y) = cos(x + y) and N (x, y) = 3y 2 + 2y + cos(x + y).
∂M ∂N
= − sin(x + y) =
∂y ∂x
Clearly given ODE is exact. In order to find solution of given ODE, we must find function
F (x, y) such that
∂F ∂F
= M (x, y) = cos(x + y), and = N (x, y) = 3y 2 + 2y + cos(x + y).
∂x ∂y
From the first expression we get,
Z
F (x, y) = cos(x + y)dx + ϕ(y) ⇒ F (x, y) = sin(x + y) + ϕ(y).
From the second expression we get,
∂F
= N (x, y) ⇒ cos(x + y) + ϕ′ (y) = 3y 2 + 2y + cos(x + y)
∂y
⇒ ϕ′ (y) = 3y 2 + 2y ⇒ ϕ(y) = y 3 + y 2 + c0 ,
where c0 is an arbitrary constant. So,
F (x, y) = sin(x + y) + y 3 + y 2 + c0 .
Thus a one-parameter family of solution is given by
F (x, y) = c1 ⇒ sin(x + y) + y 3 + y 2 = c1 − c0 = c.
⇒ sin(x + y) + y 3 + y 2 = c.
(c)
M (x, y) = (1 + 2x) cos y and N (x, y) = sec y
∂M ∂N
= −(1 + 2x) sin y and =0
∂y ∂x
∂M ∂N
⇒ ̸= ,
∂y ∂x
hence given ODE is not exact.
Nx − My (1 + 2x) sin y sin y
= = ,
M (1 + 2x) cos y cos y
Z
sin y
dy
so I. F. = e cos y = sec y.
Multiply given equation by I. F., we get
(1 + 2x)dx + sec2 ydy = 0.
2
Now given ODE is exact. Thus
Z
F (x, y) = (1 + 2x)dx + ϕ(y) = x + x2 + ϕ(y)
∂F
Now = N (x, y) ⇒ ϕ′ (y) = sec2 y ⇒ ϕ(y) = tan y + c0 ,
∂y
where c0 is an arbitrary constant. So,
F (x, y) = c1 ⇒ x + x2 + tan y + c0 = c1 ⇒ tan y = −x − x2 + c.
(d)
M (x, y) = 3x2 y and N (x, y) = 4x3 .
∂M ∂N
= 3x2 and = 12x2 .
∂y ∂x
Clearly given ODE is not exact.
Nx − My 12x2 − 3x2 3
= = ,
M 3x2 y y
Z
3
dy
so I. F. = e y = y 3 .
Multiply given equation by I. F., we get
3x2 y 4 dx + 4x3 y 3 dy = 0.
This ODE is exact.
Z
F (x, y) = 3x2 y 4 dx + ϕ(y) ⇒ F (x, y) = x3 y 4 + ϕ(y)
Now
∂F
= N (x, y) ⇒ 4x3 y 3 + ϕ′ (y) = 4x3 y 3 ⇒ ϕ(y) = c0 ,
∂y
where c0 is an arbitrary constant. So,
F (x, y) = c1 ⇒ x3 y 4 + c0 = c1 ⇒ x3 y 4 = c1 − c0 = c.
2) Solve the following linear/reducible to linear ODEs:
dy
(a) + 3x2 y = x2 , y(0) = 2;
dx
(b) y 2 dx + (3xy − 1)dy = 0;
dy 2 0 ≤ x < 1,
(c) + y = f (x), y(0) = 0, where f (x) = ,
dx 0 x ≥ 1.
(d) dy + (4y − 8y −3 )xdx = 0.
Solution:
3
(a) Given ODE is linear in y. Compare with
dy
+ P (x)y = Q(x),
dx
we get P (x) = 3x2 and Q(x) = x2 .
3x2 dx 3
R R
p(x)dx
I. F. = e =e = ex .
Solution is Z
y × I.F. = (Q(x) × I.F ) dx + c,
where c is an arbitrary constant.
Z
3 3 3 1 3
y × ex = x2 ex dx + c ⇒ y × ex = × ex + c
3
Now use initial condition
1 5
y(0) = 2 ⇒ 2 = +c⇒c= .
3 3
Solution is
5 3 1
y(x) = e−x + .
3 3
(b) This ODE is linear in x. Rewrite as
dx 3 1
+ x = 2.
dy y y
3
R R
p(y)dy dy
I. F. = e =e y = y3.
Solution is
y2
Z
3 1 3 3
x×y = y dy + c ⇒ x × y = + c,
y2 2
where c is an arbitrary constant.
(c) Here, R R
P (x)dx 1dx
I.F. = e =e = ex .
Solution is Z
y × I.F. = f (x) × I.F. dx + c,
where c is an arbitrary constant. f (x) = 2 when 0 ≤ x < 1., i.e.,
Z
[Link] = 2ex dx + c ⇒ y(x) = 2 + ce−x .
Use initial condition
y(0) = 0 ⇒ 0 = 2 + c ⇒ c = −2.
That is,
y(x) = 2(1 − e−x ).
4
Now for x ≥ 1, f (x) = 0, then solution is
[Link] = c1 ⇒ y = c1 e−x ,
where c1 is an arbitrary constant. To determine c1 , use continuity of y(x) at x = 1. i.e.,
lim y(x) = lim y(x) ⇒ c1 e−1 = 2(1 − e−1 ) ⇒ c = 2(e − 1).
x→1+ x→1−
So, y(x) = 2(e − 1)e−x . Hence,
2(1 − e−x ) 0 ≤ x < 1,
y(x) =
2(e − 1)e−x x ≥ 1.
(d)
dy
+ 4xy = 8xy −3
dx
Multiply by y 3 , we get
dy
y3 + 4xy 4 = 8x.
dx
Take,
dy 1 dv
y4 = v ⇒ y3 = .
dx 4 dx
Now transformed ODE is
1 dv
+ 4xv = 8x
4 dx
This is linear in v. Solution is
2 2
v = 2 + ce−8x ⇒ y 4 = 2 + ce−8x .
3) Under what conditions for the constants a, b, k, l, is (ax + by)dx + (kx + ly)dy = 0 exact? Solve
the exact ODE.
Solution: For exactness
∂M ∂N
= ⇒ b = k.
∂y ∂x
For solution of exact DE
ax2
Z
F (x, y) = (ax + by)dx + ϕ(y) ⇒ F (x, y) = + bxy + ϕ(y).
2
Now to determine ϕ(y), use
∂F ly 2
= N (x, y) ⇒ bx + ϕ′ (y) = kx + ly ⇒ ϕ(y) = + c0 .
∂y 2
ax2 ly 2
Thus F (x, y) = c1 ⇒ + bxy + = c.
2 2
dy
4) Does the IVP (x − 2) dx = y; y(2) = 1 have a solution? Justify your answer.
Solution: No solution.
5
5) Show that existence and uniqueness theorem guarantees the existence of a unique solution of
the IVP-
dy
(a) = e2y ; y(0) = 0.
dx
dy
(b) = y 4/3 ; y(x0 ) = y0 .
dx
Solutions:
(a) Consider a rectangle R : |x| ≤ a, |y| ≤ b. Clearly the function e2y is continuous in R and
|e2y | ≤ e2b = k in R, so by existence theorem there exists a solution of given IVP in the
interval
b b
|x| ≤ α, where α = min a, = min a, 2b .
k e
Also,
∂f ∂e2y
= = 2e2y ,
∂y ∂y
is bounded in R, so by uniqueness theorem, there exists a unique solution of IVP in above
defined interval, |x| ≤ α. where,
b
α = min a, 2b .
e
Consider F (b) = eb2b ⇒ F ′ (b) = 1−2b
e2b
. The maximum value of F (b) occurs at b = 21 and
1 1
F (1/2) = 2e . Now if a ≥ F (b), then α = min(a, F (b)) = F (b) ≤ 2e for all b > 0. If
1 1 1 1 1 1 1
a < 2e ⇒ α < 2e . For b = 2 , a ≥ 2e , α = 2e Thus, in any case α ≤ 2e , i.e., |x| ≤ 2e .
(b) Proceed like (a) part.