Find the general solution for each of the following differential equations. \left(1+\mathrm{x}^{2}\right) \frac{\mathrm{dy}}{\mathrm{dx}}+2 \mathrm{xy}=\frac{1}{\left(1+\mathrm{x}^{2}\right)}
Find the general solution for each of the following differential equations. \left(1+\mathrm{x}^{2}\right) \frac{\mathrm{dy}}{\mathrm{dx}}+2 \mathrm{xy}=\frac{1}{\left(1+\mathrm{x}^{2}\right)}

Solution:

\left(1+x^{2}\right) \frac{d y}{d x}+2 x y=\frac{1}{\left(1+x^{2}\right)}\dots \dots(1)
To solve (1) we will use following formula
\begin{array}{l} \int \frac{f^{\prime}(x)}{f(x)} d x=\log f(x) \\ \int \frac{1}{\left(1+x^{2}\right)} d x=\tan ^{-1} \mathrm{x} \end{array}
a^{\log _{a} b}=\log b
General solution for the differential equation in the form of
\frac{d y}{d x}+P y=Q
is given by,
y \cdot(I . F .)=\int Q \cdot(I . F .) d x+c
Where, integrating factor,
\text { I.F. }=e \int^{p d x}
Dividing equation (1) by \left(1+x^{2}\right)
\frac{d y}{d x}+\frac{2 x}{\left(1+x^{2}\right)} \cdot y=\frac{1}{\left(1+x^{2}\right)^{2}} \ldots \ldots
Comparing (2) with
\frac{d y}{d x}+P y=Q
Where, P=\frac{2 x}{\left(1+x^{2}\right)} \operatorname{and} Q=\frac{1}{\left(1+x^{2}\right)^{2}}
Therefore, integrating factor is
\begin{array}{r} \text { I. } F .=e \int^{p d x} \\ e^{\int^{\int}\left(1+x^{2}\right)} d x \\ f(x)=\left(1+x^{2}\right) \& f^{\prime}(x)=2 \mathrm{x} \end{array}
\begin{array}{c} e^{\log \left(1+x^{2}\right)}-\left(\int \frac{f^{\prime}(x)}{f(x)}\right) d x=\log f(x) \\ \left(1+x^{2}\right)_{-}\left(a^{\log _{a} b}=\log b\right) \end{array}
General solution is
\begin{array}{c} y \cdot(I . F .)=\int Q \cdot(I . F .) d x+c \\ \mathrm{y} \cdot\left(1+x^{2}\right)=\int \frac{1}{\left(1+x^{2}\right)^{2}} \cdot\left(1+x^{2}\right) d x+c \\ \mathrm{y} \cdot\left(1+x^{2}\right)=\tan ^{-1} x+c_{-}\left(\int \frac{1}{\left(1+x^{2}\right)^{2}} d x=\tan ^{-1} x\right) \end{array}
So, general solution is
\text { y. }\left(1+x^{2}\right)=\tan ^{-1} x+c