I have solved the following problem \begin{align*} -\nabla^2 u=1 \quad \text{in} \quad \Omega\\ u=0 \quad \text{in} \quad \partial\Omega \end{align*} For $\Omega = \{(x,y) : a^2<x^2+y^2<b^2 \} $, but i would like to solve the same problem in $\Omega = \{(x,y,z) : a^2<x^2+y^2+z^2<b^2 \} $, so i would like some help, since i'm having some trouble trying to do this, one of the problem is that i used the fact that $\theta$ was constant, but i don't know if that is still happening and what happen with the other angle, so any help would be useful
Thanks in advance
Exploiting the spherical symmetry we can write
$$\nabla^2u=\frac1{r^2}\frac{\partial}{\partial r}\left(r^2\frac{\partial u}{\partial r}\right)=-1 \tag 1$$
for $a<r<b$. Then, solving $(1)$ for $u$ yields
$$u=-\frac16r^2+\frac Ar+B$$
Applying the boundary conditions at $r=a$ and $r=b$ reveals
$$\frac Aa+B=\frac16 a^2\\\\\frac Ab+B=\frac16 b^2$$
Solving for $A$ and $B$ we find $A=-\frac16 ab(a+b)$ and $B=\frac16(a^2+ab+b^2)$. Putting it all together, we obtain
$$\bbox[5px,border:2px solid #C0A000]{u=\frac16 (a^2+ab+b^2-r^2)-\frac{ab(a+b)}{6r}}$$