# Electric Potential of a Charged Sphere

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?

The problem is radially symmetric both in and outside the sphere. Because of the radial symmetry only the component with $l=0$ and $m=0$ survives; so that the potential is only a function of $r$.
As you correctly noted, the potential thus satisfies the equation $$\frac{1}{r^2}\frac{d}{d r}\left(r^2 \frac{d V(r)}{d r}\right)=-\rho(r)$$ with $$\rho(r) = \begin{cases} \rho_0 r, & r<R, \\ 0, &R>0.\end{cases}$$
Solving the potential outside the sphere $$\frac{1}{r^2}\frac{d}{d r}\left(r^2 \frac{d V(r)}{d r}\right)= 0,$$ we find $V(r>R) = \frac{C}{r}$ with $C$ a constant; we set the integration constant such that $V$ approaches $0$ for $r\to\infty$.
The equation for the potential inside the sphere fulfils the equation $$\frac{1}{r^2}\frac{d}{d r}\left(r^2 \frac{d V(r)}{d r}\right)= -\rho_0 r$$ with the solution $$V(r<R) = -\frac{\rho_0 r^3}{12} + c$$ where we took into account that the potential should remain finite for $r=0$.
From the condition that $V(r)$ and $V'(r)$ are continuous at $r=R$, we obtain the relations $$c- \frac{\rho_0 R^3}{12} = \frac{C}R, \qquad -\frac{\rho_0 R^2}4 = -\frac{C}{R^2}$$ with the solution $C= \rho_0 R^4/4$ and $c= \rho_0 R^3/3$.
Thus the solution has the form $$V(r) = \begin{cases} \frac{\rho_0}{12} (4 R^3 -r^3),& r<R,\\ \frac{\rho_0 R^4}r, &r<R. \end{cases}$$
{"ft_lang_label":"__label__en","ft_lang_prob":0.89032745,"math_prob":0.9999876,"size":1122,"snap":"2020-10-2020-16","text_gpt3_token_len":309,"char_repetition_ratio":0.11627907,"word_repetition_ratio":0.0,"special_character_ratio":0.27094474,"punctuation_ratio":0.078341015,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":1.0000091,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-04-10T10:49:07Z\",\"WARC-Record-ID\":\"<urn:uuid:e502edf9-3744-4da7-9b2c-6eda4b0cf4f2>\",\"Content-Length\":\"143325\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:6f812ae7-2b98-4b67-9071-08990a196948>\",\"WARC-Concurrent-To\":\"<urn:uuid:b45089bc-3f86-45a4-bb5b-ac8a39c3f2d4>\",\"WARC-IP-Address\":\"151.101.1.69\",\"WARC-Target-URI\":\"https://physics.stackexchange.com/questions/45602/electric-potential-of-a-charged-sphere\",\"WARC-Payload-Digest\":\"sha1:KOFP3RU5HUBDSD64Q2ZO65T6XWFJ2YYI\",\"WARC-Block-Digest\":\"sha1:5HJ3DOLAROIYH3J622RU7ZI2FGJEAGTK\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-16/CC-MAIN-2020-16_segments_1585371893683.94_warc_CC-MAIN-20200410075105-20200410105605-00191.warc.gz\"}"}