
This is a first order linear differential equation of the form

The integrating factor (I.F) of this differential equation is,

Hence, the solution of the differential equation is,

However, when x = 0, we have y = 0

By substituting the value of c in the equation for y, we get

Thus, the solution of the given initial value problem is y = (1 – cos x)e–2x