<s>[INST] 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.
 [/INST] 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*}
</s>