
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=\frac{\pi}{2},\) we have y = 1

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

Thus, the solution of the given initial value problem is y = sin x