Prove that, $\int_{0}^{2\pi}\frac{\cos x+2}{5+4\cos x} dx=\pi$

definite integralsintegrationtrigonometric-integrals

I have tried to solve this which goes as follows-
$$\begin{align*}
\int\frac{\cos x+2}{5+4\cos x} dx
&=\int\frac{(1/4)(5+4\cos x)+(3/4)}{5+4\cos x} dx\\
&={1\over4}\int dx+{3\over4}\int\frac{dx}{9\cos^2 {x\over 2}+\sin^2{x\over2}}\\
&=({x\over4}+C)+{3\over4}\int\frac{\sec^2{x\over2}}{9+\tan^2{x\over2}}dx\\
&=({x\over4}+C)+{3\over2}\int\frac{dy}{9+y^2}\qquad \text{substituting $\tan {x\over2}=y$}\\
&={x\over4}+{1\over2}\arctan({y\over3})+C'={x\over4}+{1\over2}\arctan({\tan{x\over2}\over3})+C'
\end{align*}$$

So,
$$\int_{0}^{2\pi}\frac{\cos x+2}{5+4\cos x} dx=\left[{x\over4}\right]_{0}^{2\pi}+{1\over2}\left[\arctan({\tan{x\over2}\over3})\right]_{0}^{2\pi}
\\={\pi\over2}+{1\over2}\left[\arctan({\tan\pi\over3})-0\right]={\pi\over2}+{1\over2}\left[0-0\right]={\pi\over2}$$

So, I can't get $\pi$!! Can anybody find out where is my fault? Thanks for assistance in advance.

Best Answer

Note that $$\int\frac{\cos x+2}{5+4\cos x} dx=F(x):={x\over4}+{1\over2}\arctan\left({\tan{x\over2}\over3}\right)+c$$ but the function $F$ is not continuous on the interval of integration $[0,2\pi]$ (on the other hand a primitive of a continuous function should be continuous by the Fundamental Theorem of Calculus).

Since $F$ has a "jump" at $x=\pi$ we may split the interval and therefore we obtain $$\int_0^{2\pi}\frac{\cos x+2}{5+4\cos x} dx =\int_0^{\pi} +\int_{\pi}^{2\pi} =[F(x)]_{0^+}^{\pi^-}+[F(x)]_{\pi^+}^{2\pi^-}=\frac{\pi}{2}+\frac{\pi}{2}=\pi.$$

Related Question