2

In order to integrate : $$\int_0^{2\pi} \frac{1}{a + \cos x }dx $$ I made the substitution : $$ u = \tan(x/2) \Rightarrow du = \frac{\sec^2(x/2)}{2}dx \Rightarrow dx = \frac {2du}{1 + u^2}$$ with this and $$ \cos x = \frac{1-u^2}{1+u^2}$$ I get the integral simplified to: $$\frac{2}{a-1}\int_{tan(0)}^{tan(\pi)}\frac{du}{\frac{a+1}{a-1} + u^2} = \frac{2}{a-1}\int_0^0\frac{du}{\frac{a+1}{a-1} + u ^2}$$

Although the integral is now quite easy to solve the limits have become equal in the process and the integral becomes zero. This is clearly incorrect because the original function would be positive throughout the interval given a value of $a$ more than 1 and thus implying a positive integral and not zero.

It is clear that there is a mistake with the substitution but I can't seem to find it.

There is a question on this stack exchange which deals with this issue (link), but in this problem here I couldn't pinpoint any ambiguity in expressing the functions of x in terms of u as was the case in the other question.

mnase
  • 23
  • 5

1 Answers1

7

Since $\tan\frac\pi2$ is undefined, your substitution can't work at $x=\pi$. This is what is causing the problem. Try splitting your integral at $x=\pi$.

BallBoy
  • 14,472
  • Just out of curiosity, if instead of this undefined business we had a discontinuity of the first kind would that pose a problem – mnase May 15 '20 at 16:00