If $y(x)$ is a solution of $\left( \frac{2 + \sin x}{1 + y} \right) \frac{dy}{dx} = -\cos x$ and $y(0) = 1$, then find the value of $y \left( \frac{\pi}{2} \right)$.
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → $\frac{1}{3}$ ##
Given that, $\left( \frac{2 + \sin x}{1 + y} \right) \frac{dy}{dx} = -\cos x$
$\Rightarrow \frac{dy}{1 + y} = -\frac{\cos x}{2 + \sin x} dx$
$\text{[applying variable separable method]}$
On integrating both sides, we get
$\int \frac{1}{1 + y} dy = -\int \frac{\cos x}{2 + \sin x} dx$
$\Rightarrow \log(1 + y) = -\log(2 + \sin x) + \log C$
$\text{[As the equation having log in both sides then constant 'C' can be used as } \log C\text{]}$
$\Rightarrow \log(1 + y) + \log(2 + \sin x) = \log C$
$\Rightarrow \log [(1 + y)(2 + \sin x)] = \log C \quad [∵\log x + \log y = \log(xy)]$
$\Rightarrow (1 + y)(2 + \sin x) = C$
$\Rightarrow 1 + y = \frac{C}{2 + \sin x}$
$\Rightarrow y = \frac{C}{2 + \sin x} - 1 \quad \dots (i)$
When $x = 0$ and $y = 1$, then
$1 = \frac{C}{2} - 1 \quad [∵\sin 0 = 0]$
$\Rightarrow C = 4$
On putting $C = 4$ in Eq. (i), we get
$y = \frac{4}{2 + \sin x} - 1$
$∴y \left( \frac{\pi}{2} \right) = \frac{4}{2 + \sin \frac{\pi}{2}} - 1 = \frac{4}{2 + 1} - 1$
$= \frac{4}{3} - 1 = \frac{1}{3}$