Show that the mean value formula, i.e $u(0) = \frac{1}{2\pi}\int_0^{2\pi} u(r \exp(i\theta))\,d\theta$, remains valid for $u = \log|z+1|, r = 1$, and use this fact to compute $\int_0^\pi \log(\sin(\theta))\,d\theta$.
It is clear that $u(z) = \log|z+1|$ is harmonic as long as $|z| < 1$. Also $u(z)$ is well defined for $|z|=1, z\ne -1$. This means that $u(0) = \frac{1}{2\pi}\int_0^{2\pi} u(r\exp(i\theta))\,d\theta \,\,\,\forall r \lt 1$. Because $r$ can be chosen arbitrarily close to 1, is this sufficient to conclude the validity of the mean value formula even for $r = 1$?
$u(\exp(i\theta))= \log(2|\cos\frac{\theta}{2}|)$. Assuming the validity for $r=1$, I get $u(0)=\frac{1}{2\pi}\int_0^{2\pi}(\log2 + \log|\cos(\frac{\theta}{2})|)\,d\theta$. But $u(0)=0$, and from the last integral I finally get $\int_0^{\pi}\log|\cos(\theta)|\,d\theta = -\pi \log(2)$. However, if I use $u(z) = \log|z-1|$, the desired result $\int_0^{\pi}\log\,\sin(\theta)\,d\theta = -\pi \log(2)$ is obtained.
It occurs to me that both the integrals should evaluate to same value of $-\pi \log(2)$ because $|\cos(\theta)|$ and $\sin(\theta)$ span the same area in $0\le\theta\le\pi$. However I verified from http://www.wolframalpha.com/widgets/view.jsp?id=8ab70731b1553f17c11a3bbc87e0b605 and it evaluates $\int_0^{\pi}\log|\cos(\theta)|\,d\theta = -\pi \log(2) + i\epsilon$ where $epsilon$ is very small. Is this correct and i am missing some important point?
Thanks in advance.