<s>[INST] Integration using mean value theorem of $\int_0^{2\pi} \frac{2+\cos\phi}{5+4\cos\phi}\,\mathrm{d}\phi=\pi$ I am going through some worksheets to study for an exam and one question is to use the mean value theorem:
$$u(a)=\frac{1}{V_r}\int_{B_r(a)}u$$
with a suitable harmonic function to show that:
$$
\int_0^{2\pi} \frac{2+\cos\phi}{5+4\cos\phi}\,\mathrm{d}\phi=\pi
$$
How do I begin?
 [/INST] We can try Poisson kernel.
$$
P_r(\theta)=\frac{1-r^2}{1-2r\cos\theta+r^2} = \Re \left(\frac{1+re^{i\theta}}{1-re^{i\theta}}\right).
$$
To have $\cos \theta$ on the numerator, we use $1+P_r(\theta)$. Then
$$
1+P_r(\theta) = \frac{2-2r\cos\theta}{1-2r\cos\theta+r^2} = 1+\Re \left(\frac{1+re^{i\theta}}{1-re^{i\theta}}\right).
$$
Put $r=1/2$, we have
$$
1+P_{1/2}(\theta) = \frac{8-4\cos\theta}{5-4\cos\theta}.$$
Then we use $\theta+\pi$ in place of $\theta$.
$$
1+P_{1/2}(\theta+\pi)=\frac{8+4\cos\theta}{5+4\cos\theta} = 1+\Re \left(\frac{1-\frac12 e^{i\theta}}{1+\frac 12e^{i\theta}}\right).
$$
Use $f(z) = 1+\frac{1-z/2}{1+z/2}$ on the neighborhood of the closed unit disk $\overline{\mathbb{D}}$, then we have by the Mean Value Theorem for $u(z)= \Re(f(z))$,
$$
\frac1{2\pi} \int_0^{2\pi} \frac{8+4\cos\theta}{5+4\cos\theta} d\theta 
=u(0) = 2.$$
The result follows by dividing both sides by $4$.
</s>