MA1201 Spring 2024
1st order ODE 19th Feb
Problems:
Q.1 Let φi be a solution of y ′ + ay = bi (x) for i = 1, 2.
Show that φ1 + φ2 satisfies y ′ + ay = b1 (x) + b2 (x). Use this result to find the solutions
of y ′ + y = sin x + 3 cos 2x passing through the origin.
Q. 2 Solve the following first order linear equations.
i. xy ′ − 2y = x4
ii. y ′ + 2y = e−2x
iii. y ′ = 1 + 3y tan x
Q. 3 A differential equation of the form y ′ + f (x)y = g(x)y α is called a Bernoulli equation.
Note that if α = 0 or 1 it is linear and for other values it is nonlinear. Show that
the transformation y 1−α = u converts it into a linear equation. Use this to solve the
following equations.
i. ey y ′ − ey = 2x − x2
ii. 2(y + 1)y ′ − x2 (y + 1)2 = x4
iii. xy ′ = 1 − y − xy
dy
iv. (xy + x3 y 3 ) dx =1
dx
v. dy
= xy + x3 y 3
vi. xy ′ + y = 2x6 y 4
vii. 6y 2 dx − x(2x3 + y)dy = 0 (Bernoulli in x).
Q. 4 Solve the following ODEs by finding CF and PI.
i. y ′′ + 2y ′ + 3y = 27x
ii. y ′′ + y ′ − 2y = 3ex
iii. y ′′ + 4y ′ + 4y = 18 cosh x
iv. y ′′ + y ′ + y = sin x
Solution:
Q. 1 First part can be done by direct checking. For the second part, we have to solve
′
individually the equations (i) y ′ + y = sin x and (ii) y ′ + y = 3 cos 2x (iii) y + y = 0
and add up these solutions.
Note that (sin x)′ = cos x, etc., so it is reasonable to attempt as a trial solution, for
(i) in the form α cos x + β sin x. Substituting into the differential equation, (−α sin x +
β cos x) + (α cos x + β sin x) = sin x. On comparing the coefficients, β − α = 1, α +
1
MA1201 Spring 2024
1st order ODE 19th Feb
β = 0 giving β = 12 and α = − 21 . So 12 (sin x − cos x) solves (i). Likewise, seek a
solution of y ′ + y = 3 cos 2x in the form α cos 2x + β sin 2x. We find the solution to be
3 6
cos 2x + sin 2x. Hence a general solution of the ODE y ′ + y = sin x + 3 cos 2x is
5 5
1 3 6
y(x) = (sin x − cos x) + cos 2x + sin 2x + ce−x .
2 5 5
1 3
For this to pass through the origin, − + + c = 0 from which we get c = −1/10.
2 5
Q. 2 i. xy ′ − 2y = x4
2y
y′ − = x3
x
R 1
p = −2/x : e pdx = e−2 ln x = 2
Z 3 x
x x2
⇒ y/x2 = dx = xdx = +c
x2 2
2
2 x
⇒y=x +c
2
R
(ii) y ′ + 2y = e−2x ; p = 2, e pdx = e2x
Z
⇒ ye = e−2x · e2x dx = C + x
2x
⇒ y = ce−2x + xe−2x
R R
(iii) y ′ = 3y tan x + 1; e pdx = e−3 tan x = e− ln sec x = cos3 x
Z Z
3 3
⇒ y cos x = cos xdx = (1 − sin2 x) cos xdx
sin3
= sin x − x+c
3
Q. 3 (i) Choose ey = v to obtain v ′ − v = 2x − x2 . Integrate and resubstitute to get
ey = x2 + cex .
′ 2 4 d u
2
(ii) Set (y + 1) = u then u − u = x which may be written as 2
= x2 .
x dx x
u 1 3
Integration gives 2 = x + c.
x 3
1 1
(iii) Rewrite it as : y ′ + ( + 1)y = . Solving the linear differential equation, xy =
x x
1 + ce−x .
dx
(iv) = xy + x3 y 3 . The equation is Bernoulli when x is regarded as the depen-
dy
1 dx y
dent variable. Dividing through by x3 , 3 − 2 = y 3 . Putting u = −x−2 ,
x dy x
2
MA1201 Spring 2024
1st order ODE 19th Feb
1 du du
+ yu = y 3 or + 2yu = 2y 3 . This linear equation readily integrates to
2 dy Z dy
2y 2 2 2
ue = 2y 2 ey dy + c or u = y 2 − 1 + ce−y . Resubstitute and express in terms
of x and y.
1 dy x 1 1 du
(v) 3 − 2 = x3 , − 2 = u ⇒ + ux = x3 etc.
y dx y y 2 dx
y′ 1 1 u′ 3u
(vi) 4 + 3 = 2x5 , set 3 = u ⇒ 3 − 4 = −6x2
y xy y x x
v
= −2x3 + c etc.
x3
(vii) Bernoulli in x: x−2 = y −1 /2 + cy −3 .
Q. 4 i. Let y = emx be a solution homogeneous equation. Then
m2 + 2m + 3 = 0
√
−2 ± 4 − 12 √
=⇒ m = Then m = −1 ± i 2
2
−x
√ √
Then C. F = e c1 cos( 2x) + c2 sin( 2x)
dn
Now onwards we will denote Dn := dxn
So,
1
P.I = {27x}
D2 + 2D + 3
2 −1
27 D + 2D
= 1+ (x)
3 3
D2 + 2D
=9 1− + .... (x)
3
2
= 9 x − D(x) = 9x − 6
3
√ √
Then y(x) = C . F + P. I = e−x c1 cos( 2x) + c2 sin( 2x) + 9x − 6.
ii. Similarly, assuming y = emx as a solution for homogeneous part of (ii), we have
(m + 2)(m − 1) = 0 So C . F = C1 e−2x + c2 ex . Now
1
P. I = {3ex }
(D + 2)(D − 1)
(D + 2) − (D − 1) x
= {e }
(D + 2)(D − 1)
1 1
= {ex } − {ex }
D−1 D+2
1
= xex − ex .
3
3
MA1201 Spring 2024
1st order ODE 19th Feb
where we have used
• 1
f (D)
eax = 1
f (a)
eax , provided f (a) ̸= 0.
xeax
• If f (D) = (D − a)ϕ(D), Then 1
f (D)
eax = ϕ(D)
, provided ϕ(a) ̸= 0.
x2 eax
• If f (D) = (D − a)2 ϕ(D), Then 1
f (D)
eax = 2ϕ(D)
, provided ϕ(a) ̸= 0.
Same procedure will be followed when (D − a)r is a factor of f (D), r is a positive
integer.
So solution of (ii) is y(x) = C1 e−2x + c2 ex + xex − 31 ex .
iii. For the homogeneous part we have (m + 2)2 = 0. So C. F = c1 e−2x + c2 xe−2x .
1 ex + e−x
P. I = 18 { }
(D + 2)2 2
1 1
=9 2
{ex } + {e−x }
(D + 2) (D + 2)2
= ex + 9ex .
Hence the solution of (iii) is y(x) = c1 e−2x + c2 xe−2x + ex + 9ex .
iv. For this problem we have
√ √
2 −1 ± 1−4 −1 ± i 3
m + m + 1 = 0 =⇒ m = =⇒ m =
2 2
1
√ √
So C. F = e− 2 x c1 cos 23 x + c2 sin 23 x And
1
P. I = {sin x}
D2
+D+1
1 1 1 2
= {sin x} since sin ax = sin ax, provided f (−a ) ̸
= 0
(−12 ) + D + 1 f (D2 ) f (−a2 )
1
= {sin x} = − cos x.
D
√ √
− 21 x 3 3
Solution of (iv) is y(x) = e c1 cos 2 x + c2 sin 2 x − cos x.