How do you integrate: $\int_0^r\sqrt{x-x^2}.dx$ $$\int_0^r\sqrt{x-x^2}.dx$$
I only have basic calculus and would like to know how would one go about integrating an expression of this form.
I have tried substituting say $u=x-x^2$ but I'm still left with an $x$.
The method is not in my book and I can't find a similar example anywhere.
A hint in the right direction is sufficient.
 A: $$\mathcal{I}(\text{r})=\int_0^\text{r}\sqrt{x-x^2}\space\text{d}x=\int_0^\text{r}\sqrt{\frac{1}{4}-\left(x-\frac{1}{2}\right)^2}\space\text{d}x=$$

Substitute $u=x-\frac{1}{2}$ and $\text{d}u=\text{d}x$.
This gives a new lower bound $u=0-\frac{1}{2}=-\frac{1}{2}$ and upper bound $u=\text{r}-\frac{1}{2}$:

$$\int_{-\frac{1}{2}}^{\text{r}-\frac{1}{2}}\sqrt{\frac{1}{4}-u^2}\space\text{d}u=$$

Substitute $u=\frac{\sin(s)}{2}$ and $\text{d}u=\frac{\cos(s)}{2}\space\text{d}s$.
Then $\sqrt{\frac{1}{4}-u^2}=\sqrt{\frac{1}{4}-\frac{\sin^2(s)}{4}}=\frac{\cos(s)}{2}$ and $s=\arcsin(2u)$.
This gives a new lower bound $s=\arcsin\left(-1\right)=-\frac{\pi}{2}$ and upper bound $s=\arcsin\left(2\text{r}-1\right)$:

$$\frac{1}{4}\int_{-\frac{\pi}{2}}^{\arcsin\left(2\text{r}-1\right)}\cos^2(s)\space\text{d}s=$$

Use $\cos^2(s)=\frac{1+\cos(2s)}{2}$:

$$\frac{1}{8}\int_{-\frac{\pi}{2}}^{\arcsin\left(2\text{r}-1\right)}\cos(2s)\space\text{d}s+\frac{1}{8}\int_{-\frac{\pi}{2}}^{\arcsin\left(2\text{r}-1\right)}1\space\text{d}s=$$

For $\int_{-\frac{\pi}{2}}^{\arcsin\left(2\text{r}-1\right)}\cos(2s)\space\text{d}s$ substitute $p=2s$ and $\text{d}p=2\space\text{d}s$.
This gives a new lower bound $s=2\cdot-\frac{\pi}{2}=-\pi$ and upper bound $s=2\arcsin\left(2\text{r}-1\right)$:

$$\frac{1}{16}\int_{-\pi}^{2\arcsin\left(2\text{r}-1\right)}\cos(p)\space\text{d}p+\frac{1}{8}\int_{-\frac{\pi}{2}}^{\arcsin\left(2\text{r}-1\right)}1\space\text{d}s=$$

Use:


*

*$$\int1\space\text{d}s=s+\text{C}$$

*$$\int\cos(p)\space\text{d}p=\sin(p)+\text{C}$$


$$\frac{1}{16}\left[\sin(p)\right]_{-\pi}^{2\arcsin\left(2\text{r}-1\right)}+\frac{1}{8}\left[s\right]_{-\frac{\pi}{2}}^{\arcsin\left(2\text{r}-1\right)}=$$
$$\frac{\sin(2\arcsin\left(2\text{r}-1\right))-\sin(-\pi)}{16}+\frac{\arcsin\left(2\text{r}-1\right)+\frac{\pi}{2}}{8}=$$
$$\frac{\sin(2\arcsin\left(2\text{r}-1\right))}{16}+\frac{\arcsin\left(2\text{r}-1\right)+\frac{\pi}{2}}{8}$$
A: First of all, the function is defined for $0\le x\le 1$, so we have to assume the same for $r$.
Consider the curve $y=\sqrt{x-x^2}$ that we can square leading to $x^2+y^2-x=0$, which is the equation of a circle with center at $(1/2,0)$ and radius $1/2$. Thus a substitution that can work is
$$
x-\frac{1}{2}=\frac{1}{2}\cos t
$$
with $t\in[0,\pi]$ so $\sin t\ge0$.
With this substitution we have $\sqrt{x-x^2}=\frac{1}{2}\sin t$ “by design”, or, if you prefer to work it out,
$$
x-x^2=\frac{1}{2}+\frac{1}{2}\cos t-\frac{1}{4}+\frac{1}{2}\cos t+\frac{1}{4}\cos^2t=\frac{1}{4}\sin^2t
$$
Now the integral becomes, after noting that $dx=-\frac{1}{2}\sin t\,dt$,
$$
-\frac{1}{4}\int_{\pi}^{\arccos(2r-1)}\sin^2t\,dt=
\frac{1}{4}\int_{\arccos(2r-1)}^{\pi}\sin^2t\,dt
$$
An antiderivative of $\sin^2t$ is well known to be
$$
\frac{1}{2}(t-\sin t\cos t)
$$
so the integral is
$$
\frac{1}{8}\Bigl[t-\sin t\cos t\Bigr]_{\arccos(2r-1)}^{\pi}=
\frac{1}{8}\Bigl(\pi-\arccos(2r-1)+(2r-1)\sqrt{1-(2r-1)^2}\,\Bigr)
$$
A: Let $\sqrt{x}=\sin t$, so $x=\sin^2 t,\; dx=2\sin t\cos t \,dt$.
Then $\displaystyle\int\sqrt{x-x^2}dx=\int(\sin t\cos t)(2\sin t\cos t)dt=\int2\sin^2 t\cos^2t dt=\frac{1}{2}\int\sin^2 2t dt$
$\;\;\;=\displaystyle\frac{1}{4}\int(1-\cos 4t)dt=\frac{1}{4}\left[t-\frac{1}{4}\sin 4t\right]+C=\frac{1}{4}\left[t-\sin t\cos t(\cos^2 t-\sin^2 t)\right]+C$
$\displaystyle=\frac{1}{4}\left[\sin^{-1}\sqrt{x}-\sqrt{x}\sqrt{1-x}((1-x)-x)\right]+C=\frac{1}{4}\left[\sin^{-1}\sqrt{x}-\sqrt{x-x^2}(1-2x)\right]+C$,
so $\displaystyle\int_0^r\sqrt{x-x^2}dx=\color{blue}{{\frac{1}{4}\left(\sin^{-1}\sqrt{r}-\sqrt{r-r^2}(1-2r)\right)}}$
