4 0.8x
y 0 + 0.5y = 4e0.8x , y(0) = 2 → y = (e − e−0.5x ) + 2e−0.5x (1)
1.3
It is in the following form, where y 0 + p(x)y = q(x) such that p(x) = 0.5 and q(x) = 4e0.8x . Hence, an
integrating factor could be used to evaluate the solution as follows.
y 0 + p(x)y = q(x)
R
p(x)dx
the ODE can be solved using an integrating factor µ(x) = e ,
(µ(x)y)0 = µ(x)q(x)
Z
µ(x)y = µ(x)q(x)dt + C
Dividing through by µ(x), we have the general solution of the linear ODE.
R
0.5 dx
Since µ(x) = e = e0.5x ,
e1.3x
Z
0.5x 1.3x 4 1.3x
e y=4 e dx + C = 4 +C = e +C
1.3 1.3
(2)
4 0.8x
y= e + Ce−0.5x
1.3
Since y(0) = 2,
4 4
2= +C →C =2− (3)
1.3 1.3
Hence,
4 0.8x 4 4
e−0.5x = e0.8x − e−0.5x + 2e−0.5x
y= e + 2− (4)
1.3 1.3 1.3