<s>[INST] $\int \cos^{-1} x \; dx$; trying to salvage an unsuccessful attempt $$
\begin{align}
\int \cos^{-1} x \; dx &= \int \cos^{-1} x \times 1 \; dx
\end{align}
$$
Then, setting 
$$\begin{array}{l l}
u=\cos^{-1} x & v=x \\
u' = -\frac{1}{\sqrt{1-x^2}} & v'=1\\
\end{array}$$
Then by the IBP technique, we have:
$$\begin{array}{l l}
\int \cos^{-1} x \times 1 \; dx &=\cos^{-1} (x) \cdot x - \int x \cdot -\frac{1}{\sqrt{1-x^2}} \; dx\\
&= x \cos^{-1} (x) - \int -\frac{x}{\sqrt{1-x^2}} \; dx\\
\end{array}$$
Now at this point suppose I have overlooked the possibility of using integration by substitution (setting $u=1-x^2$) to simplify the second integral.  Instead, I attempt to reapply IBP to the second integral $\int -\frac{x}{\sqrt{1-x^2}} \; dx$.
I let
$$\begin{array}{l l}
u= -\frac{1}{\sqrt{1-x^2}} = -(1-x^2)^{-\frac{1}{2}} \qquad & v= \frac{x^2}{2} \\
u' = - \left( -\frac{1}{2} \right) (1-x^2)^{-\frac{3}{2}} \times -2x = -x(1-x^2)^{-\frac{3}{2}} \qquad & v'=x\\
\end{array}$$
Then by IBP again,
$$\begin{array}{l l}
\int \cos^{-1} x \times 1 \; dx &= x \cos^{-1} (x) - \left( -\frac{1}{\sqrt{1-x^2}} \cdot \frac{x^2}{2} - \int \frac{x^2}{2} \cdot -x(1-x^2)^{-\frac{3}{2}} \; dx \right) \\
\end{array}$$
At this stage, I can see no way to proceed.  Can anyone see a reasonable way to salvage this solution, continuing along this line of reasoning?  Or was approaching the second integral by IBP doomed to fail?
 [/INST] So, it looks like you are just having problems with $- \int \frac{x^2}{2} \cdot -x(1-x^2)^{-\frac{3}{2}} \; dx =\frac{1}{2}\int \frac{x^3}{(1-x^2)^{\frac{3}{2}}}dx $.
Lets look at $\int \frac{x^3}{(1-x^2)^\frac{3}{2}}dx$
$$
u=1-x^2 , \text{ then }  
$$
$$
du=-2xdx \text{ and } 
$$
$$
u-1=x^2 
$$
Rewriting,
$$
\begin{array}{l l}
\int \frac{x^3}{(1-x^2)^\frac{3}{2}}dx &=-\frac{1}{2}\int \frac{x^2(-2xdx)}{(1-x^2)^\frac{3}{2}}\\
\\
\end{array}


$$
So,
$$
\begin{array}{l l}
-\frac{1}{2}\int \frac{1-u}{u^\frac{3}{2}}du &=-\frac{1}{2}\int (u^{-\frac{3}{2}}-u^{-\frac{1}{2}})du\\
&= \frac{1}{\sqrt{u}}+\sqrt{u}+C\\
\end{array}
$$
or, going back to x
$$
\frac{1}{\sqrt{1-x^2}}+\sqrt{1-x^2}+C
$$
getting a common denominator gives the equivalent
$$
\frac{2-x^2}{\sqrt{1-x^2}}+C
$$
I hope that helps.  When you first start learning it is tough to know which method to use!  Practice is really one of the best ways to get better at integration problems.  I didn't try it, but I bet you could solve this integral by trig-sub too.
</s>