Finding a scalar field whose gradient is a given conservative vector field

2.4k Views Asked by At

I'm studying for a course in electromagnetism, and I've been given an electric field for which I need to find the associated scalar potential. I was going to originally post this in the physics section but I think my problems are more calculus related. The field is the field generated by a sphere of radius $R$ with constant charge density $\rho$ throughout its volume, so that the total charge $Q=\dfrac{4\pi r^3 \rho}{3}$contained in the sphere is constant.

The electric field is given by $\vec{E}_{\text{in}}(\vec{r})=\dfrac{Q}{4\pi \epsilon_0 R^3}r$ and $\vec{E}_{\text{out}}(\vec{r})=\dfrac{Q}{4\pi \epsilon_0 r^2}$, where the former is valid for $r\leq R$ and the latter for $r\geq R$. This I've calculated before and I do not have trouble with. The scalar potential $\phi(\vec{r})$ is defined by $\vec{E}=-\vec{\nabla}\phi$. The provided solutions to the problem are hand written but I'll type them here using the exact same notation:

$\phi_{\text{in}}=-\int \vec{E}_{\text{in}}d\vec{r}=-\dfrac{Qr^2}{8\pi \epsilon_0 R^3} + C_1$

$\phi_{\text{out}}=-\int \vec{E}_{\text{out}}d\vec{r}=\dfrac{Q}{4\pi \epsilon_0 r} +C_2$

This is literally all the information I've been given. I really don't know what these integrals are, nor how they follow from the above equation. I can see that the result of the first integral for example is just the indefinite integral $-\int \dfrac{Q}{4\pi \epsilon_0 R^3}r dr$ but I can't see how this stage was reached.

Any clarification would be much appreciated!

1

There are 1 best solutions below

2
On

The integrals are over the surface $S$ of the sphere (at radius $R$). The confusion might be because you overlooked a $\cdot$. The integrand is the dot product of $\vec{E}$ with the unit normal to the surface, which your professor has written as $d\vec{r}$ but wouild more commonly be written as $dS$. The integral can be read in spherical coordinates as $$ \int_S E_r(R, \theta, \phi) r\,d\theta\,d\phi $$ and the $\vec{E}\cdot \vec{r}$ is just expressing that you need to take the $r$ component of the field.