Deriving the Poisson Integral Formula from the Cauchy Integral Formula If $f$ is analytic inside and on the unit circle $\gamma$, show that for $0<|z|<1$,
$$2\pi if(z)=\int_\gamma \frac{f(w)}{w-z}dw-\int_\gamma \frac{f(w)}{w-1/\bar{z}}dw$$
and then derive the Poisson Integral Formula:
$$f(re^{i\theta})=\frac{1}{2\pi}\int_0^{2\pi}\frac{1-r^2}{1-2rcos(\theta-t)+r^2}f(e^{it})dt, \qquad 0<r<1.$$
I know the Cauchy Integral Formula is $f(a)=\frac{1}{2\pi i}\int_\gamma \frac{f(w)}{w-a}dw$ for $a$ inside $\gamma$, and I also know its counterpart for derivatives, which is $f^{(n)}(a)=\frac{n!}{2\pi i}\int_\gamma \frac{f(w)}{(w-a)^{n+1}}dw$ for $a$ inside $\gamma$.
The former looks promising in terms of deriving the first equation, if only I can find $a$ such that $\frac{f(w)}{w-a}=\frac{f(w)}{w-z}-\frac{f(w)}{w-1/\bar{z}}$. I think a key point is working out where $1/\bar{z}$ lies in relation to $z$ but I can't seem to visualise it, thanks to the function at $0$ being a singularity. Is the idea that the first fraction has a zero at $w=z$ and the second at $w=\frac{1}{\bar{z}}$?
Putting the two fractions over a common denominator gives:
$$\frac{f(w)(w-1/\bar{z})-f(w)(w-z)}{(w-z)(w-1/\bar{z})}=\frac{zf(w)-(f(w)/\bar{z})}{(w-z)(w-1/\bar{z})}=\frac{(z-1/\bar{z})}{w^2-w(z+1/\bar{z})+z/\bar{z}}f(w)$$
which does look a little like the final equation I am trying to find if I let $z=re^{i\theta}$. 
What am I missing?
EDIT: Okay, letting the second fraction in the first equation become $\frac{\bar{z}f(w)}{w\bar{z}-1}$, I can get the second, however it is negative. I.e. I get
$$f(re^{i\theta})=\frac{1}{2 \pi}\int_0^{2 \pi}\frac{r^2-1}{2rcos(\theta-t)+r^2+1}f(e^{it})dt$$
is this okay?
I am still struggling with getting the first equation, however. Is it the case that whenever $z$ is in $\gamma$, then $1/\bar{z}$ wont be and vice versa? In which case, why do you subtract them from each other?
 A: If $0 < |z| < 1$, $z$ lies inside of $\gamma$ and $1/\bar{z}$ lies outside of $\gamma$. So 
$$\int_\gamma \frac{f(w)}{w - z}\, dw = 2\pi i f(z)$$
by Cauchy's integral formula and
$$\int_\gamma \frac{f(w)}{w - 1/\bar{z}}\, dw = 0$$
by Cauchy's integral theorem. This yields your first equation above.
Now
\begin{align}2\pi i f(z) &=\int_\gamma \frac{f(w)}{w - z} \, dw - \int_\gamma \frac{f(w)}{w - 1/\bar{z}}\, dw\\ &= \int_\gamma \left(\frac{1}{w - z} - \frac{1}{w - 1/\bar{z}}\right)f(w)\, dw\\
&=\int_\gamma \frac{z - 1/\bar{z}}{w^2 - (z + 1/\bar{z})w + z/\bar{z}}f(w)\, dw\\
&= \int_\gamma \frac{|z|^2 - 1}{\bar{z}w - (|z|^2 + 1) + zw^{-1}}f(w)\frac{dw}{w}\\
&= \int_\gamma \frac{|z|^2 - 1}{\bar{z}w + z\bar{w} - (|z|^2 + 1)}f(w)\, \frac{dw}{w}\\
&= \int_\gamma \frac{1 - |z|^2}{1 - 2\operatorname{Re}(z\bar{w}) + |z|^2}f(w)\, \frac{dw}{w}.\tag{1}\\
\end{align}
Letting $z = re^{i\theta}$ and parametrizing $\gamma$ by $w = e^{it}$, $0 \le t \le 2\pi$, we write
\begin{align}
\int_\gamma \frac{1 - |z|^2}{1 - 2\operatorname{Re}(z\bar{w}) + |z|^2}f(w)\, \frac{dw}{w}&= \int_0^{2\pi} \frac{1 - r^2}{1 - 2r\cos(\theta - t) + r^2}f(e^{it}) i\, dt.\tag{2}
\end{align}
By $(1)$ and $(2)$,
$$2\pi i f(re^{i\theta}) = \int_0^{2\pi} \frac{1 - r^2}{1 - 2r\cos(\theta - t) + r^2}f(e^{it}) i\, dt.$$
This is equivalent to 
$$f(re^{i\theta}) = \frac{1}{2 \pi}\int_0^{2\pi} \frac{1 - r^2}{1 - 2r\cos(\theta - t) + r^2}f(e^{it}) \, dt.$$ $$$$
