<s>[INST] Evaluating $\int x^2 \sqrt{1-x^2}\ dx$ I hope I can find a way to integrate this formula without resorting to numerical techniques.
\begin{equation}
\int x^2 \sqrt{1-x^2}\ dx
\end{equation}
I am not sure if there's actually a closed form for this or not?
I tried integration by parts, but it seems not working! Here's my last resort before numerical solutions.
 [/INST] Here is a solution with integration by parts and rearranging terms:
First, integrating by parts and adding and subtracting a $1$ in the numerator,
$$
\begin{aligned}
I=\int x^2\sqrt{1-x^2}\,dx & = \frac{x^3}{3}\sqrt{1-x^2}+\int\frac{x^3}{3}\frac{x}{\sqrt{1-x^2}}\,dx\\
&=\frac{x^3}{3}\sqrt{1-x^2}-\int\frac{x^3}{3}\sqrt{1-x^2}\,dx+\int\frac{x^3}{3}\frac{1}{\sqrt{1-x^2}}\,dx.
\end{aligned}
$$
We got $I$ back in the right-hand side, and moving it to the left-hand side, we find
$$
I=\frac{x^3}{4}\sqrt{1-x^2}+\int\frac{1}{4}\frac{x^2}{\sqrt{1-x^2}}\,dx.\tag{1}
$$
We can continue from $(1)$ in two ways. Adding and subtracting a $1$ in the numerator, we get
$$
I=\frac{x^3}{4}\sqrt{1-x^2}-\frac{1}{4}\int\sqrt{1-x^2}\,dx+\frac{1}{4}\int\frac{1}{\sqrt{1-x^2}}\,dx\tag{2}
$$
If we instead integrate by parts, we get
$$
I=\frac{x^3}{4}\sqrt{1-x^2}-\frac{1}{4}x\sqrt{1-x^2}+\frac{1}{4}\int\sqrt{1-x^2}\,dx.\tag{3}
$$
We add $(2)$ and $(3)$, and find that
$$
2I=\frac{x^3}{2}\sqrt{1-x^2}-\frac{1}{4}x\sqrt{1-x^2}+\frac{1}{4}\int\frac{1}{\sqrt{1-x^2}}\,dx,
$$
and hence, finally,
$$
\begin{aligned}
I&=\frac{x^3}{4}\sqrt{1-x^2}-\frac{1}{8}x\sqrt{1-x^2}+\frac{1}{8}\int\frac{1}{\sqrt{1-x^2}}\,dx\\
&=\frac{x^3}{4}\sqrt{1-x^2}-\frac{1}{8}x\sqrt{1-x^2}+\frac{1}{8}\arcsin x+C.
\end{aligned}
$$
</s>