#### Provide solution for RD Sharma maths Class 12 Chapter 21 Differential Equation Exercise 21.10 Question 37 Subquestion (xi) textbook solution.

Answer : $y \sin x+\cos ^{2} x=0$

Give : $\frac{d y}{d x}+y \cot x=2 \cos x, y\left(\frac{\pi}{2}\right)=0$

Hint : Using $\int \cot x d x$

Explanation : $\frac{d y}{d x}+(\cot x) y=2 \cos x$

This is a linear differential equation of the form

\begin{aligned} &\frac{d x}{d y}+P y=Q \\ &P=\cot x \text { and } Q=2 \cos x \end{aligned}

The integrating factor $If$  of this differential equation is

\begin{aligned} &I f=e^{\int P d x} \\ &=e^{\int \cot x d x} \\ &=e^{\log |\sin x|} \; \; \; \; \; \; \; \quad\left[\int \cot x d x=\log |\sin x|+C\right] \\ &=\sin x\; \; \; \; \; \; \; \; \; \; \; \; \; \quad\left[e^{\log e^{x}}=x\right] \end{aligned}

Hence, the solution is

\begin{aligned} &y I f=\int Q I f d x+C \\ &=y(\sin x)=\int 2 \cos x \sin x d x+C \\ &=y \sin x=\int \sin 2 x d x+C \quad[2 \cos x \sin x=\sin 2 x] \end{aligned}

$=y \sin x=-\frac{\cos 2 x}{2}+C$                 .......(i)

We have $y\left(\frac{\pi}{2}\right)=0 \text { when } x=\frac{\pi}{2}, y=0$

\begin{aligned} &=(0) \sin \frac{\pi}{2}=-\frac{\cos 2\left(\frac{\pi}{2}\right)}{2}+C \\ &=C=\frac{\cos \pi}{2} \\ &=C=\frac{(-1)}{2} \quad[\cos \pi=-1] \\ &=C=-\frac{1}{2} \end{aligned}

Substituting in (i)

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

\begin{aligned} &=2 y \sin x=-\cos 2 x-1 \\ &=2 y \sin x+\cos 2 x+1=0 \\ &=2 y \sin x+\cos ^{2} x=0\; \; \; \; \; \; \; \; \; \; \; \quad\left[1+\cos 2 x=2 \cos ^{2} x\right] \end{aligned}