I'm stuck on a question where I'm meant to use Cauchy's integral formula. Here's the question:

Evaluate

$\displaystyle \int_\gamma \frac{1}{(z-p)z} dz$

along

$\displaystyle \gamma (t) = p + e^{it},\ 0 \leq t \leq 2 \pi ,\ where\ p \ \epsilon \ R ,\ p > 1$

by Cauchy's integral formula. Computing this integral along the path $\displaystyle \gamma (t)$ show that

$\displaystyle \int_0^{2 \pi} \frac{p+\cos{t}}{p^2 + 1 + 2p\cos{t}}dt \ = \ \frac{2\pi}{p}$

This is how I approached it:

Let $\displaystyle f(z) = \frac{1}{(z-p)z}$. $\displaystyle f(z)$ has poles at $\displaystyle z_{0} = p$ and $\displaystyle z_{1}=0$.

The path $\displaystyle \gamma (t)$ is a circle centered around $\displaystyle p$ with a radius of 1. Consequently, $\displaystyle z_{1}$ is outside of $\displaystyle \gamma (t)$ as $\displaystyle p > 1$. Therefore, according to Cauchy's integral theorem,

$\displaystyle \int_\gamma f(z) = \oint_{C_{0}} f(z)$

where $\displaystyle C_{0}$ is an arbitrarily small circle around $\displaystyle z_{0}$. (I'm not sure if this is right, but I'll show the rest of my work assuming it is.)

Around $\displaystyle C_{0}$, $\displaystyle f(z)$ is analytic, with

$\displaystyle f(z) = \frac{1}{z}$

Then, using Cauchy's integral formula,

$\displaystyle \int_\gamma \frac{f(z)}{z-a}dz = 2\pi i f(a)$

$\displaystyle \oint_{C_{0}} \frac{(\frac{1}{z})}{z-z_{0}}dz = 2\pi i\frac{1}{z_{0}}$

Therefore,

$\displaystyle \int_\gamma f(z) = 2\pi i\frac{1}{z_{0}}= 2\pi i\frac{1}{p}$

as $\displaystyle z_{0} = p$.

I've now got no idea how to relate that to the second integral in the question, or if it's even right. Any help is very much appreciated