Residue theorem application How could we use the Residue theorem to calculate the following integral:  $$\int_0^{2\pi} \frac{1}{1-2p\cos{x} + p^2} dx$$  where $p$ is a real constant, such that $p\in ]0,1[$  Thank you!
Evaluating $\frac{1}{2\pi}\int_{0}^{2\pi}\frac{1}{1-2t\cos\theta +t^2}d\theta$ I need solve this integral, and I tried various methods of solving and did not get it. The integral is:   $$\frac{1}{2\pi}\int_{0}^{2\pi}\frac{1}{1-2t\cos\theta +t^2}d\theta,$$  where $t$ is a positive integer.
Lesser-known integration tricks I am currently studying for the GRE math subject test, which heavily tests calculus. I've reviewed most of the basic calculus techniques (integration by parts, trig substitutions, etc.) I am now looking for a list or reference for some lesser-known tricks or clever substitutions that are useful in integration. For example, I learned of this trick   $$\int_a^b f(x) \, dx = \int_a^b f(a + b -x) \, dx$$  in the question    I am especially interested in tricks that can be used without an excessive amount of computation, as I believe (or hope?) that these will be what  is useful for the GRE.