In the previous chapter we saw how Gauss' Law was able to help us calculate the electric field of certain very symmetric charge distribution. For most charge distributions, we need to integrate. If you've taken integral calculus already, you've already learned how to evaluate integrals, but in this chapter we will focus on constructing integrals. Some of them we'll evaluate, some of them we won't, some of them we can't — but in physics, the integral itself can be interesting regardless of what it evaluates to.

In case you haven't had much practice in constructing integrals, let's begin with a more basic example before tackling electric field integration.

Charge Integration

Suppose we have a line segment which is 1 meter long, and has a uniform line charge density of \(\lambda=3\u{mC/m}\). What is the total charge on that line? Well, we know from a previous section that

$$q=\lambda L=(3\u{mC/m})(1\u{m})=3\u{mC}$$

Which λ should we use?
Simple, right? Now suppose the charge density of the line isn't uniform, but instead increases as one moves to the right, according to the formula
λ(x) = (3 mC/m2)x
so the charge density is zero on the left end of the rod, and then grows steadily to a maximum value of (3mC/m) on the right. We can't use the formula q=λL now, because there isn't a single value of λ to plug into the formula anymore: every point on the line has its own value. So what do we do?

Suppose we took the line and chopped it up into a bunch of tiny pieces. Each of these is a line segment as well, and if the pieces are small enough, the charge density λ is not going to vary much from one side to the other. Thus we can make the approximation that λ is constant on each segment, and calculate the segment's charge using the formula q=λL. The total charge of the entire line is the sum of all of these little charges. The following animation shows how this works.

Interactive 6.1.1

This is an approximation, but one which gets better and better as we make the pieces smaller and smaller, and we can get an exact result by taking the limit as the segment size goes to zero. This is, of course, what calculus does. In calculus notation, we put the letter d in front of every tiny quantity (e.g. the width dx and charge dq of each little piece) to indicate that they are infinitesimal. The total charge on the line is the sum of all the little charges dq: in calculus we use the integral symbol ∫ when we add up tiny quantities, so we write

This integral may look trivial, but it's not complete. In particular, we don't know what the limits of integration are so we can't come up with a number: generally speaking, we know how to find the limits of integration if we're integrating over space (i.e. x) or time (t), but not over some other quantity like charge. What we need to do is to replace dq with another tiny quantity which involves small pieces of space or time. The charge dq of each little piece is given by the formula
and if we substitute this into the integral above, we will change the variable of integration from q to x.
$$q=\int\lambda\,dx=\int\multiplier x\,dx$$
Now that the integration variable is x, the limits of integration are easy to determine: as we integrate over the line, the variable x changes from x = 0 m to x = 1 m, and so we can write
$$q=\int_0^1 \multiplier x\,dx=\multiplier\left[\frac12x^2\right]_0^1=\halfmultiplier\u{mC}$$

$$\let\sg\sigma$$ Now suppose we want to find the total charge of a rectangle with a surface charge density of $$\sigma(x,y)=xy\u{\mu C/m^2}$$ Because the surface charge density isn't a constant, we divide the rectangle up into a bunch of little pieces, find the charge \(dq\) of each, and integrate to find the total charge. If the area of each little piece is \(dA\), then the charge on it is \(dq=\sg\,dA\), and $$Q=\int dq=\int \sg\,dA$$ In this case, we're going to break the area up into little rectangles, each with width \(dx\), height \(dy\), and thus area \(dA=dx\,dy\). Substituting in gives us $$Q=\int\sg\,dA=\iint\sg\,dx\,dy$$ This is a two-dimensional integral in x and y. Multiple integrals are evaluated by starting with the innermost integral and moving outward: y is treated as a constant when doing the x integral, and vice versa: $$ \begin{eqnarray} Q&=\int_0^1\left(\int_0^2 xy\,dx\right)dy\\ &=\int_0^1 y\left[\frc2 x^2\right]_0^2 dy=\int_0^1 2y\,dy\\ &=\left[y^2\right]_0^1=1\u{\mu C}\\ \end{eqnarray} $$ Because the integrand could be factored into \(x\) and \(y\) pieces, we can also write this integral as a product of two single integrals: $$\begin{eqnarray} Q&=&\int_0^1 \left(y\int_0^2 x\,dx\right)dy \qquad\hbox{Because $y$ is independent of $x$}\\ &=&\int_0^1 y\left(\int_0^2 x\,dx\right)dy\\ &=&\left(\int_0^2 x\,dx\right)\int_0^1 y\,dy \qquad\hbox{Because $\int_0^2 x\,dx$ is independent of $y$}\\ &=&(2)\left(\frc2\right)=1\\ \end{eqnarray}$$ The charge of a three-dimensional charge distribution is found in the same way, with \(dq\) replaced by \(\rho\,dx\,dy\,dz\).