<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] Calculating this integral can be done by parts:
$$I=\int x^2\sqrt{a^2-x^2} dx= -\int x(\frac{1}{3}(\sqrt{a^2-x^2})^{\frac{3}{2}} )' dx=$$
$$=-\frac{x}{3}(\sqrt{a^2-x^2})^{\frac{3}{2}}+\frac{1}{3}\int(a^2 -x^2)\sqrt{a^2-x^2}dx.
$$ 
$$\frac{4}{3}I=-\frac{x}{3}(\sqrt{a^2-x^2})^{\frac{3}{2}}+a^2\int\sqrt{a^2-x^2} dx. (1)$$
    And$$J=\int\sqrt{a^2-x^2} dx =\int(x)'\sqrt{a^2-x^2} dx =x\sqrt{a^2-x^2} -\int\frac{a^2-x^2-a^2}{\sqrt{a^2-x^2}}dx=$$
$$=x\sqrt{a^2-x^2}-J+a^2\arcsin\frac{x}{a}$$ from which is obtained$$J=\frac{x}{2}\sqrt{a^2-x^2} +\frac{a^2}{2}\arcsin\frac{x}{a}.$$
Substituting formula $I$ in $(1)$ we obtain $J$.
</s>