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.
 A: We will assume that $a>0$ for the following.
We have
$$\int x^2\sqrt{a^2-x^2} \,dx.$$
Let 
$$
\begin{align*}
x&=a\sin{t} \\
dx &= a\cos{t} \, dt \\
a^2-x^2&=a^2-a^2\sin{t}\\
&=a^2\left( 1-\sin^2{t} \right)\\
&=a^2\cos^2{t}.
\end{align*}
$$
We substitute and integrate,
$$
\begin{align*}
&\int a^2\sin^2t \cdot \sqrt{a^2\cos^2t}\,\cdot a \cos t \,dt \\
=&a^4\int\sin^2 t \cos^2 t \, dt \\
=&a^4 \int\left( \sin t \cdot \cos t \right)^2 \, dt \\
=&a^4 \int\left( \frac{1}{2}\sin(2t) \right)^2 \, dt \\
=&\frac{a^4}{4}\int \sin^2(2t)\, dt \\
=& \frac{a^4}{4} \int \frac{1-\cos(4t)}{2} \, dt \\
=& \frac{a^4}{8} \int \left(1-\cos(4t)\right) \, dt \\
=& \frac{a^4}{8} \left( t-\frac{1}{4}\sin(4t) \right)+c.
\end{align*}
$$
The back substitution will be simpler if we have single angled trig solutions, and so we can reduce,
$$
\begin{align*}
\sin(4t) &= 2\sin(2t)\cos(2t) \\
&=2\left( 2\sin t \cdot \cos t \left( \cos^2 t- \sin^2 t \right)\right) \\
&= 4\sin t \cos^3 t-4\sin^3 t \cos t.
\end{align*}
$$
Hence our integral is
$$\frac{a^4}{8}\left( t- \sin t \cos^3 t + \sin^3 t \cos t \right)+c.$$
For the back substitution, we have that 
$$x=a\sin t,$$
and so
$$t=\sin^{-1}\left(\frac{x}{a}\right).$$
For the remaining part, we draw a right triangle with angle $t$, opposite side $x$, hypotenuse $a$, and it follows that the adjacent side will be $\sqrt{a^2-x^2}$.
We use the definition of $t$ and read straight from the right triangle to back substitute,
\begin{align*}
& \frac{a^4}{8}\left( t- \sin t \cos^3 t + \sin^3 t \cos t \right) +c \\
=& \frac{a^4}{8}\left( \sin^{-1}\left(\frac{x}{a}\right)-\left(\frac{x}{a}\right)\left( \frac{\sqrt{a^2-x^2}}{a} \right)^3 +\left( \frac{x}{a} \right)^3\frac{\sqrt{a^2-x^2}}{a} \right) +c \\
=&\frac{a^4}{8}\left( \sin^{-1}\left(\frac{x}{a}\right) -\left(\frac{x}{a}\right)\frac{\sqrt{a^2-x^2}}{a}\left( \frac{a^2-x^2}{a^2}-\frac{x^2}{a^2}  \right) \right) +c \\
=& \frac{a^4}{8}\left( \sin^{-1}\left(\frac{x}{a}\right)-\frac{x\sqrt{a^2-x^2}}{a^2}\left( \frac{a^2-2x^2}{a^2} \right) \right) +c \\
=&\frac{x}{8}\left( 2x^2-a^2 \right)\sqrt{a^2-x^2}+\frac{a^4}{8}\sin^{-1}\left(\frac{x}{a}\right)+c.
\end{align*} 
This is the desired form.
A: Putting $\displaystyle x=a\sin t,t=\arcsin\frac xa \implies -\frac\pi2\le t\le \frac\pi2$ as the principal value of inverse sine ratio lies $\displaystyle\left[-\frac\pi2,\frac\pi2\right]$
$\displaystyle\implies \cos t\ge0$
$\displaystyle\implies\sqrt{a^2-x^2}=\sqrt{a^2\cos^2t}=|a\cos t|=|a|\cos t$
$\displaystyle \int x^2\sqrt{a^2-x^2}dx=a^3|a|\int\sin^2t\cos^2tdt$
$$\text{Now as }\sin t\cos t=\frac{\sin2t}2, \sin^2t\cos^2t=\frac{\sin^22t}4$$
$$\text{Again as }\cos2u=\cos^2u-\sin^2u=1-2\sin^2u,\sin^22t=\frac{1-\cos4t}2$$
$$\int\sin^2t\cos^2tdt=\frac18\int(1-\cos4t)dt=\frac t8-\frac{\sin4t}{32}+C$$
Now as $\displaystyle x=a\sin t$ and $\sin4t=2\sin2t\cos2t=4\sin t\cos t\cos2t$
$\displaystyle\cos2t=1-2\sin^2t=1-2\left(\frac xa\right)^2=-\frac{2x^2-a^2}{a^2} $
As $\displaystyle\cos t\ge 0,\cos t=+\sqrt{1-\left(\frac xa\right)^2}=\frac{\sqrt{a^2-x^2}}{|a|}$
A: $$ \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)$$
A: You also may use the method Differential Binomial to use another substitution $$a^2-x^2=x^2t^2$$ Try it. It works good. :-)
A: $$ \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$$
A: 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$.
