<s>[INST] Find a primitive of $x^2\sqrt{a^2 - x^2}$ I'm stuck on this problem for the last while now and any help would be appreciated. I need to find the indefinite integral of $$\int x^2\sqrt{a^2-x^2} dx$$ 
and show that it equals  $$\frac x8(2x^2-a^2)\sqrt{a^2-x^2}+{a^4\over 8}\arcsin{x\over a}+c$$
I've tried using the substitution $x=a\sin t$ and $x=a\sec t$  Both have looked promising but I just can't seem to finish it out. 
Thanks in advance for any help.
 [/INST] $$ \int x^2 \sqrt{a^2 - x^2} ~dx ~ = ~ a^4 \int \sin^2 u \cos^2 u ~du ~ = ~ a^4 \int \sin^2 u - \sin^4 u ~ du \quad (x = a \sin u)$$
Using the double angle formulae $\cos 2A=2\cos^2A-1=1-2\sin^2A$
$$\begin{align}
\sin^2u &=\dfrac{1-\cos{2u}}{2}\\
\\
\sin^4u &=\left(\sin^2u\right)^2\\
\\
&=\left(\dfrac{1-\cos{2u}}{2} \right)^2\\
\\
&=\dfrac{1}{4} \left( 1-2\cos 2u+\cos^2 2u \right)\\
\\
&=\dfrac{1}{4} \left( 1-2\cos 2u+\dfrac{1+\cos{4u}}{2} \right)\\
 \\
&=\dfrac{1}{8} \left( 3-4\cos 2u+\cos{4u} \right)\\
\end{align}$$
Hence$$a^4 \int \left(\sin^2 u - \sin^4 u \right) ~ du =\frac{a^4}{2} \int \left(1-\cos{2u} \right) \ du \ -\frac{a^4}{8} \int \left( 3-4\cos 2u+\cos{4u} \right) \ du$$
</s>