Find $\int _{0}^{2\pi}{1\over a\sin t+b \cos t +c}$ where $\sqrt{a^2+b^2}=1Find $\int _{0}^{2\pi}{1\over a\sin t+b \cos t +c}$ where $\sqrt{a^2+b^2}=1<c$. I am lead to believe I should be using curves but I really don't understand what curves to choose and how to properly use them. I would appreaciate some help on the issue. 
 A: Suppose we seek to evaluate
$$\int_{0}^{2\pi} \frac{1}{a\sin x + b\cos x + c} \; dx$$
where $a^2+b^2 = 1 < c.$
Introduce $z=\exp(ix)$ so that $dz=iz \; dx$ to get
$$\int_{|z|=1}
\frac{1}{a(z-1/z)/2/i + b(z+1/z)/2 + c}
\frac{dz}{iz}
\\ = \int_{|z|=1}
\frac{1}{az^2/2-a/2 + ibz^2/2+ib/2 + ciz}
\; dz.$$
Call this function (the integrand) $f(z).$
The two poles are at
$$\rho_{0,1} = \frac{-ci\pm \sqrt{a^2+b^2-c^2}}{a+bi}.$$
This is
$$\rho_{0,1} = \frac{-ci\pm \sqrt{1-c^2}}{a+bi}.$$
With the principal branch of the square root we thus have
(recall that $c\gt 1$)
$$|\rho_{0,1}| = |-c\pm\sqrt{c^2-1}|$$
Therefore  $\rho_1$  is definitely  not  inside  the contour  but  for
$\rho_0$ we have $c-\sqrt{c^2-1} \lt 1$ since $c-1\lt \sqrt{c^2-1}$ is
equivalent to $c^2-2c+1\lt c^2-1$ or $2\lt 2c$ and $c\gt 1.$
Next differentiate the  denominator of our function $f(z)$  to get for
the residue at $z=\rho_0$
$$\left.\frac{1}{az+ibz+ci}\right|_{z=\rho_0}
= \left.\frac{1}{(a+ib)z+ci}\right|_{z=\rho_0}
= \frac{1}{-ci+\sqrt{1-c^2}+ci}
\\ = \frac{1}{\sqrt{1-c^2}}.$$
With $c\gt 1$ a real number this is
$$\frac{1}{i\sqrt{c^2-1}}.$$
We thus get for the result
$$2\pi i \times \mathrm{Res}_{z=\rho_0} f(z)
= \frac{2\pi}{\sqrt{c^2-1}}.$$
A: We have
$$a\sin(t)+b\cos(t) = \sqrt{a^2+b^2}\sin(t+\phi) = \sin(t+\phi)$$
Hence, we have
\begin{align}
I & = \int_0^{2\pi} \dfrac{dt}{\sin(t+\phi)+c} = \int_0^{2\pi} \dfrac{dt}{\sin(t)+c} = \dfrac1c \int_0^{2\pi} \dfrac{dt}{1+\dfrac{\sin(t)}c}\\
& = \dfrac1c \sum_{k=0}^{\infty}\left(-\dfrac1c \right)^k \int_0^{2\pi} \sin^{k}(t)dt = \dfrac1c \sum_{k=0}^{\infty} \left(\dfrac1c\right)^{2k} \int_0^{2\pi} \sin^{2k}(t)dt\\
& = \dfrac4c \sum_{k=0}^{\infty} \left(\dfrac1c\right)^{2k} \int_0^{\pi/2} \sin^{2k}(t)dt
\end{align}
From here, we have
$$\int_0^{\pi/2} \sin^{2k}(t)dt = \dfrac{\pi}{2^{2k+1}}\dbinom{2k}k$$
Hence,
\begin{align}
I & = \dfrac{2\pi}c \sum_{k=0}^{\infty} \left(\dfrac1{2c}\right)^{2k} \dbinom{2k}k = \dfrac{2\pi}c \cdot \dfrac1{\sqrt{1-1/c^2}} = \dfrac{2\pi}{\sqrt{c^2-1}}
\end{align}
