# How to integrate $\int_0^{2\pi } \ln \vert z - \frac{\pi}{2} \vert d\theta$?

Compute $$\int_0^{2\pi } \ln \vert z - \tfrac{\pi}{2} \vert d\theta$$ for $$z=\pi e^{i\theta}$$. (Here the $$\ln$$ is natural logarithm.)

Since $$dz = \pi i e^{i\theta} d\theta$$. Therefore, $$d\theta = \frac{dz}{zi}$$.

Therefore, $$\int_0^{2\pi } \ln \vert z - \tfrac{\pi}{2} \vert d\theta = \int _{\vert z\vert =\pi} \frac {\ln\vert z - \frac{\pi}{2} \vert }{zi} dz$$

I can't proceed for next step anymore. What should I do next to find that value?

• Surely the contour is $|z|=\pi$.
– J.G.
Jun 23 at 9:07
• You can use the fact that your integral is ${\mathop{\rm Re}\nolimits} \int_0^{2\pi } {\log \left( {\pi e^{i\theta } - \frac{\pi }{2}} \right)d\theta } .$
– Gary
Jun 23 at 9:07
• @J.G., Yes that was the typo. I edited. Jun 23 at 9:12
• How did you get the last equality?
– Gary
Jun 23 at 9:14
• @Gary. In fact I've got some that from math.stackexchange.com/questions/238272/…. But I'll deleted it if that does not hold. Jun 23 at 9:26