# Lecture 5 - Calculating Electric Fields

If you need a pdf version of these notes you can get it here

## Electric field from charge

The field from a point charge is a vector $\vec{E}$ which has magnitude

$E=\frac{1}{4\pi\epsilon_{0}}\frac{Q}{r^{2}}$

and when $Q$ is positive points radially outwards from the charge.

You could write this as

$\vec{E}=E\hat{r}$

where $\hat{r}$ is a unit vector pointing away from the charge.

For a negative charge, Q is negative so the multiplication of the negative scalar with the outward $\hat{r}$ vector results in a field $\vec{E}$ that points inward towards the charge.

## Field from an element of charge

The field from an element of charge,

$\vec{dE}=dE\,\hat{r}$

which also points radially outwards from the charge element has magnitude

$dE=\frac{1}{4\pi\epsilon_{0}}\frac{dq}{r^{2}}$

If we want to find the field directly from a distribution of charge we can integrate over the charged distribution, but we have to be careful to do take in to account the vector nature of the field! In principle if we want to find the total field vector we need to integrate taking into account the direction. In a 3 dimensional coordinate system with no symmetry this would be 3 integrals, one for each vector in our coordinate system and each vector would contain some relationship to define the component of field that points from the charge we are looking at to the point where we want to know the field.

We will not do general problems like this because they are way too hard.

We will only tackle problems using direct integration of charge to obtain field where there is cancellation of components of the field from different parts of the charge distribution.

## What needs to go inside the integral?

Confusion often arises over what is constant and what needs to be integrated over. When calculating fields by direct integration using the integral $E=\int dE=\frac{1}{4\pi\epsilon_{0}}\int\frac{dq}{r^{2}}$ the question we need to ask is, does the distance of the charge from the point where we want to know the field change as we move in the charge distribution? If so we need to express the distance $r$ from the charge in terms of the variable over which we are integrating (see the example for the line of charge). If not, $\frac{1}{r^{2}}$ can be moved outside the integral.

This was the key difference between the ring of charge integral and the line of charge integral.

## Integration over a charge distrbution

Suppose we want to integrate over a distribution of charge. What does $\int dq$ really mean?

For a line of charge $\int dq = \int \lambda\,dx$
For a sheet of charge $\int dq = \int \sigma\,dA$
For volume of charge $\int dq =\int \rho\,dV$

If the charge density is uniform with respect to the variable being integrated over, then it can be taken out of the integral, if not then it needs to be included in the integral.

Depending on the symmetry of the problem we might choose to integrate over Cartesian coordinates or polar coordinates, so for example,

for a rectangular sheet of charge $\int dq = \int \sigma\,dA=\int \int \sigma \,dx\,dy$
for a circular sheet of charge $\int dq = \int \sigma\,dA=\int \int \sigma r\,dr\,d\theta$

Typically we have considered situations where one of these integrals is already done, for example when considering a uniform disk we first did the integral over $\theta$ for a given radius (integral over a ring) and then integrated this result over the radius for a disk.

## Gauss's Law

$\Phi_{E}=\oint\vec{E}.d\vec{A}=\frac{Q}{\varepsilon_{0}}$

Gauss's law will often give us a better way to evaluate the field for a distribution of charge, because on the right hand side we only need to evaluate the total amount of charge, we don't need to consider the direction or the distance of the field from the charge to the point at which we need to know the field.

The most important step is to choose an appropriate Gaussian surface which reflects the symmetry of the charge. We should remember that the Gaussian surface must be a closed surface, and so it may be composed of more than one surface. If possible we want to choose the surfaces so that the field on each surface is uniform and we don't have to actually any integration over the surface. It's important to remember that flux has a sign - it is positive when it is leaving the volume, and negative when entering (as the $\vec{A}$ always points out).

In this course we will consider only 3 kinds of symmetry when applying Gauss's Law.

## Spherical symmetry

If the field points out radially from the center of the sphere

$\oint\vec{E}.d\vec{A}=\oint E\,dA$

and if it is uniform over the surface

$\oint E\,dA=E \oint dA=E4\pi r^{2}$

To find the enclosed charge

$Q=\int\int\int\rho\,dV$

In cases where $\rho$ is either constant or only depends on r

For a spherical volume the integral $\int\int\int\rho\,dV=\int\rho A dr=\int\rho 4\pi r^{2}dr$

## A spherical example

A insulating sphere of radius $r_{1}$ has a total positive charge Q which is evenly distributed throughout, except for in the center of the sphere where there is a spherical cavity of radius $r_{0}$ which contains no charge. Let $r$ be the distance of a point from the center of the sphere. Write your answers in terms of $Q$, $r$, $r_{1}$, $r_{0}$ and $k$ or $\varepsilon_{0}$.

• What is the electric field $E(r)$ for points $r<r_{0}$?

$E=0$

• What is the electric field $E(r)$ for points $r_{0}<r<r_{1}$?

$E4\pi r^2=\frac{1}{\varepsilon_{0}}\int_{r_{0}}^{r}\rho 4\pi r^{2}\,dr=\frac{\rho}{\varepsilon_{0}}\frac{4\pi}{3}(r^{3}-r_{0}^3)$

$E=\frac{\rho}{\varepsilon_{0}}\frac{1}{3r^{2}}(r^{3}-r_{0}^3)$

$\rho=\frac{Q}{\frac{4}{3}\pi r_{1}^{3}-\frac{4}{3}\pi r_{0}^{3}}$

$E=\frac{1}{4\pi\varepsilon_{0}r^{2}}Q\frac{r^{3}-r_{0}^{3}}{r_{1}^3-r_{0}^{3}}=\frac{1}{4\pi\varepsilon_{0}}\frac{Q}{r_{1}^{3}-r_{0}^{3}}(r-\frac{r_{0}^{3}}{r^{2}})$

• What is the electric field $E(r)$ for points $r>r_{1}$?

$E=\frac{1}{4\pi\varepsilon_{0}}\frac{Q}{r^{2}}$

• Make a rough sketch of the electric field $E(r)$ against $r$. Make sure to label $r_{0}$ and $r_{1}$ on your sketch.

## Cylindrical symmetry

If we consider a field that has cylindrical symmetry so that the flux through the end circular surfaces is zero and for the curved surface

$\oint\vec{E}.d\vec{A}=\oint E\,dA$

As the field is uniform over the surface

$\oint E\,dA=E \oint dA=E2\pi rl$

To find the enclosed charge

$Q=\int\int\int\rho\,dV$

In cases where $\rho$ is either constant or only depends on r

$Q=\int\int\int\rho\,dV=\int\rho A dr=\int\rho 2\pi r l dr$

## A cylindrical example

A long cylinder of charge has a uniform volume charge density $\rho$ and radius $R_{1}$. Give your answers to the following questions in terms of some or all of the variables $\rho$, $r$, $\varepsilon_{0}$, $R_{1}$, and $R_{2}$.

A. Write an expression for the electric field as a function of the distance from the center of the cylinder, $r$, for $0<r \leq R_{1}$.

$E2\pi rl=\int_{0}^{r}\rho 2\pi r l dr=\frac{\rho \pi r^{2} l}{\varepsilon_{0}}$

$E=\frac{\rho r}{2\varepsilon_{0}}$

B. Write an expression for the electric field as a function of the distance from the center of the cylinder, $r$, for $r>R_{1}$.

$E2\pi rl=\int_{0}^{R_{1}}\rho 2\pi r l dr=\frac{\rho \pi R_{1}^{2} l}{\varepsilon_{0}}$

$E=\frac{\rho R_{1}^{2}}{2r\varepsilon_{0}}$

C. Plot $E$ as a function of $r$ for the situation considered in (a) and (b).

There is no change from B.

$E=\frac{\rho R_{1}^{2}}{2r\varepsilon_{0}}$

D. I wish to surround the cylinder by a thin cylindrical sheet of charge such that there is no electric field outside the sheet. The sheet has a radius $R_{2}>R_{1}$ and has an area charge density $\sigma$ . Write an expression for the required area charge density $\sigma$ so that the field for $R>R_{2}$ is zero.

For there to be no enclosed charge

$\rho\pi R_{1}^{2}l+\sigma 2\pi R_{2}l=0$

$\sigma=-\frac{\rho R_{1}^{2}}{2R_{2}}$

E. For the case considered in D., write an expression for the electric field as a function of the distance from the center of the cylinder, $r$, for $R_{1}<r<R_{2}$.

## Planar symmetry

If the plane is infinite then the flux through the curved surfaces is zero and we only need to be concerned about the flux through the flat prism surfaces of area $A$. The flux through those two faces will not always be the same, so in general if we define a field through the left face $\vec{E}_{L}$ and the right face $\vec{E}_{R}$

$\Phi_{E}=\oint\vec{E}\cdot d\vec{A}=\vec{E}_{L}\cdot\vec{A}+\vec{E}_{R}\cdot\vec{A}$

$Q=\int\int\int\rho\,dV=\int\rho(l) A dl$

or when there is a sheet of charge $\sigma$