Boundary value problem, Laplace's equation in polar coordinates I have trouble understanding the question and solution of a boundary value problem.
Consider Laplace's equation in polar coordinates $(r,\theta)$
$$\frac{\partial^2 \Phi}{\partial r^2} + \frac 1 r \frac{\partial \Phi}{\partial r} + \frac{1}{r^2} \frac{\partial^2 \Phi}{\partial \theta^2}=0$$
By separating variables, there are solutions of the form
$$\Phi(r,\theta) = (A_0 \theta + B_0)(C_0 \ln r +D_0)$$ and
$$\Phi(r,\theta) = [A_p \cos(p\theta) + B_p \sin(p\theta)](C_p r^p + D_p r^{-p})$$
where the $A's, B's, C's, D's $ and $p$ are constants.

Questions:
(1) If $\Phi$ is a single-valued function of $\theta$, how does this restrict $p$? 
(2) Solve the equation for $0 \le r \le a$ and (i) $\Phi(a,\theta)=T \cos \theta$, and (ii) $\Phi(a,\theta)=T \cos^3 \theta$.
Answers (from solutions manual):
(1) $p=\pm1, \pm2, \pm3, ...$
(2) (i) $\frac{Tr}{a} \cos \theta$ (ii) $\frac{3Tr}{4a}\cos\theta + \frac T 4 \left( \frac r a \right)^3 \cos 3\theta$
My problem is that I don't understand how these values of $p$ make this function single-valued. I assume that the function is multi-valued as it is because there are two possible solutions so that a pair of coordinates $(r,\theta)$ gives two function values, one for each solution function. So an approach would maybe be to set the $\theta$-dependent terms equal, i.e. $(A_0 \theta + B_0)=[A_p \cos(p\theta) + B_p \sin(p\theta)]$, but that doesn't seem to lead to any answer at all.
Furthermore, I don't understand what solve means in the second question. Solve for which variable/parameter? 
 A: a) Hint: Note that $(r,\theta)$ and $(r,\theta+2\pi)$ correspond to the same point on the plane. In order for these two coordinates to have the same value, $\Phi$ needs to be $2\pi$-periodic in $\theta$, i.e. $\Phi(r,\theta) = \Phi(r,\theta+2\pi)$.
b) The only variable that can be solved for here is $\Phi$. 
First, since the PDE is linear, all product solutions form a linear basis and we have a general solution:
$$ \Phi(r,\theta) = (A_0\theta + B_0)(C_0\ln r + D_0) + \sum_{p=1}^\infty \big[(A_p\cos(p\theta) + B_p\sin(p\theta)\big](C_pr^p + D_pr^{-p}) $$
(I've excluded negative values of $p$ here, see if you can explain why)
Then, consider the domain: $0 \le r \le a$. In order for the solution to be well-defined at $r=0$, we "remove" any term with a singularity there, by setting $C_0=0$ and $D_p=0$. We also want $A_0=0$ for the solution to be periodic in $\theta$. The remaining constants can be combined to form
$$ \Phi(r,\theta) = \bar A_0 + \sum_{p=1}^\infty r^p\big[\bar A_p\cos(p\theta) + \bar B_p\sin(p\theta)\big] $$
(I've renamed the constants to $\bar A_0 = B_0D_0$, $\bar A_p = A_pC_p$, $\bar B_p = B_pC_p$)
The boundary condition for the first case gives
$$ \Phi(a,\theta) = \bar A_0 + \sum_{p=1}^\infty a^p\big[\bar A_p\cos(p\theta) + \bar B_p\sin(p\theta)\big] = T\cos\theta $$
The boundary function here is already a Fourier series, so it's just a simple task of comparing coefficients. You can easily see that $a\bar A_1 = T$ and every other coefficient is $0$
For the second case, use the identity
$$ \cos^3\theta = \frac34\cos(\theta) + \frac14\cos(3\theta) $$
