The potential inside of a uniformly charged sphere of radius R is given by $\displaystyle \frac{Q}{4\pi \epsilon _{0}}\frac{1}{2R}(3-\frac{r^2}{R^2})$

Please help me on how to plot this equation in Mathematica

Printable View

- Nov 27th 2011, 06:45 AMroshanheroHow to plot this equation in Mathematica
The potential inside of a uniformly charged sphere of radius R is given by $\displaystyle \frac{Q}{4\pi \epsilon _{0}}\frac{1}{2R}(3-\frac{r^2}{R^2})$

Please help me on how to plot this equation in Mathematica - Dec 6th 2011, 03:16 PMthelostchildRe: How to plot this equation in Mathematica
To plot this in mathematica you will need to choose some values for the constants,

I would choose units for charge so that numerically $\displaystyle Q=4\pi \epsilon_0$

and we choose the radius of the sphere to be$\displaystyle R=1$.

Since we only know the potential inside the sphere we should only plot from r=0 to r=R so the mathematica command you want to use is

Plot[0.5*(3-r^2), {r,0,1}]

and press shift and return together to evaluate it. The mathematica help should get you going with the syntax you need.