#### Provide solution for RD Sharma maths class 12 chapter Differential Equations exercise 21.7 question 58

Answer: $\frac{1}{3}$

Hint: Separate the terms of x and y and then integrate them.

Given: IF $y(x)$ is a solution of the differential equation $\left(\frac{2+\sin x}{1+y}\right) \frac{d y}{d x}=-\cos x \text { and } y(0)=1$ then find $y\left ( \frac{\pi }{2} \right )$

Solution:

\begin{aligned} &\left(\frac{2+\sin x}{1+y}\right) \frac{d y}{d x}=-\cos x \\\\ &\Rightarrow \frac{d y}{1+y}=\frac{-\cos x}{2+\sin x} d x \end{aligned}

Integrating both sides

\begin{aligned} &\Rightarrow \int \frac{d y}{1+y}=-\int \frac{\cos x}{2+\sin x} d x \\\\ &\Rightarrow \log |1+y|=-\log |2+\sin x|+\log c \\\\ &{\left[\begin{array}{l} \text { Put } \\ \sin x=t \\ \cos x d x=d t \\ \int \frac{1}{t} d t=\log |t|+c \end{array}\right]} \end{aligned}

\begin{aligned} &\Rightarrow \log |y+1|+\log |2+\sin x|=\log c \\\\ &\Rightarrow \log |(y+1)(2+\sin x)|=\log c \\\\ &\Rightarrow(y+1)(2+\sin x)=c \end{aligned}            ..........(1)

According to given: $y(0) = 1\; at\; x=0, y = 1$

$\text { (2) }(2+\sin 0)=c \Rightarrow c=4$

Put in (1)

$\Rightarrow(y+1)(2+\sin x)=4$                                .............(2)

Now we have to find $y\left ( \frac{\pi }{2} \right )$i.e. value of y at $x= \frac{\pi }{2}$

Put in (2)

\begin{aligned} &(y+1)\left(2+\sin \frac{\pi}{2}\right)=4 \\\\ &\Rightarrow(y+1)(2+1)=4 \\\\ &{\left[\therefore \sin \frac{\pi}{2}=1\right]} \end{aligned}

\begin{aligned} &\Rightarrow 3(y+1)=4 \\\\ &\Rightarrow 3 y+3=4 \Rightarrow 3 y=1 \Rightarrow y=\frac{1}{3} \\\\ &y\left(\frac{\pi}{2}\right)=\frac{1}{3} \end{aligned}