
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,


By substituting this in the above integral, we get

However, when x = 1, we have y = 0
⇒ 0 = –e–1 + c(1)
⇒ 0 = –e–1 + c
∴ c = e–1
By substituting the value of c in the equation for y, we get
y = –e–x + (e–1)x
∴ y = xe –1 – e–x
Thus, the solution of the given initial value problem is y = xe–1 – e–x