#### Explain solution for RD Sharma maths Class 12 Chapter 21 Differential Equation Exercise Revision Exercise (RE) Question 66 Subquestion (xii) textbook solution.

Answer :  $y=\left(1+x^{2}\right)^{-1} \log |\sin x|+c\left(1+x^{2}\right)^{-1}$

Hint :   integrate by applying integration of $x^{n}$

Given : $\left(1+x^{2}\right) d y+2 x y d x=\cot x d x$

Solution : given equation

$\left(1+x^{2}\right) d y+2 x y d x=\cot x d x$

Divide both sides by dx

$\begin{gathered} \left(1+x^{2}\right) \frac{d y}{d x}+2 x y \frac{d x}{d x}=\cot x \frac{d x}{d x} \\ \left(1+x^{2}\right) \frac{d y}{d x}+2 x y=\cot x \end{gathered}$

Divide by $(1+x^{2})$

$\frac{d y}{d x}+\frac{2 x y}{1+x^{2}}=\frac{\cot x}{1+x^{2}}$

Comparing above equation with $\frac{d y}{d x}+P y=Q$

\begin{aligned} &\quad P=\frac{2 x}{1+x^{2}} \quad, Q=\frac{\cot x}{1+x^{2}} \\ &\text { I. } F=e^{\int P d x} \\ &\text { I. } F=e^{\int \frac{2 x}{1+x^{2}} d x} \\ &\text { Let } t=1+x^{2} \end{aligned}

$\begin{gathered} d t=2 x d x \\ I . F=e^{\int \frac{d t}{t}}=e^{\log t}=t=\left(1+x^{2}\right) \end{gathered}$

\begin{aligned} y \times I . F &=\int Q \times I . F d x+c \\ y\left(1+x^{2}\right) &=\int \frac{\cot x}{1+x^{2}} \times\left(1+x^{2}\right) d x+c \\ y\left(1+x^{2}\right) &=\int \cot x d x+c \end{aligned}

\begin{aligned} &y\left(1+x^{2}\right)=\log |\sin x|+c \\ &\text { Divide } 1+x^{2} \\ &y=\left(1+x^{2}\right)^{-1} \log |\sin x|+c\left(1+x^{2}\right)^{-1} \end{aligned}