Why does $\int_0^{2\pi} (1+2\cos(x))/(5+4\cos(x))\,dx$ vanish? The standard substitution $y=\tan(x/2)$ shows that 
  $$ \int_0^{2\pi} \frac{1+2\cos(x)}{5+4\cos(x)}\,dx = 0. $$
What is the "real explanation" for this fact? My guess is that the "book proof" involves contour integration; is this correct? Is there an elegant "calculus proof" avoiding technical computations?
Thanks!   

Consider the more general integral, where $d \neq 0$,
\begin{align}\tag{1}
I = \int_{0}^{2 \pi} \frac{a + b \cos x}{c + d \cos x} \, dx.
\end{align}
Now by splitting the integral into two regions, $[0, \pi)$ and $(\pi, 2 \pi]$, then in the second integral let the variable be shifted by $\pi$. This is seen by:
\begin{align}
I &= \int_{0}^{\pi} \frac{a + b \cos x}{c + d \cos x} \, dx + \int_{\pi}^{2 \pi} \frac{a + b \cos x}{c + d \cos x} \, dx \\
&= \int_{0}^{\pi} \frac{a + b \cos x}{c + d \cos x} \, dx + \int_{0}^{\pi} \frac{a - b \cos x}{c - d \cos x} \, dx. \tag{2}
\end{align}
The general form of the integrals is
\begin{align}
\int_{0}^{\pi} \frac{a + b \cos x}{c + d \cos x} \, dx &= \left[ \frac{b x}{d} + \frac{2(bc - ad)}{d \sqrt{d^2 - c^2}} \, \tanh^{-1}\left( \frac{(c-d)}{\sqrt{d^2 - c^2}} \, \tan\left(\frac{x}{2}\right) \right) \right]_{0}^{\pi} \\
&= \frac{b \pi}{d} - \frac{i \, \pi (bc-ad)}{d \sqrt{d^2 - c^2}}. \tag{3}
\end{align}
and, upon letting $(b,d) \to (-b , -d)$,
\begin{align}
\int_{0}^{\pi} \frac{a - b \cos x}{c - d \cos x} \, dx = \frac{b \pi}{d} - \frac{i \, \pi(bc-ad)}{d \sqrt{d^2 - c^2}}. \tag{4}
\end{align}
Using (3) and (4) in (2) yields
\begin{align} \tag{5}
I = \frac{2 \pi }{d} \, \left( b - \frac{i \, (bc-ad)}{\sqrt{d^2 - c^2}} \right).
\end{align}
From (1) and (5) the integral is
\begin{align}\tag{6}
\int_{0}^{2 \pi} \frac{a + b \cos x}{c + d \cos x} \, dx = \frac{2 \pi }{d} \, \left( b - \frac{i \, (bc-ad)}{\sqrt{d^2 - c^2}} \right).
\end{align}
In order to remove the factor of $i$ it is required that $c > d$, $d \neq 0$. This leads to
\begin{align}\tag{7}
\int_{0}^{2 \pi} \frac{a + b \cos x}{c + d \cos x} \, dx = \frac{2 \pi }{d} \, \left( b - \frac{bc-ad}{\sqrt{c^2 - d^2}} \right).
\end{align}
The problem asked has the values $(a,b,c,d) = (1,2,5,4)$ for which it is quickly determined that
\begin{align}\tag{6}
\int_{0}^{2 \pi} \frac{1 + 2 \cos x}{5 + 4 \cos x} \, dx = 0.
\end{align}
Another example is $(a,b,c,d) = (\beta^{2}, 1, 6, 4)$, where $2 \beta = 1 - \sqrt{5}$, which yields the result
\begin{align}
\int_{0}^{2 \pi} \frac{\beta^{2} + \cos x}{6 + 4 \cos x} \, dx = 0.
\end{align}
