What is the value of $$\int_0^{2\pi}\ln|i+2e^{ix}|dx$$
At first glance I thought of applying Gauss mean value theorem, but this is not applicable here as $\ln|z|$ is not analytic at $0$, which belongs in the region $|z-i|<2$.
How one can approach this one? Any help is appreciated.
There is a beautiful (and theoretically very important) generalization of Gauss' mean value theorem, it is called the Jensen's formula. Given that you know Gauss' mean value theorem you can look up the proof of Jensen in Chapter 5 of Stein-Shakarachi's Complex Analysis.
Jensen's Formula: Let $\Omega$ be an open set that contains the closure of a disc $D_R$ and suppose that $f$ is holomorphic in $Ω$, $f (0)\neq 0$, and $f$ vanishes nowhere on the circle $C_R$ . If $z_1 , . . . , z_N$ denote the zeros of $f$ inside the disc (counted with multiplicities), then $$\log|f(0)|=\sum_{i=1}^{N} \log\Bigg(\frac{|z_k|}{R}\Bigg)+\frac{1}{2\pi}\int_{0}^{2\pi}\log|f(Re^{i\theta})|d\theta$$
You have to use Jensen here, because unfortunately the function $f(z)=z+i$ has a root in $|z|<2$, and $\log|.|$ of it won't satisfy the hypothesis of Gauss' mean value theorem unless we make some clever manipulations.
Now apply the above for $f(z)=z+i$, then we have that
$$\log|i|=\log|1/2|+\frac{1}{2\pi}\int_{0}^{2\pi}\log|2e^{i\theta}+i|d\theta$$ which immediately gives $$\int_{0}^{2\pi}\log|2e^{i\theta}+i|d\theta=2\pi\log(2).$$