#### Explain solution for RD Sharma Class 12 Chapter 21 Differential Equation Exercise 21.10 Question 36 subquestion (vi) maths textbook solution.

Answer : $\left(1+x^{2}\right)\left(x+\tan ^{-1} x+C\right)$

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

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

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

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

\begin{aligned} &=e^{\log \left|1+x^{2}\right|^{-1}} \\ &=\left(1+x^{2}\right)^{-1} \\ &=\frac{1}{1+x^{2}} \end{aligned}

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}