Problem Consider a sphere with radius $R$, and with a charge distribution $\rho(r)=\rho_0r$. Using Poisson's equation, calculate the electric potential inside and outside the sphere.
Solution I don't know how to solve completely this problem. I understand that outside the sphere ($r>R$), the potential must satisfy the Laplace's equation. And by symmetry the solution can be written in terms of spherical harmonics $Y_l^m(\theta,\phi)$. But inside the sphere ($r<R$) I'm not sure how to proceed. I was thinking in using Poisson's equation in the "spherical form" (in spherical coordinates), and by symmetry again, the potential $V$ must depend only of the radial coordinate in spherical coordinates $r$. Then the laplacian operator acting on $V$ yelds $$\frac{1}{r^2}\frac{d}{d r}(r^2 \frac{d V(r)}{d r})=-\rho_0r$$
A subsequent integration yelds $$\frac{d V}{d r}=-\frac{\rho_0}{4}r^2$$ and finally $$V(r)=-\frac{\rho_0}{4\cdot3}r^3$$
But, as I said, I'm not sure if this method gives me the correct answer. Can you give me another method or can you check this with your own and tell me if this answer is correct please?