Application of Cauchy Integral Let $f$ be holomorphic in $\{|z|<R\},$ where $R>1.$ 
Show: $\begin{align}f(z)= i\text{Im}f(0) +\dfrac{1}{2\pi} \int^{2\pi}_{0} \dfrac{e^{it}+z}{e^{it}-z}
\text{Re}f(e^{it})dt, \ \forall |z| <1 \end{align} $ 
My attempt: $\begin{align} \dfrac{1}{2\pi i}\int_{C^+(0,1)}\dfrac{w+z}{w-z}f(w)dw= \text{Res}(\dfrac{w+z}{w-z}f(w),z)=2zf(z) \end{align}$
$\begin{align}=\dfrac{1}{2\pi i} \int_{C^+(0,1)}\dfrac{w+z}{w-z}\text{Re}f(w) +  \dfrac{w-z}{w+z}i\text{Im}f(w)dw \end{align}$
$\begin{align}= \dfrac{1}{2\pi}\int^{2\pi}_{0}\dfrac{e^{it}+z}{e^{it}-z}\text{Re}f(e^{it})dt + \dfrac{1}{2\pi i} \int_{C^+(0,1)}\dfrac{w+z}{w-z}i\text{Im}f(w)dw = \ ...\end{align}$
But I can't seem to get the answer. Could anyone advise on the correct approach and point out my mistakes as well? Thank you. 
 A: One problem in your attempt is that you have set $w = e^{it}$, but then have replaced $dt$ by $dw$ instead of $\frac{dw}{iw}$, so the integral you obtained is not easily related to
$$\frac{1}{2\pi}\int_0^{2\pi} \frac{e^{it}+z}{e^{it}-z}\operatorname{Re} f(e^{it})\,dt.$$
But even the integral
$$\frac{1}{2\pi i}\int_{C^+(0,1)} \frac{w+z}{w-z}\frac{f(w)}{w}\,dw = 2f(z) - f(0)$$
is not so easily transformed into the desired formula.
The usual way to obtain the formula goes via the Poisson integral of harmonic functions.
Fixing $z \in \mathbb{D}$, we consider the function
$$g(w) = \frac{f(w)}{1 - \overline{z}w}$$
which is holomorphic on a neighbourhood $\overline{\mathbb{D}}$, and hence by the Cauchy integral formula we have
$$g(\zeta) = \frac{1}{2\pi i}\int_{C^+(0,1)} \frac{g(w)}{w-\zeta}\,dw = \frac{1}{2\pi i}\int_{C^+(0,1)} \frac{f(w)}{(1-\overline{z}w)(w-\zeta)}\,dw.$$
In particular, for $\zeta = z$ we obtain
\begin{align}
\frac{f(z)}{1-\lvert z\rvert^2} &= \frac{1}{2\pi i}\int_{C^+(0,1)} \frac{f(w)}{(1-\overline{z}w)(w-z)}\,dw\\
&= \frac{1}{2\pi i}\int_{C^+(0,1)} \frac{f(w)}{(\overline{w}w-\overline{z}w)(w-z)}\,dw\\
&= \frac{1}{2\pi i}\int_{C^+(0,1)} \frac{f(w)}{(\overline{w}-\overline{z})(w-z)}\frac{dw}{w}\\
&= \frac{1}{2\pi} \int_0^{2\pi} \frac{f(e^{it})}{\lvert e^{it}-z\rvert^2}\,dt,
\end{align}
and from that
$$f(z) = \frac{1}{2\pi} \int_0^{2\pi} \frac{1-\lvert z\rvert^2}{\lvert e^{it}-z\rvert^2}f(e^{it})\,dt.\tag{1}$$
The integral representation $(1)$ is valid for all functions $f$ holomorphic in a neighbourhood of the closed unit disk [it is sufficient that the function is continuous on the closed unit disk and holomorphic on the open unit disk]. But the Poisson kernel
$$P(w,z) = \frac{1-\lvert z\rvert^2}{\lvert w-z\rvert^2}$$
is real-valued, hence we can take real parts and obtain the integral representation
$$h(z) = \frac{1}{2\pi} \int_0^{2\pi} \frac{1-\lvert z\rvert^2}{\lvert e^{it}-z\rvert^2} h(e^{it})\,dt\tag{2}$$
for all functions $h$ harmonic in a neighbourhood of the closed unit disk - a real-valued harmonic function in a neighbourhood of the closed unit disk is the real part of a function holomorphic in a (possibly smaller, if the domain of $h$ has holes outside the unit disk) neighbourhood of the unit disk.
Now we note that
$$\frac{\lvert w\rvert^2-\lvert z\rvert^2}{\lvert w-z\rvert^2} = \operatorname{Re} \frac{w+z}{w-z},$$
and hence for real-valued harmonic $h$ we have
$$h(z) = \operatorname{Re} \left(\frac{1}{2\pi}\int_0^{2\pi} \frac{e^{it}+z}{e^{it}-z} h(e^{it})\,dt\right).\tag{3}$$
But, for any continuous $g\colon \partial \mathbb{D} \to \mathbb{C}$, the function
$$z \mapsto \frac{1}{2\pi}\int_0^{2\pi} \frac{e^{it}+z}{e^{it}-z}g(e^{it})\,dt$$
is holomorphic on the open unit disk. Hence
$$\tilde{f}(z) = \frac{1}{2\pi} \int_0^{2\pi} \frac{e^{it}+z}{e^{it}-z}\operatorname{Re} f(e^{it})\,dt$$
is a holomorphic function on the unit disk, and by $(3)$ we have $\operatorname{Re}\tilde{f} \equiv \operatorname{Re} f$, hence $f - \tilde{f}$ is a holomorphic function attaining only purely imaginary values, therefore constant. And
$$f(0) - \tilde{f}(0) = f(0) - \frac{1}{2\pi} \int_0^{2\pi} \operatorname{Re} f(e^{it})\,dt = f(0) - \operatorname{Re} f(0) = i\operatorname{Im} f(0).$$
