First example
For $|a|<1$
$$\int^{2\pi}_0 \frac{1- a \cos(x)}{1+a^2-2a \cos(x)}dx = \sum_{k=0}^{\infty} a^{k} \int^{2\pi}_0 \cos(kx)\,dx = 2\pi $$
Where we used that
$$\sum_{k=0}^{\infty} a^{k} \cos(kx) = \frac{1- a \cos x}{1-2a \cos x + a^{2}} , \ \ |a|<1$$
Second example
$$ \int_{0}^{\infty}\frac{e^{-t}\cosh(a\sqrt{t})}{\sqrt{t}}dt$$
We know that we can expand $\cosh$ using power series
$$\cosh(a\sqrt{t}) = \sum_{n=0}^{\infty}\frac{a^{2n}\cdot t^n}{(2n)!}$$
Substituting back in the integral we have
$$\int_{0}^{\infty}e^{-t}\sum_{n=0}^{\infty}\frac{a^{2n}\cdot t^n}{(2n)!\, \sqrt{t}}dt$$
Now since the series is always positive we can swap the integral and the series
$$\sum_{n=0}^{\infty}\frac{a^{2n}}{(2n)!}\left[ \int_{0}^{\infty}e^{-t} t^{n-\frac{1}{2}}dt\right] $$
Hence we have by using the gamma function
$$\sum^{\infty}_{n=0} \frac{a^{2n}\,\Gamma\left(\frac{1}{2}+n\right)}{(2n!)}$$
Using LDF (Legendre Duplication Formula) we get
$$\sum^{\infty}_{n=0}\frac{a^{2n}}{(2n!)}\left({(2n)! \over 4^n n!} \sqrt{\pi}\right)$$
By further simplification
$$\sqrt{\pi}\,\sum^{\infty}_{n=0} \frac{a^{2n} }{4^n\,n!}$$
Using the expansion of the exponential we get
$$\int_{0}^{\infty}\frac{e^{-t}\cosh(a\sqrt{t})}{\sqrt{t}}dt\,=\,\sqrt{\pi}e^{{a^2 \over 4}}$$