If $ (2+sin\, x) \frac{dy}{dx} + (y + 1) cos\, x = 0 $ and $y(0) = 1$, then $y \left(\frac{\pi }{2}\right)$ is equal to
Answer & explanation
Correct answer: option 3
The correct answer is option (3) : $\frac{1}{3}$
The given differential equation is
$(2+sin\, x) \frac{dy}{dx} + ( y+1) cos\, x= 0 $
$⇒(2+ sin x) dy + (y +1) cos\, x dx=0$
$⇒\frac{1}{y+1}dy + \frac{cosx}{2+sin x} dx=0$
Integrating both sides, we get
$log (y +1) + log (2+ sin x ) = log C$
$⇒(y+1) (2+ sinx ) = C$ ...........(i)
It is given that $y(0) = 1 $ i.e. $y = 1 $ when $x=0$. Putting $x=0, y = 1 $ in (i), we get
$2(2+0) =C⇒C=4$
Putting $C=4$ in (i), we obtain
$(y+1) (2+sin x) = 4$ ...........(ii)
Putting $x=\frac{\pi }{2}$ in (ii), we get $y=\frac{1}{3}$.