Proving $\frac1{2\pi} \int_0^{2\pi} \frac{R^2-r^2}{R^2-2Rr\cos\theta+r^2} d\theta =1$ by integrating $\frac{R+z}{z(R-z)}$ without residue theorem. I was given the function:
$$ \frac{R+z}{z(R-z)} $$
And I was asked to integrate it around a closed contour to prove:
$$\frac1{2\pi} \int_0^{2\pi} \frac{R^2-r^2}{R^2-2Rr\cos\theta+r^2} d\theta =1$$
I've seen people get a proof quite easily by using the residue theorem, but I have not studied it yet so I am not supposed to do it.
My attempt:
Let $\gamma = re^{it}$,
$$\int_\gamma f dz = \int_\gamma \frac1z + \frac2{R-z} dz$$
$$\Rightarrow \int_\gamma f dz = \int_0^{2\pi} \frac{ire^{it}}{re^{it}}dt + \int_0^{2\pi} \frac{2ire^{it}}{R-re^{it}}dt$$
$$ = 2\pi i + \int_0^{2\pi} \frac{2Rr\cos t + 2r}{R^2+2Rr\cos t + r^2} dt$$
But I don't know what else should I do. Any ideas?
Edit: Sorry I had a typo, the function to integrate was $ \frac{R+z}{z(R-z)} $ and not $ \frac{R-z}{z(R-z)} $

We could avoid complex analysis altogether
$$I = \frac{1}{\pi}\int_0^\pi \frac{R^2-r^2}{R^2+r^2 - 2Rr\cos\theta}\:d\theta$$
$$ = \frac{1}{\pi}\int_0^\pi \frac{R^2-r^2}{R^2+r^2\left(\cos^2\frac{\theta}{2}+\sin^2\frac{\theta}{2}\right) - 2Rr\left(\cos^2\frac{\theta}{2}-\sin^2\frac{\theta}{2}\right)}\:d\theta$$
$$\frac{1}{\pi}\int_0^\pi \frac{(R-r)(R+r)}{(R-r)^2\cos^2\frac{\theta}{2}+(R+r)^2\sin^2\frac{\theta}{2}}\:d\theta = \frac{2}{\pi}\int_0^\pi \frac{\left(\frac{R-r}{R+r}\right)\cdot\frac{1}{2}\sec^2\theta\:d\theta}{\left(\frac{R-r}{R+r}\right)^2+\tan^2\frac{\theta}{2}}$$
$$= \frac{2}{\pi}\tan^{-1}\left[\left(\frac{R-r}{R+r}\right)\tan\frac{\theta}{2}\right]\Biggr|_0^{\pi^-} = 1$$
with the assumption that $|R|\neq|r|$
