#### Provide Solution for RD Sharma Class 12 Chapter 21 Differential Equation Exercise 21.10 Question 36 subquestion (vi)

Answer:  \begin{aligned} &\left(1+x^{2}\right)\left(x+\tan ^{-1} x+C\right) \\ & \end{aligned}

Give:  $\frac{d y}{d x}-\frac{2 x y}{1+x^{2}}=x^{2}+2 \\$

Hint: Using  $\int \frac{1}{1+x^{2}} d x$

Explanation: \begin{aligned} & \frac{d y}{d x}-\frac{2 x y}{1+x^{2}}=x^{2}+2 \\ & \end{aligned}

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

This is a first order linear differential equation of the form

\begin{aligned} &\frac{d y}{d x}+P y=Q \\ &P=\frac{-2 x}{1+x^{2}} \text { and } Q=x^{2}+2 \end{aligned}

The integrating factor $If$  of this differential equation is

\begin{aligned} &I f=e^{\int P d x} \\ &=e^{\int-\frac{2 x}{1+x^{2}} d x} \\ &=e^{-2 \int \frac{x}{1+x^{2}} d x} \\ &=e^{-\log \left|1+x^{2}\right|} \quad\left[\int \frac{1}{x} d x=\log |x|+C\right] \\ &=e^{\log \left|1+x^{2}\right|^{-1}} \\ &=\left(1+x^{2}\right)^{-1} \end{aligned}
$=\frac{1}{1+x^{2}}$

Hence, the solution of different equation is

\begin{aligned} &y I f=\int Q I f d x+C \\ &=y\left(\frac{1}{1+x^{2}}\right)=\int\left(x^{2}+2\right) \frac{1}{x^{2}+1} d x+C \\ &=\frac{y}{1+x^{2}}=\int \frac{x^{2}+1+1}{x^{2}+1} d x+C \\ &=\frac{y}{1+x^{2}}=\int \frac{x^{2}+1}{x^{2}+1}+\frac{1}{x^{2}+1} d x+C \end{aligned}
\begin{aligned} &=\frac{y}{1+x^{2}}=\int 1+\frac{1}{x^{2}+1} d x+C \\ &=\frac{y}{1+x^{2}}=\int 1 d x+\int \frac{1}{x^{2}+1} d x+C \\ &=\frac{y}{1+x^{2}}=x+\tan ^{-1} x+C \quad\left[\int \frac{1}{x^{2}+1} d x=\tan ^{-1} x\right] \\ &=y=\left(1+x^{2}\right)\left(x+\tan ^{-1} x+C\right) \end{aligned}