How to find the indefinite integral for $\int \frac{x^2}{\sqrt{r^2 - x^2}}dx$? I'm trying to find the indefinite integral of 
$$ \int \frac{x^2}{\sqrt{r^2 - x^2}}dx$$
where r is a positive number.
EDIT: I'm wondering how to find the integral, not just what it is.
 A: Use integration by parts ($u=x$ and $\mathrm dv$ is the rest):
$$I=\int\frac{x^2}{\sqrt{r^2-x^2}}\,\mathrm dx=x\int\frac x{\sqrt{r^2-x^2}}\,\mathrm dx-\iint\frac x{\sqrt{r^2-x^2}}\,\mathrm dx^2;$$
now,
\begin{align}
J&=\int\frac x{\sqrt{r^2-x^2}}\,\mathrm dx=-\frac12\int\frac {-2x\mathrm dx}{\sqrt{r^2-x^2}}=-\frac12\int\frac {\mathrm d\left(-x^2\right)}{\sqrt{r^2-x^2}}=-\frac12\int\frac {\mathrm d\left(r^2-x^2\right)}{\sqrt{r^2-x^2}}=\\
&=-\frac12\int\left(r^2-x^2\right)^{-1/2}\mathrm d\left(r^2-x^2\right)=-\frac12\frac{\left(r^2-x^2\right)^{1/2}}{1/2}=-\sqrt{r^2-x^2};
\end{align}
and the last step is to find
$$-\int J\,\mathrm dx=\int\sqrt{r^2-x^2}\,\mathrm dx,$$
which is accomplished by setting $x=r\sin(z)$:
$$-\int J\,\mathrm dx=\int\sqrt{r^2-r^2\sin(z)^2}\,\mathrm d\left(r\sin\left(z\right)\right)=r\int\cos(z)r\cos(z)\,\mathrm dz=r^2\int\cos(z)^2\,\mathrm dz.$$
Use the corresponding trigonometric power-reduction formulae to evaluate the last one, substitute back for $z$, which from $x=r\sin(z)$ is given as $z=\arcsin\left(x/r\right)$, and assemble the original integral:
$$I=xJ-\int J\,\mathrm dx.$$
A: $$
\int \frac{x^2}{\sqrt{r^2-x^2}} \, dx = \int \frac{r^2\sin^2\theta}{\sqrt{r^2-r^2\sin^2\theta}}\, r\cos\theta\,d\theta = \int\frac{r^2\sin^2\theta}{r\cos\theta} r\cos\theta\,d\theta = \cdots
$$
A: Hint: Use the trigonometric substitution $x = r \sin \theta$.
A: A good trick for choosing trigonometric substitutions is to draw a triangle. Here you want $\sqrt{r^2-x^2}$ to be a trigonometric variable. That means the hypotenuse is $r$ and one leg is $x$. Say that leg is opposite $\theta$ (this is not essential); then the other leg is $\sqrt{r^2-x^2}$. Thus $\cos(\theta)=\sqrt{r^2-x^2}/r$, hence $\sqrt{r^2-x^2}=r \cos(\theta)$. Also $\sin(\theta)=x/r$ so $x=r \sin(\theta)$. Finally $dx=r \cos(\theta) d \theta$ and $x^2=r^2 \sin(\theta)^2$. So now you are able to replace everything to get a trigonometric integral.
A: Let $x=r\sin t$, then $dx=r\cos t \, dt$
\begin{align*}
  \int \frac{x^{2}}{\sqrt{r^{2}-x^{2}}} \, dx &=
  \int \frac{r^{2}\sin^{2} t}{r\cos t} \times r\cos t \, dt \\ &=
  r^{2} \int \sin^{2} t \, dt \\ &=
  \frac{r^{2}}{2} \int (1-\cos 2t) \, dt \\ &=
  \frac{r^{2}}{2} \left( t-\frac{1}{2} \sin 2t \right) \\ &=
  \frac{r^{2}}{2} ( t-\sin t \cos t ) \\ &=
  \frac{1}{2} \left(  r^{2}\sin^{-1} x- x\sqrt{r^{2}-x^{2}} \, \right)
\end{align*}
