Consider the 2D Poisson equation for $1<x^2+y^2<4$ $$\Delta u = x^2+y^2$$ with $u(1,\theta)=A$ and $u(2,\theta)=B$ where $A$ and $B$ are constants.
Since both the boundary conditions and the RHS of the Poisson equation are independent of $\theta$ I look for a solution of the form $u(r,\theta)=f(r)$.
The above PDE then becomes the ODE $$f''(r)+\frac{1}{r}f'(r)=r^2$$
Using the substitution $v(r)=f'(r)$ I find that $$v(r)=f'(r)=\frac{r^3}{4}+\frac{C}{r}$$ for some constant $C$.
Integrating this expression gives me $$f(r)=\frac{r^4}{16}+C\ln r+D$$ for some constant $D$.
Then using the boundary conditions I find that $D=A-\frac{1}{16}$ and $C=\frac{B-A-15/16}{\ln 2}$
Is my solution correct?