As we know,
Form of a linear differential equation:
\(\frac{d y}{d x}+P y=Q\), where \(P\) and \(Q\) are the functions of \(x\)
Integrating factor \(=e^{\int P d x}\)
General solution is given by:
\(y \times e^{\int P d x}=\int Q \times e^{\int P d x} d x+C\)
Given:
Differential equation is \(\left(1-x^2\right) \frac{d y}{d x}-x y=1\)
Divide by \(\left(1-x^2\right)\) on both sides, we get
\(\Rightarrow \frac{{dy}}{{dx}}-\frac{{xy}}{\left(1-{x}^2\right)}=\frac{1}{\left(1-{x}^2\right)}\)
Now, by comparing the above equation with \(\frac{{dy}}{{dx}}+{Py}={Q}\)
So, \({P}=-\frac{{x}}{\left(1-{x}^2\right)}\)
Now,
Integrating factor \(={e}^{\int {P}} {dx}\)
\( ={e}^{\int \frac{-{x}}{\left(1-{x}^2\right)} d {x}}\)
\(={e}^{\frac{1}{2} \int \frac{-2 {x}}{\left(1-{x}^2\right)} d {x}}\)
Let \(1-x^2=t\)
Differentiating with respect to \(x\), we get
\(\Rightarrow(0-2 {x}) {dx}={dt} \)
\(\Rightarrow-2 {xdx}={dt}\)
Integrating factor \(={e}^{\frac{1}{2} \int \frac{{dt}}{t}}\)
\(={e}^{\frac{1}{2} \log \mathrm{t}}\)
\(={e}^{\log t^{\frac{1}{2}}}\)
\(={t}^{\frac{1}{2}}\)
\(=\left(1-{x}^2\right)^{\frac{1}{2}}\)
\(=\sqrt{1-{x}^2}\)