<s>[INST] Evaluate the following integral $\int \frac{2x^2+x\cos x+\sin^{-1}x}{1+\sqrt{1-x^2}}$ I change the integral  $\int \frac{2x^2+x\cos x+\sin^{-1}x}{1+\sqrt{1-x^2}}$ into 
$$\int \frac{2x^2}{1+\sqrt{1-x^2}} + \int \frac{x\cos x}{1+\sqrt{1-x^2}} + \int \frac{\sin^{-1}x}{1+\sqrt{1-x^2}}$$
and I figure out $\int \frac{2x^2}{1+\sqrt{1-x^2}} = -\sin^{-1}x + 2x-x\sqrt{1-x^2}$
, however I don't know how to calculate the remaining integrals...
I have tried trigonometric substitution but it seems not working.
Can anyone give me some tips? Thanks a lot!
 [/INST] PARTIAL ANSWER
First solve 
\begin{eqnarray}
\mathcal I_1 &=& \int \frac1{1+\sqrt{1-x^2}}dx=\\
&=&\int\frac{1-\sqrt{1-x^2}}{x^2} dx=\\
&=&-\frac1x-\int\frac{\sqrt{1-x^2}}{x^2}dx.
\end{eqnarray}
Using $x=\sin t$ we get
\begin{eqnarray}
\mathcal I_1 &=&-\frac1x - \int \cot^2 t dt=\\
&=&-\frac1x + \cot t+ t+C=\\
&=&-\frac1x  +\frac{\sqrt{1-x^2}}{x}+\arcsin x + C.
\end{eqnarray}
Using this result we can deal with
\begin{eqnarray}
\mathcal I_2 &=& \int\frac{\arcsin x}{1+\sqrt{1-x^2}}dx=\\
&=& \int\arcsin x d\left(-\frac1x  +\frac{\sqrt{1-x^2}}{x}+\arcsin x\right)=\\
&=&-\frac{\arcsin x}x  +\frac{\arcsin x\sqrt{1-x^2}}{x}+\arcsin^2 x+\\
& &-  \int\left(-\frac{1}{x\sqrt{1-x^2}}+\frac1x + \frac{\arcsin x}{\sqrt{1-x^2}}\right) dx=\\
&=&-\frac{\arcsin x}x  +\frac{\arcsin x\sqrt{1-x^2}}{x}+\arcsin^2 x+\\
& &-\log |x|-\frac12 \arcsin^2 x+\int\frac1{x\sqrt{1-x^2}}dx.
\end{eqnarray}
The last term above can be dealt with again with a trigonometric substitution $x=\sin t$, yielding
\begin{eqnarray}
\mathcal I_3 &=& \int\frac1{x\sqrt{1-x^2}}dx = \\
&=& \int \csc t dt=\\
&=& -\log |\cot t + \csc t| + C=\\
&=& -\log\left|\frac{\sqrt{1-x^2}}{x}-\frac1x\right|+C=\\
&=&\log|x| - \log\left|\sqrt{1-x^2}-1\right|+C.
\end{eqnarray}
Thus the last term in you original sum is
\begin{eqnarray}
\mathcal I_2&=& -\frac{\arcsin x}x  +\frac{\arcsin x\sqrt{1-x^2}}{x}+\\
& &+\frac12 \arcsin^2 x- \log\left|\sqrt{1-x^2}-1\right|+C.
\end{eqnarray}
</s>