Consider Laplace's equation in polar coordinates $$ \frac {1}{r} \frac {\partial} {\partial r} (r \frac {\partial U} {\partial r}) + \frac {1} {r^2} \frac {\partial^2 U} {\partial \theta^2} = 0$$ with $U(r,\theta)$ as the solution, subject to the boundary conditions:
$$U(a,\theta)=\begin{cases} 2\theta && 0 < \theta <\pi\\ 0 &&\pi< \theta < 2\pi\\ \end{cases}$$
How can we calculate $\,U(0, \theta)$ ?
If we use separation of variables, we can write: $u(r,\theta) = P(r) Q(\theta)$. The boundary conditions for $u$ yield $P(a) = U(a,\theta)$ and, because of periodicity, $Q(0) = Q(2\pi)$ and $Q'(0) = Q'(2\pi)$. Plugging the new definition for $u$ into the PDE results in:
$$r^2 \left( \frac{1}{r P} \frac{\mathrm{d}}{\mathrm{d}r } \, r \frac{\mathrm{d}P}{\mathrm{d}r} \right) = -\frac{Q''}{Q} = \lambda \in \mathbb{R}, $$ where the primes denote differentiation with respect the independent variable. The problem for $Q(\theta)$ has as solution:
\begin{align} \lambda = 0: \quad & Q = A \theta + B, \\ \lambda > 0: \quad & Q = A \cos{k \theta} + B \sin{k \theta}, \\ \lambda < 0: \quad & Q = A \cosh{\sqrt{|\lambda|} \theta} + B \sinh{\sqrt{|\lambda|} \theta}, \end{align} $k^2 = \lambda$, where the periodicity condition remains to be satisfied. For $\lambda = 0$ we find $A = 0$, while for $\lambda < 0$, $A = B = 0$. For the case $\lambda > 0$, the only nontrivial solution is that corresponding to $k = n = 1,2, \ldots$ (i.e., $k$ is an integer) and therefore:
$$ Q_n(\theta) = A_n \cos{n \theta} + B_n \sin{n \theta}$$
The problem for $P(r)$ reduces to solving an Euler equation, which upon trying solutions of the type $P(r) = r^s$ yields $s^2-n^2= 0$ and therefore $s = \pm n$. The bounded solution (that for which $|P(0)|<\infty$) is therefore given by:
$$ P_n(r) = C_n r^n $$
When you impose the boundary condition at $r=a$ you can find the constant of integration $C_n$.
I hope you find this useful.
If somebody finds any typo or any other type of fail in my discussing of the problem, please let me know. Cheers!
Note that we can let $n = 0$ as a solution for the case $\lambda = 0$ since $Q_0(\theta) = A_0$ (which plays the role of the constant $B$)