# Evaluate integral $\int \frac{(2-x^2)e^x}{(1-x)(\sqrt{1-x^2})}dx$

I tried to solve it by the following method:

\begin{align*} \int \frac{(2-x^2)e^x}{(1-x)(\sqrt{1-x^2})}dx&= \int \frac{(1-x^2)e^x+\frac{e^x}{2}+\frac{e^x}{2}}{(1-x)(\sqrt{1-x^2}) }dx \\ &= \int \frac{(1-x^2)e^x+\frac{(1-x)e^x}{2}+\frac{(1+x)e^x}{2}}{(1-x)(\sqrt{1-x^2}) }dx \\ &=\int \frac{\sqrt{(1-x^2)}e^x+\frac{\sqrt{(1-x)}e^x}{2\sqrt{x+1}}+\frac{\sqrt{(1+x)}e^x}{2\sqrt{1-x}}}{(1-x) }dx \\&= \int \frac{\sqrt{1-x}(\sqrt{x+1}\cdot e^x+\frac{e^x}{2\sqrt{x+1}})+\sqrt{x+1}\cdot e^x \cdot \frac{1}{2\sqrt{1-x}}}{1-x}dx \\&= \int\left(\frac{\sqrt{x+1}\cdot e^x}{\sqrt{1-x}}\right)'dx \\ &=\left(\frac{\sqrt{x+1}\cdot e^x}{\sqrt{1-x}}\right)+C \end{align*} Is this solution right? if it is right are there other methods to solve it.

• I have changed the formatting of the title so as to make it take up less vertical space -- this is a policy to ensure that the scarce space on the main page is distributed evenly over the questions. See here for more information. Please take this into consideration for future questions. Thanks in advance. Jan 5, 2021 at 13:25
• Your result is perfect. Only one comment from me : very good work and $\to +1$ Jan 5, 2021 at 13:54

$$\frac{2-x^2}{(1-x)(\sqrt{1-x^2})}= \frac{(1-x^2)+1}{(1-x)(\sqrt{1-x^2})}\\=\sqrt{\frac{1+x}{1-x} }+ \frac{1}{(1-x)^{3/2}\sqrt{1+x})} = \sqrt{\frac{1+x}{1-x} }+ \left( \sqrt{\frac{1+x}{1-x} }\right)’$$
and then apply to $$f(x)= \sqrt{\frac{1+x}{1-x} }$$ the general integral result $$\int e^x(f(x)+f’(x)) dx= e^x f(x)$$ to obtain $$\int \frac{(2-x^2)e^x}{(1-x)(\sqrt{1-x^2})}dx =\sqrt{\frac{1+x}{1-x} }\>e^x +C$$