2

Solve the integral $$\int_0^{2\pi}\frac{dx}{5-2\operatorname{cos}x}$$

My work:

Let $\operatorname{tan}\frac{x}{2}=t$ $\implies$ our integral becomes $$\int_0^0\frac{2\:\:dt}{(1+t^2)\left(5-2\frac{1-t^2}{1+t^2}\right)}$$ which is obviously $=0$

But how can this happen since the integrand is positive and consequently the integral of this function cannot be equal to $0?$

abcdefu
  • 850
  • Since $\tan\frac\pi2$ and $\tan\frac{3\pi}2$ are undefined, that substitution doesn't make sense. – José Carlos Santos Aug 10 '22 at 12:09
  • @JoséCarlosSantos But I have learnt only the substitution way to make these integrals$?$ How can we do it without substituion$?$ – abcdefu Aug 10 '22 at 12:11
  • 1
    Before substitution, $\int_0^{2\pi}\frac{dx}{5-2\operatorname{cos}x}= 2\int_0^{\pi}\frac{dx}{5-2\operatorname{cos}x} $ – Quanto Aug 10 '22 at 12:16
  • @abcdefu You can indeed substitute $\tan(\frac{x}{2})$ but then you will need to change the bounds of integration to keep the domain continuous. – blacknapkins7 Aug 10 '22 at 12:23
  • 2
    This question is a good reminder to check the assumptions before using a theorem. – Klaus Aug 10 '22 at 12:24
  • Related: https://math.stackexchange.com/questions/1356523/what-are-the-restrictions-on-using-substitution-in-integration (and the list of linked questions there). – Hans Lundmark Aug 10 '22 at 14:20

1 Answers1

9

Your substitution makes no sense when $x=\pi$. However, you can use it to compute$$\int_0^\pi\frac1{5-2\cos(x)}\,\mathrm dx\tag1\label1$$as follows\begin{align}\int_0^\pi\frac1{5-2\cos(x)}\,\mathrm dx&=\int_0^\infty\frac2{(1+t^2)\left(5-2\frac{1-t^2}{1+t^2}\right)}\,\mathrm dt\\&=\int_0^\infty\frac2{3+7t^2}\,\mathrm dt\\&=\left[\frac2{\sqrt{21}}\arctan\left(\sqrt{\frac73}t\right)\right]_0^\infty\\&=\frac\pi{\sqrt{21}}.\end{align}And you can compute$$\int_\pi^{2\pi}\frac1{5-2\cos(x)}\,\mathrm dx\tag2\label2$$by the same method. Or you can use the fact that \eqref{2} is equal to \eqref{1}.