Poisson's Equation in Cylindrical Coordinates I have a question about a specific step in this problem that comes from 'University of Chicago Graduate Problems in Physics', Cronin, Greenberg, and Telegdi.

A long hollow cylindrical conductor of radius $a$ is divided into two parts by a plane through the axis, and the parts are separated by a small interval. If the two parts are kept at potentials $V_1$ and $V2$, show that the potential at any point within the cylinder is given by
$$
V=\frac{\left(V_{1}+V_{2}\right)}{2}+2 \frac{\left(V_{1}-V_{2}\right)}{\pi} \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{(2 n-1)}\left(\frac{r}{a}\right)^{2 n-1} \cos (2 n-1) \theta
$$


When cross-referencing my solution with that of the textbook's, I see that I have the correct approach. Using the Poisson equation,
$$
\nabla^{2} V=0=\frac{\partial^{2} V}{\partial r^{2}}+\frac{1}{r} \frac{\partial V}{\partial r}+\frac{1}{r^{2}} \frac{\partial^{2} V}{\partial \theta^{2}}
$$
and separation of variables yields:
$$V=\sum_{m=0}^{\infty}\left(\frac{r}{a}\right)^{m}\left[A_{m} \cos (m \theta)+B_{m} \sin (m \theta)\right]$$
Now
$$V(r=a, \theta)=\sum_{m=0}^{\infty}\left[A_{m} \cos (m \theta)+B_{m} \sin (m \theta)\right]$$
$B_m=0$ by symmetry since $V(\theta) = V(-\theta)$. $A_m$ is calculated using the orthogonality of trig. functions, and the boundary conditions of $V_1$ and $V_2$,
$$
\int_{-\pi / 2}^{\pi / 2} V_{1} \cos n \theta d \theta+\int_{\pi / 2}^{3 \pi / 2} V_{2} \cos n \theta d \theta=\frac{2\left(V_{1}-V_{2}\right)}{n} \sin \left(\frac{n \pi}{2}\right)=\pi A_{n}
$$
but I don't understand how to correctly find the $A_0$ term. The solutions have the following statement:
$$
\pi\left(V_{2}+V_{1}\right)=2 \pi A_{0}
$$
I'm not sure how this comes about.
 A: This is pretty much exactly how you do a Fourier decomposition. The term $A_0$ is usually called the "DC" component of the decomposition, and is obtained by simply integrating the function that you're decomposing as a Fourier sum (in your case, it's $V(a,\theta)$).
You should be able to show that $$A_0 = \frac{1}{2\pi}\int_0^{2\pi} V(a,\theta)\text{d}\theta,$$
since all the sines and cosines integrate out to zero, leaving only a constant term behind. But this integral is quite trivial to do in this case, since $$V(a,\theta) = \begin{cases}V_1 \quad 0 < \theta < \pi \\ V_2 \quad \pi< \theta < 2\pi\end{cases},$$
and so $$2 \pi A_0 = \int_0^\pi V_1 \text{d}\theta + \int_{\pi}^{2\pi} V_2 \text{d}\theta = \pi\, (V_2 + V_1).$$
A much nicer (and quicker!) way to do it would be to realise that $A_0$ is the value of the potential when $r = 0$, which is exactly in between the two halves of the cylinder, at its centre. By symmetry, the potential at that point must be the average of the potential on either side, by cylindrical symmetry about the axis.
