Question: find the bounded function $u(x,y)$ that satisfies the following conditions
$$\nabla^2u(x,y)=0, \qquad 4<x^2+y^2<16$$ $$u(x,y)=x, \qquad x^2+y^2=4$$ $$u(x,y)=y, \qquad x^2+y^2=16$$
First of all I transform this problem to polar coordinates, obtaining
$$u_{rr}+\frac{1}{r}u_{r}+\frac{1}{r^2}u_{\theta\theta}=0, \qquad 3<r<4$$ $$u(3,\theta)=3\cos(\theta), \qquad -\pi\leq\theta\leq\pi$$ $$u(4,\theta)=4\sin(\theta), \qquad -\pi\leq\theta\leq\pi$$
I'll jump to the expression for the general solution to a Laplace Equation in polar coordinates, since where I'm getting stuck at is when evaluating the boundary conditions. A general expression would be the following: $$u(r,\theta)=A+B\ln(r)+\sum_{n=1}^\infty (C_n\,r^n+D_n\,r^{-n})(E_n\sin n\theta+F_n\cos n\theta)$$ Since the boundary conditions are just a sine and a cosine, I thought it would be almost trivial to find expressions for the coefficients. But I've been stuck for quite some time now, how would one solve this system of equations to find said coefficients?
There is no reason why $\sin n\theta$ and $\cos n\theta$ has to share the same function of $r$, which is probably why you are having troubles
Quicker way: We know the solution has to be of the form $$ u(r,\theta)=f(r)\sin\theta+g(r)\cos\theta. $$ So substituting, we want to solve $$ f''(r)+\frac1rf'(r)-f(r)=0,\quad f(3)=0,\quad f(4)=4 $$ and similarly $g$. That gives you a solution in terms of the modified Bessel functions $I_0,K_0$.