# Which method to use to integrate this function?

Recently I've been working on problems including integration and I'm having some difficulties solving this integral :

$$\int_0^1 (1-x)\sqrt{4x-x^2} {dx}$$

I tried to rewrite it in this form:

$$\int_0^1 (1-x)x\sqrt{\frac{4-x}{x}} dx$$ and then subsitute $\frac{4-x}{x}=t^2$ and by this substitution I get a function way easier integrated of this form:

$$-32\int\frac{(t^2-3)t^2}{(1+t^2)^4}dt$$

I can integrate this function easily by simplifying it but the problem is that I cannot define its borders because $t$ is not defined for $x=0$ so this means that my substitution doesn't hold. But I don't have any other idea how to solve it so any help will be appreciated.Thank you!

• I'd write $4x-x^2=4-(x-2)^2$ and write $x-2=2\sin\theta$. Commented Sep 11, 2018 at 20:33
• the domain of integration $x\in(0,1)$ should be transformed into $t\in(3,\infty)$ with a reversal of orientation.
– robjohn
Commented Sep 11, 2018 at 22:14

The us try to get rid of the square root step-by-step: $$\begin{eqnarray*} \int_{0}^{1}(1-x)\sqrt{x}\sqrt{4-x}\,dx&\stackrel{x\mapsto z^2}{=}& 2\int_{0}^{1}z^2(1-z^2)\sqrt{4-z^2}\,dz\\&\stackrel{z\mapsto 2u}{=}&32\int_{0}^{1/2}u^2(1-4u^2)\sqrt{1-u^2}\,du\\&\stackrel{u\mapsto\sin\theta}{=}&32\int_{0}^{\pi/6}\sin^2\theta\cos^2\theta(1-4\sin^2\theta)\,d\theta\\&=&4\int_{0}^{\pi/6}\left[-1+\cos(2\theta)+\cos(4\theta)-\cos(6\theta)\right]\,d\theta.\end{eqnarray*}$$ I guess you may take it from here.

It is always didactically good to give a solution for the given start. I will try it, although trigonometric substitutions from the beginning may save typing.

The substitution $t=\sqrt{(4-x)/x}$ is ok, but we have to use improper integrals. The solution would be as follows. For $x=0+$ the corresponding (limiting) value of $t$ is $t=\sqrt{4/0_+}=+\infty$, and for $x=1$ we get $t=\sqrt{(4-1)/1}=\color{red}{\sqrt 3}$. (It is square three, maybe the one reason for writing this answer.) \begin{aligned} J &= \int_0^1 (1-x)\sqrt{4x-x^2} \; dx \\ &= \int_{\infty}^{\sqrt 3} -32\frac{(t^2-3)t^2}{(1+t^2)^4}\;dt \\ &= +32\int_{\sqrt 3}^{\infty} \frac{(t^2+2t^2+1)-5(t^2+1)+4}{(1+t^2)^4}\;dt \\ &= +32\int_{\sqrt 3}^{\infty} \left[\ \frac1{(1+t^2)^2} -5\frac1{(1+t^2)^3} +4\frac1{(1+t^2)^4} \ \right]\;dt \\ &=32(K_2-5K_3+4K_4)\ , \end{aligned} where $K_n$ is the integral on the same interval of $(1+t^2)^{-n}$. We have the recursion \begin{aligned} K_n &=\int_{\sqrt 3}^{\infty}t'\frac1{(1+t^2)^n}\;dt \\ &=\frac t{(1+t^2)^n}\Bigg|_{\sqrt 3}^{\infty} - \int_{\sqrt 3}^{\infty} t\cdot \frac{-2nt}{(1+t^2)^{n+1}}\;dt \\ &=-\frac{\sqrt3}{4^n} + 2n\int_{\sqrt 3}^{\infty}\frac{(t^2+1)-1}{(1+t^2)^{n+1}}\;dt \\ &=-\frac{\sqrt3}{4^n} + 2n(K_n-K_{n+1})\ ,\text{ i.e.} \\ K_{n+1} &= \frac 1{2n}\left[\ (2n-1)K_n-\frac{\sqrt3}{4^n}\ \right]\ . \\[2mm] &\qquad\text{This gives:} \\ K_1 &=\arctan \infty-\arctan\sqrt 3 =\left(\frac 12-\frac 13\right)\pi =\frac 16\pi\ , \\ K_2 &=\frac 12\left[K_1-\frac{\sqrt 3}4\right]=\frac 1{12}\pi - \frac{\sqrt 3}8\ , \\ K_3 &=\frac 14\left[3K_2-\frac{\sqrt 3}{16}\right] =\frac 1{16}\pi - \frac{7\sqrt 3}{64}\ , \\ K_4 &=\frac 16\left[5K_3-\frac{\sqrt 3}{64}\right] =\frac 5{96}\pi - \frac{3\sqrt 3}{32}\ , %\\ %K_5 &=\frac 18\left[7K_4-\frac{\sqrt 3}{216}\right] %=\frac {35}{768}\pi - \frac{169\sqrt 3}{2048}\ , \\ &\qquad\text{ so putting all together} \\ J&=32(K_2-5K_3+4K_4) \\ &=-\frac23\pi+\frac {3\sqrt 3}2\ . \end{aligned} As said, not the quick way, but all details are displayed. Computer check:

sage: var('x,t');
sage: integral( (1-x)*sqrt(4*x-x^2), x, 0, 1 ).simplify()
-2/3*pi + 3/2*sqrt(3)
sage: integral( 32*(t^2-3)*t^2/(1+t^2)^4, t, sqrt(3), oo ).simplify()
-2/3*pi + 3/2*sqrt(3)

• Are we allowed to use the infinity sign like this $\arctan \infty$? Because a professor of mine says that infinity sign should be used only when we have limits otherwise it's wrong to use it in other(direct) ways. Commented Sep 12, 2018 at 0:18
• In this case we have the limit, explicitly $$K_1=\int_{\sqrt 3}^\infty\frac {dt}{1+t^2}=\lim_{M\to\infty}\int_{\sqrt 3}^M\frac {dt}{1+t^2}=\lim_{M\to\infty}\arctan\Bigg|_{\sqrt 3}^M=\lim_{M\to\infty}\arctan M -\arctan\sqrt 3=\frac 12\pi-\frac 13\pi\ .$$ To avoid this complicated notation, it is simpler to write $\arctan \infty$ instead of the longer $\lim_{M\to\infty}\arctan M$. (Same in the integral.) We apply a continuous function, $\arctan$, on the "symbol" $\infty$, this function has a limit. The substitution was dictating the use of an improper integral, one with an $\infty$ as one limit. Commented Sep 12, 2018 at 0:27
• I get it , thank you for your answer . Commented Sep 12, 2018 at 0:32
• @MathsSurvivor: Your professor is correct if you are working in real analysis with the usual real line, since there is no real number $∞$. In this case, you must define infinite limit and limit at infinity separately from the usual case, and then the "$\infty$" in both of them are merely symbolic. However, we can 'add' $∞$ to the real line, to get the affinely extended real line, which is literally the closed interval $[-∞,∞]$, and the real line is literally the open interval $(-∞,∞)$. Commented Sep 12, 2018 at 5:09
• $[-∞,∞]$ is not a field, but it is a compact topological space, and $\sup(S),\inf(S)$ exist for any subset $S$, and hence $\limsup,\liminf$ of any sequence always exists. If they are equal then the limit exists. These extend the usual ones, and may help to explain why the logical structure of the infinite limits and limits and infinity are so similar to the non-infinite case. You can check that $\arctan$ on $(-∞,∞)$ can be continuously extended to $-∞$ and $∞$, and then it is literally correct to write $\arctan(∞) = π/2$. Commented Sep 12, 2018 at 5:13

One can use $$\,\displaystyle{\int_a^b f(x) dx=\int_a^b f(a+b-x) dx}\,$$ to get: $$I=\int_0^1 x \sqrt{4-(1+x)^2} dx= \int_0^1 (x+1)\sqrt{4 - (x+1)^2} dx-\int_0^1 \sqrt{4 - (x+1)^2} dx$$ For the first one just substitute $$4-(x+1)^2 =t$$ to get $$\displaystyle{\frac12 \int_0^3 \sqrt t dt}.\,$$ And the second one is a standard square root integral.

• How did you get $\sqrt{4-(1+x^2)}$ shouldn't it be $\sqrt{4(1-x)+(1-x)^2}$? Commented Sep 11, 2018 at 21:06
• I used that $4x-x^2 = 4-(x-2)^2$ to simplify faster. Commented Sep 11, 2018 at 21:08
• Also $$4(1-x)-(1-x)^2 =(1-x) (4-1+x)=(1-x) (3+x)$$$$2 ^2 - (x+1)^2 =(2-1-x) (2+1+x)=(1-x)(3+x)$$ Commented Sep 11, 2018 at 21:21
• Yeah it's the same , you're right Commented Sep 11, 2018 at 21:25
• Yes, just substitute $a+b-x=t\rightarrow x=a+b-t$ to prove it. The new bound will be $\int_b^a$, but as we have $-dx=dt$ we can get rid of that minus sign and swap those to obtain $\int_a^b f(x) dx=\int_a^b f(a+b-t) dt$ Commented Sep 11, 2018 at 21:54

Hint:

By completing the square,

$$4x-x^2=4-(x-2)^2$$ and that hints to use the substitution

$$x-2=2\cos t.$$

Then

$$\int (1-x)\sqrt{4x-x^2}dx=4\int(1+2\cos t)\sin^2t\,dt.$$

The term $\sin^2t$ is integrated in the form $\dfrac{1-\cos 2t}2$, and the second term is immediate.

$$I=2t-2\sin t\cos t+\dfrac83\sin^3t=\\\arccos\dfrac{x-2}2-(x-2)\sqrt{1-\dfrac{(x-2)^2}4}+\dfrac83\left(1-\dfrac{(x-2)^2}4\right)^{3/2}$$

Your approach can be completed by noting that the domain of integrtion $x\in(0,1)$ gets transformed to the unbounded domain of integration $t\in(\sqrt3,\infty)$ with reversal of orientation (which negates the integral).

We can also set $u=1-x/2\implies4\!\left(1-u^2\right)=4x-x^2$. Therefore, $$\int_0^1(1-x)\sqrt{4x-x^2}\,\mathrm{d}x=4\int_{1/2}^1(2u-1)\sqrt{1-u^2}\,\mathrm{d}u$$ Then, setting $u=\sin(\theta)$ gives \begin{align} 4\int_{1/2}^1(2u-1)\sqrt{1-u^2}\,\mathrm{d}u &=4\int_{\pi/6}^{\pi/2}(2\sin(\theta)-1)\overbrace{\cos^2(\theta)}^{1-\sin^2(\theta)}\,\mathrm{d}\theta\\ &=4\int_{\pi/6}^{\pi/2}\left(-2\color{#C00}{\sin^3(\theta)}+\color{#090}{\sin^2(\theta)}+2\sin(\theta)-1\right)\mathrm{d}\theta\\ &=4\int_{\pi/6}^{\pi/2}\left(-2\color{#C00}{\frac{3\sin(\theta)-\sin(3\theta)}4}+\color{#090}{\frac{1-\cos(2\theta)}2}+2\sin(\theta)-1\right)\mathrm{d}\theta\\ %&=-\left[\frac23\cos(3\theta)+\sin(2\theta)+2\cos(\theta)+2\theta\right]_{\pi/6}^{\pi/2}\\[3pt] %&=\frac32\sqrt3-\frac23\pi \end{align}

• At the stage $(2s-1)c^2$, it is more direct to integrate $sc^2$ and $c^2$.
– user65203
Commented Sep 12, 2018 at 12:58
• The mechanics should include $sc^n$ and $cs^n$, as well as $s^{2m+1}c^n$ and $c^{2m+1}s^n$ where you expand the even powers. Polynomials are easy.
– user65203
Commented Sep 12, 2018 at 14:56
• You needn't tell me.
– user65203
Commented Sep 12, 2018 at 15:20

Hint: $(1-x)\sqrt{4x-x^2} {dx}=-\sqrt{4x-x^2}{dx} +(2-x)\sqrt{4x-x^2}{dx}=-\sqrt{4x-x^2}{dx} +0.5\sqrt{4x-x^2}{d(4x-x^2)}$