How do you evaluate this integral?
$$\int x \sqrt{4x-x^2}\mathrm dx$$
I have no idea on how to integrate it.
How do you evaluate this integral?
$$\int x \sqrt{4x-x^2}\mathrm dx$$
I have no idea on how to integrate it.
The following solution was found with the help of Integral Calculator:
Noting that the derivative of $4x-x^2$ is $4-2x$, the given integral can be split into $2$ integrals as follows: $$\int x\sqrt{4x-x^2}\mathrm dx=-\frac12\underbrace{\int\sqrt{4x-x^2}\mathrm d(4x-x^2)}_{t=4x-x^2}+2\underbrace{\int\sqrt{4-(x-2)^2}\mathrm dx}_{\mathcal I}$$
For evaluating $\mathcal I$, use the standard integral:
$$\int\sqrt{a^2-x^2}\mathrm dx=\frac{x}{2}\sqrt{a^2-x^2} +\frac{a^2}{2}\sin^{-1}\left(\frac{x}{a}\right)+C$$
As $\displaystyle 4x-x^2=4-(x-2)^2$ following this set $x-2=2\sin\theta\ \ \ \ (1)$
Due to the reason explained here, $\displaystyle\sqrt{4x-x^2}=\sqrt{4\cos^2\theta}=+2\cos\theta\ \ \ \ (2)$
So, $\displaystyle\int x\sqrt{4x-x^2}dx=\int(2\sin\theta+2)2\cos\theta\cdot 2\cos\theta d\theta$
$\displaystyle=4\int(1+\sin\theta)(2\cos^2\theta)d\theta$
Now, $\displaystyle4(1+\sin\theta)(2\cos^2\theta)$
$\displaystyle=4(1+\sin\theta)(1+\cos2\theta)$ (using $\cos2A=2\cos^2A-1$)
$\displaystyle=4+4\sin\theta+4\cos2\theta+4\sin\theta\cos2\theta$
$\displaystyle=4+2\sin\theta+4\cos2\theta+2\sin3\theta$ (using $2\sin B\cos A=\sin(A+B)-\sin(A-B)$)
We need to use $\displaystyle\cos mxdx=\frac{\sin mx}m+C$ and $\displaystyle\sin mxdx=-\frac{\cos mx}m+K$
From $(1),(2);$ we already have $\displaystyle\sin\theta=\frac{x-2}2\implies\theta=\arcsin\frac{(x-2)}2$ and $\displaystyle\cos\theta=+\frac{\sqrt{4x-x^2}}2 $
From the original integral, we know that
$$\begin{aligned} \int x \sqrt{4x - x^2} dx &= \int x \sqrt{4 - 4 + 4x - x^2}dx \\ &= \int x \sqrt{4 - (x-2)^2}dx \end{aligned}$$
So here we let
$$x = 2 + 2 \sin(t), \frac{-\pi}{2} \leq t \leq \frac{\pi}{2}$$
and the integral is tranformed into
$$\begin{aligned} \int x \sqrt{4 - (x-2)^2}dx &= \int (2+2\sin(t)) 2 \cos(t) d(2+2\sin(t)) \\ &= 8\int (1+\sin(t)) \cos^2(t) dt \\ &= 8\int \cos^2(t) dt + 8\int \sin(t)\cos^2(t) dt \end{aligned}$$
For $8\int \cos^2(t) dt$, since
$$\cos(2t) = \cos^2(t) - \sin^(t) = 2\cos^2(t) -1 $$
we get
$$8\int \cos^2(t) dt = 8 \int \frac{1 + \cos(2t)}{2} dt = 4t + 2\sin(2t) + C_1 $$
Also, for $8\int \sin(t)\cos^2(t) dt$, we have
$$ 8\int \sin(t)\cos^2(t) dt = -8\int \cos^2(t) d(\cos(t)) = \frac{-3}{8} \cos^3(t) + C_2 $$
So we have
$$ \begin{aligned} \int x \sqrt{4 - (x-2)^2}dx &= 8\int \cos^2(t) dt + 8\int \sin(t)\cos^2(t) dt \\ &= 4t + 2\sin(2t) - \frac{3}{8} \cos^3(t) + C \\ &= 4t + 4\sin(t)\cos(t) - \frac{3}{8} \cos^3(t) + C \cdots(*) \end{aligned}$$
where $C = C_1 + C_2$ is a constant.
Then, since $x = 2 + 2 \sin(t), \frac{-\pi}{2} \leq t \leq \frac{\pi}{2}$, we have
$$\begin{cases} \sin(t) = \frac{x-2}{2} \\ \cos(t) = \sqrt{1 - \sin^2(t)} = \frac{1}{2} \sqrt{4-(x-2)^2} \\ t = \arcsin(\frac{x-2}{2}) \end{cases}$$
And then we plug $\sin(t),\cos(t)$ and $t$ into $(*)$, we get
$$\begin{aligned} \int x \sqrt{4 - (x-2)^2}dx &= 4t + 4\sin(t)\cos(t) - \frac{3}{8} \cos^3(t) + C \\ &= 4\arcsin(\frac{x-2}{2}) + (x-2)\sqrt{4-(x-2)^2} - \frac{3}{64} (4-(x-2)^2)^{\frac{3}{2}} + C \end{aligned}$$
where $C$ is a constant.
After the first substitution which must be stressed, we have $$\int x\sqrt{4x-x^2}dx\stackrel{\color{red}{ x=u+2}}{=}\underbrace{\int u\sqrt{4-u^2}du}_{I}+\underbrace{\int2\sqrt{4-u^2}du}_{II}$$ The first one is easy, an it can be done by head: $$I=-\frac13(4-u^2)^\frac32+C_1$$ For the second piece, notice that $$2\sqrt{4-u^2}=\left(\sqrt{4-u^2}-\frac{u^2}{\sqrt{4-u^2}}\right)+\frac4{\sqrt{4-u^2}}$$ and thus $$II=u\sqrt{4-u^2}+4\arcsin(\tfrac u2)+C_2$$