TITLE: Integration trick $\int^{2\pi}_{0} f(a+ r \cos \theta, b+r\sin \theta)d\theta=2\pi f(a,b)$
QUESTION [10 upvotes]: While looking for some nice integrals that are not taught in school, I found this theorem:

Suppose $f$ is a bivariate harmonic function; $(a,b)$ is a point in the plane; and $r$ is a positive real number. Then, 
  $$
\int^{2\pi}_{0} f(a+ r \cos \theta, b+r\sin \theta)d\theta=2\pi f(a,b)
$$ 

Is there a nice way to prove the theorem above? 
Unfortunately I have no idea how to start proving this, but I suspect it's related to Euler's formula since there is an example there that can be solved that way.

Source $\longrightarrow$ Integration Tricks | Brilliant Math & Science Wiki

REPLY [3 votes]: This follows from the Mean Value Theorem for harmonic functions. Let $f\in C^2(\Omega)$ be a harmonic function on some open domain $\Omega\subseteq\mathbb{R}^n$ then 
$$f(x_0)=\frac{1}{\text{vol}(B(x_0,r))}\int_{B(x_0,r)}f(x)\,dx=\frac{1}{\text{vol}(\partial B(x_0,r))}\int_{\partial B(x_0,r)}f(x)\,dS$$
for every ball $B(x_0,r)\subseteq \Omega$. Here $\partial B(x_0,r)$ is the sphere centered at $x_0$ with radius $r>0$ and $\,dS$ is the element of integration on $\partial B(x_0,r)$. Using the second formula for $n=2$ we obtain
$$f(x_0)=\frac{1}{2\pi r}\int_{||x-x_0||\leqslant r}f(x)\,dS=\frac{1}{2\pi }\int_0^{2\pi}f(x_0+rw(\theta))\,d\theta$$
where $w(\theta):=(\cos(\theta),\sin(\theta))$. In particular for $x_0:=(a,b)$ you get the desired result.