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.
 A: The given integral equals to
$$\\{{4}\over{b^2}}\int_0^{{\pi/2}}{{\sec^2\theta\\d\theta}\over{(a^2/b^2)+\tan^2\theta}}$$
put $\tan\theta = t$ which implies
$$\\{{4}\over{b^2}}\int_0^{{\pi/2}}{{\\dt}\over{(a^2/b^2)+t^2}}$$
which after integaration equals to
$$\\{{4}\over{b^2}}*{{b}\over{a}}*{\pi\over2} = {{2\pi}\over{ab}}$$
I hope this was helpful.
A: $\cos^2\theta,\sin^2\theta$ have period $\pi$, so the integral is $2I$ where $I$ is the integral from $-\frac{\pi}{2}$ to $\frac{\pi}{2}$. wlog we may take $a,b$ to be positive.
We have $I=\frac{1}{a^2}\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\frac{\sec^2\theta}{1+(\frac{b}{a})^2\tan^2\theta}\ d\theta$. Putting $x=\tan\theta$ this becomes $\frac{1}{a^2}\int_{-\infty}^{\infty}\frac{dx}{1+(\frac{b}{a})^2x^2}$. Putting $y=\frac{b}{a}x$ we get $\frac{1}{ab}\int_{-\infty}^{\infty}\frac{dy}{1+y^2}=\frac{\pi}{ab}$. [The last integral is just $\tan^{-1}y$.]
Hence the original integral is $\frac{2\pi}{ab}$ as required.
A: Let $z=e^{i\theta}$, then
\begin{align}
\int_0^{2\pi}\frac{d\theta}{a^2\cos^2\theta+b^2\sin^2\theta}&=\int_C \frac{1}{a^2\left(\frac{z+\frac{1}{z}}{2}\right)^2+b^2\left(\frac{z-\frac{1}{z}}{2i}\right)^2}\frac{dz}{iz}\\
&=\int_C \frac{-4iz}{(a^2-b^2)z^4+2(a^2+b^2)z^2 +(a^2-b^2)}dz,
\end{align}
where $C:|z|=1$. If $a=b$, then the integral becomes
$$
\int_C \frac{-i}{a^2 z}dz = 2\pi i \operatorname{Res}\left(-\frac{i}{a^2 z};0\right)=\frac{2\pi}{a^2}
$$
If $a\ne b$, Solve $(a^2-b^2)z^4+2(a^2+b^2)z^2+(a^2-b^2)=0$, then
$$
z^2=-\frac{a+b}{a-b}\text{ or }z^2=-\frac{a-b}{a+b}
$$
by quadratic formula. Since $\left|\frac{a+b}{a-b}\right|>1$ and $\left|\frac{a-b}{a+b}\right|<1$, there exist two simple poles inside $C$. Assuming $a>b>0$,
\begin{align}
\int_C \frac{-4iz}{(a^2-b^2)z^4+2(a^2+b^2)z^2 +(a^2-b^2)}dz &= 2\pi i\left(\operatorname{Res}\left(f;\sqrt{\frac{a-b}{a+b}}i\right)+\operatorname{Res}\left(f;-\sqrt{\frac{a-b}{a+b}}i\right)\right)
\end{align}
Compute residues:
\begin{align}
\operatorname{Res}\left(f;\sqrt{\frac{a-b}{a+b}}i\right) &= \frac{4\sqrt{\frac{a-b}{a+b}}}{a^2-b^2}\frac{1}{2\sqrt{\frac{a-b}{a+b}}i\left(-\frac{a-b}{a+b} + \frac{a+b}{a-b}\right)}\\
&=\frac{2}{4iab}=\frac{1}{2abi}
\end{align}
\begin{align}
\operatorname{Res}\left(f;-\sqrt{\frac{a-b}{a+b}}i\right) &=\frac{-4\sqrt{\frac{a-b}{a+b}}}{a^2-b^2}\frac{1}{-2\sqrt{\frac{a-b}{a+b}}i\left(-\frac{a-b}{a+b} + \frac{a+b}{a-b}\right)}\\
&=\frac{1}{2abi}
\end{align}
$$
\therefore \int_C \frac{-4iz}{(a^2-b^2)z^4+2(a^2+b^2)z^2 +(a^2-b^2)}dz = 2\pi i \left(\frac{1}{2abi}+\frac{1}{2abi}\right)=\frac{2\pi}{ab}
$$
We can get same conclusion when $b>a>0$.
A: 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}
A: The ninth method is an easy corollary to @Soke's answer. Consider the vector field
$$\vec F(x,y)=\langle\frac x{x^2+y^2},\frac y{x^2+y^2}\rangle$$
and the path $\Gamma$
$$\vec r(\theta)=\langle a\cos\theta,b\sin\theta\rangle,\,0\le\theta\le2\pi$$
Along the path,
$$d\vec r=\langle-a\sin\theta,b\cos\theta\rangle d\theta$$
So
$$\hat n\,ds=\langle b\cos\theta,a\sin\theta\rangle$$
As can be checked because $||\hat n\,ds||=||d\vec r||$ and $\hat n\,ds\cdot d\vec r=0$ and $\hat n\,ds$ points out of the enclosed region. And
$$\vec F=\langle\frac{a\cos\theta}{a^2\cos^2\theta+b^2\sin^2\theta},\frac{b\sin\theta}{a^2\cos^2\theta+b^2\sin^2\theta}\rangle$$
Thus
$$\int_{\Gamma}\vec F\cdot\hat n\,ds=\int_0^{2\pi}\frac{ab}{a^2\cos^2\theta+b^2\sin^2\theta}d\theta\tag1$$
Now, if $b=a$, then the path $\Gamma_1$ is a circle and the integral degenerates into
$$\int_{\Gamma_1}\vec F\cdot\hat n\,ds=\int_0^{2\pi}d\theta=\left.\theta\right|_0^{2\pi}=2\pi$$
But in the area between the ellipse $$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$$ and the circle $x^2+y^2=a^2$, we see that
$$\vec\nabla\cdot\vec F=\frac{(1)(x^2+y^2)-x(2x)}{(x^2+y^2)^2}\frac{(1)(x^2+y^2)-y(2y)}{(x^2+y^2)^2}=0$$
So it follows by the divergence theorem that
$$\int_{\Gamma}\vec F\cdot\hat n\,ds=\int_{\Gamma_1}\vec F\cdot\hat n\,ds=2\pi$$
This, along with eq. $(1)$ establishes the result.
