# How do I calculate the area $\int_0^2 \frac{1}{\sqrt{2x-x^2}} dx$? [closed]

I have the integral

$$\int_0^2 \frac{1}{\sqrt{2x-x^2}}dx$$

I know the answer is $\pi$ but I have problems with limits $0$ and $2$. How can I use $\varepsilon$ in this problem?

• Do you have to prove this with an $\varepsilon$-$\delta$ argument? Commented Jan 5, 2015 at 18:26
• There is a standard method in algebra from reducing a problem involving a quadratic polynomial with a first-degree term to a problem involving a quadratic polynomial with no first-degree term: completing the square. ${}\qquad{}$ Commented Jan 5, 2015 at 18:52
• To add to Michael's comment, Timbuc's answer below uses this method to complete the square. Commented Jan 5, 2015 at 18:56

$$2x-x^2=-(x-1)^2+1\implies \sqrt{2x-x^2}=\sqrt{1-(x-1)^2}\implies$$

$$\int\frac{dx}{\sqrt{2x-x^2}}=\int\frac{dx}{\sqrt{1-(x-1)^2}}=\arcsin(x-1)+C$$

Be careful here: with limits, if one of them is zero or two this is then an improper integral, though it looks nice

Four answers are already here, so why do I post this? (And I am so far the only one who has up-voted the question; that is often neglected.)

The reason is that I have a suspicion about the question about "$\varepsilon$".

$$\overbrace{\int_0^2 \frac{dx}{\sqrt{2x-x^2}} = \int_0^2\frac{dx}{\sqrt{1-(x-1)^2}}}^{\text{completing the square}} = \int_{-1}^1\frac{dw}{\sqrt{1-w^2}}.$$ Now the problem is that this function of $w$ has vertical asymptotes at both endpoints. I wonder if an instructor may have set an exercise on how to deal with that? One can just say that this is $$\left.\arcsin w\vphantom{\frac11}\,\right|_{w=-1}^{w=1} =\arcsin 1 - \arcsin(-1)=\frac\pi2-\left(-\frac\pi2\right)=\pi, \tag 1$$ without ever noticing the asymptotes, and the answer is correct, so this whole issue is a bit subtle. The arcsine function has no asymptotes, but has vertical tangents at the two endpoints. Might an instructor optimistically expecting his students to be quite aware of all this have expected the to write $$\int_{-1+\varepsilon}^{1-\varepsilon}$$ and evaluate that, and then take limits as $\varepsilon\downarrow0\ {}$?

If nothing like that happened and the exercise is not posed in a way that uses "$\varepsilon$", then forget about $\varepsilon$ and procede as in $(1)$ above.

Let me write yet another reply, focusing on the details with $\epsilon$ in improper integrals, since I don't find it in the other answers.

The integral $\int_0^2\frac{1}{\sqrt{2x-x^2}}\,dx$ is improper both at $x=0$ and at $x=2$. Usually we teach our students that in this case, one should divide the interval into two intervals, for example at $x=1$ in this case. So, one writes $$\int_0^2\frac{1}{\sqrt{2x-x^2}}\,dx = \int_0^1\frac{1}{\sqrt{2x-x^2}}\,dx + \int_1^2\frac{1}{\sqrt{2x-x^2}}\,dx.$$ The integral from $0$ to $2$ is convergent if and only if both the other integrals are convergent. Now, the first integral can be calculated as the limit $$\lim_{\epsilon\to0^+}\int_\epsilon^1\frac{1}{\sqrt{2x-x^2}}\,dx$$ and the second integral as $$\lim_{\epsilon\to0^+}\int_1^{2-\epsilon}\frac{1}{\sqrt{2x-x^2}}\,dx.$$ The original integral is convergent if and only if both these limits exists, and the value is (naturally) the sum.

OK, you might say, why do we need this, when we actually get the correct value just by doing one limit, instead of two? Let me show you an

Example where it goes wrong. Maybe an obvious one, but it can be more hidden than this. Let us say that we are about to calculate the integral $$\int_{-1}^1\frac{x}{1-x^2}\,dx.$$ The function $x/(1-x^2)$ is continuous on $(-1,1)$, with singularities at $x=-1$ and $x=1$. Let us calculate the limit $$\lim_{\epsilon\to0^+}\int_{-1+\epsilon}^{1-\epsilon}\frac{x}{1-x^2}\,dx.$$ For $\epsilon>0$, the integral $\int_{-1+\epsilon}^{1-\epsilon}\frac{x}{1-x^2}\,dx=0$ since the integrand is odd and the interval is symmetric around zero. Thus $$\lim_{\epsilon\to0^+}\int_{-1+\epsilon}^{1-\epsilon}\frac{x}{1-x^2}\,dx=\lim_{\epsilon\to0^+}0=0.$$ But the integral $\int_{-1}^1\frac{x}{1-x^2}\,dx$ is not zero. In fact, the integral does not even converge. The reason is that the singularities at $x=-1$ and $x=1$ are too strong. For example, the function behaves as $-1/(2(x-1))$ at $x=1$, and this is not integrable.

To sum up: If you have an improper integral with more than one singularity (or infinite interval), and you are not sure that your integral is convergent, you better divide the integral into several ones, each containing only one singular point (or infinity).

PS One way of avoiding this in your case is to note that your function is symmetric in $x=1$. Thus $\int_0^2 \frac{1}{\sqrt{2x-x^2}}\,dx = 2\int_0^1\frac{1}{\sqrt{2x-x^2}}\,dx$. In the latter integral, you have only one singular point ($x=0$).

you can use $$\int_{\epsilon}^{2-\epsilon}\frac{dx}{\sqrt{2x-x^2}}=-2\arcsin(\epsilon-1)$$ and now compute the limit $\epsilon$ tends to zero frm the right. $$\epsilon>0$$

Since $\frac{d}{dx}\arcsin x=\frac{1}{\sqrt{1-x^2}}$, $$\int_{0}^{2}\frac{dx}{\sqrt{x(2-x)}}=\int_{-1}^{1}\frac{dx}{\sqrt{1-x^2}}=\left.\arcsin x\right|_{-1}^{1}=\pi.$$ You can check integrability near the endpoints by noticing that $\int_{0}^{\varepsilon}\frac{dx}{\sqrt{x}}\approx 2\sqrt{\varepsilon}$.

HINT:

Complete the square, then use the appropriate substitution. You should get the arcsin integral.

• This is more a comment--a good comment--than an answer. Commented Jan 5, 2015 at 18:29
• it should be a comment !
– idm
Commented Jan 5, 2015 at 18:30
• I would call it a hint. :) Commented Jan 5, 2015 at 18:31
• What we are saying is that, "Yes, this is a good hint." But the convention on this site is that a hint at this level is generally put in the comment section, not as an answer. Commented Jan 5, 2015 at 18:34
• Ah, I did not see the mention of epsilon. I thought it was a basic integration question. :) Commented Jan 5, 2015 at 18:37

$$\int_0^2 \frac{dx}{\sqrt{2x - x^2}} = \int_{- 1}^1 \frac{dz}{\sqrt{1 - z^2}} = \int_{- \frac{\pi}{2}}^ {\frac{\pi}{2}} \frac{\cos t dt}{\sqrt{1 - \sin^2 t}} = \int_{- \frac{\pi}{2}}^ {\frac{\pi}{2}} dt = \pi.$$