#### Need solution for RD Sharma Maths Class 12 Chapter 21 Differential Equation Excercise 21.10 Question 37 subquestion (xi)

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|} \qquad\qquad\left[\int \cot x d x=\log |\sin x|+C\right] \\ &=\sin x \qquad\qquad\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 \qquad \qquad \qquad[2 \cos x \sin x=\sin 2 x] \\ &=y \sin x=-\frac{\cos 2 x}{2}+C \ldots(i) \end{aligned}

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 \end{aligned}

\begin{aligned} &=C=\frac{\cos \pi}{2} \\\\ &=C=\frac{(-1)}{2} \qquad\qquad[\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} \\\\ &\end{aligned}

$=y \sin x=-\frac{1}{2}(\cos 2 x+1)$

\begin{aligned} &=2 y \sin x=-(\cos 2 x+1) \\\\ &=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}