<s>[INST] Any hint to solve given integral $\int_0^{2{\pi}}{{d\theta}\over{a^2\cos^2\theta+b^2\sin^2\theta}}$? Show that for $ab>0$ $$\int_0^{2{\pi}}{{d\theta}\over{a^2\cos^2\theta+b^2\sin^2\theta}}={{2\pi}\over ab}$$
I'm not sure how to go about this. Any solutions or hints are greatly appreciated.
 [/INST] We use the fact that the 1-form
$$\eta = \frac{x dy - y dx}{x^2 + y^2}$$
has integral of $2 \pi$ over $\gamma_r(t) = (r \cos t, r \sin t)$.
Furthermore, if $\Gamma(0) = \Gamma(2\pi)$ and if the intervals $[\gamma(t), \Gamma(t)]$ do not contain $\mathbf{0}$ for any $t \in [0, 2 \pi]$, then the integral over $\Gamma$ is also zero.
Now take $\Gamma(t) = (a \cos t, b \sin t)$. We have
\begin{align}
2\pi = \int_{\Gamma}\eta &= \int_{0}^{2\pi} \frac{a \cos t}{a^2 \cos^2 t + b^2 \sin^2 t} b \cos t + \frac{-b \sin t}{a^2 \cos^2 t + b^2 \sin^2 t} (-a \sin t) \\
&=\int_0^{2\pi} \frac{ab}{a^2 \cos^2 t + b^2 \sin^2 t}.
\end{align}

Proof of the statements stated above:
\begin{align} \int_{\gamma} \eta &= \int_0^{2\pi} \sum_{i=1}^2 a_i(\gamma(t)) \frac{\partial\gamma_i}{\partial t} \, dt\\ &= \int_0^{2\pi} -\frac{\sin t}{r} (-r \sin t) + \frac{\cos t}{r} r \cos t \, dt \\
&= \int_0^{2\pi} \sin^2 t + \cos^2 t \, dt = 2\pi.\end{align}
with $a_1 = \dfrac{-y}{x^2 + y^2}, a_2 = \dfrac{x}{x^2 + y^2}$. 
Now, \begin{align*}d \eta &= (da_1) \wedge dx_1 + (da_2) \wedge dx_2\\
&= D_2 a_1 \, dx_2 \wedge dx_1 + D_1 a_2 \, dx_1 \wedge dx_2\\ &= ((D_1 a_2)(x, y) - (D_2a_1)(x, y)) \, \wedge dx_1 \wedge dx_2\\
&=  \frac{y^2 - x^2}{(x^2 + y^2)^2} - \frac{y^2 - x^2}{(x^2 + y^2)^2} \, dx_1 \wedge dx_2 = 0.
\end{align*}
Next, let $\Gamma$ be as described. Take $$\Phi(t, u) = (1-u)\Gamma(t) + u\gamma(t).$$
We get $\partial \Phi = \Gamma -\gamma$
Hence $$0 = \int_{\Phi} d\eta  = \int_{d \Phi} \eta = \int_{\Gamma - \gamma} \eta$$
by Stokes' theorem
and so \begin{equation} \int_\Gamma \eta = \int_\gamma \eta.\end{equation}
</s>