If $\gamma$ is a piecewise, smooth, positively oriented simple closed curve in $D$, then Cauchy's formula states that $f(z)=1/2\pi i\int_\gamma {f(a)\over {a-z}}$.
My textbook also stated that for $z$ is the center of the circle then $f(z)=1/2\pi \int_0^{2\pi}f(z+re^{it})dt$. There was no further justification,
I technically understand everything the way they were written, because a circle can be formulated as $re^{it}$, and since $z$ is the center, so you add $z$. And you integrate from $0\to \pi$. So that all makes sense, but where does the $i$ go, and if I want to, how do I write a formal proof for this formula?