The superposition principle for the electric field extends to the realm of continuous distributions, with the sum replaced by an appropriate integral.
For example, let’s say we have a curve , and along this curve we have a charge. It makes sense to measure the charge in units per unit of distance, like coulombs per meter. We can even let it vary from point to point, getting a function describing the charge per unit length near the point with parameter . To be a little more explicit, if is the “line element” that measures a tiny bit of distance near the point , then measures a little bit of charge near that point.
We can now use the Coulomb law to see what electric field this tiny bit of charge creates at a point with position vector :
since the displacement vector from to is . Now we can take this “differential electric field” and integrate it over the curve, adding up all the tiny contributions to the field at made by all the tiny bits of charge along the curve.
As an example, let’s consider an infinite line of charge along the axis with a constant charge density of ; a piece of the line of length will have charge . Admittedly, this is not a finite-length curve like above, but the same principle applies. We set , so and .
Geometric considerations tell us that the electric field generated by the line at a point is contained in the same plane that contains the line and the point. We can also tell that the field points directly perpendicular to the line; if then the vertical component induced by the chunk at is cancelled out by the component induced by the chunk at . Indeed, we can check that the first gives us
while the second gives us
and the vertical components of these two exactly cancel each other out.
All that remains is to calculate the horizontal component. Without loss of generality we can consider the point , and we must calculate the -component of the electric field by taking the integral
We need an antiderivative of the integrand , and it turns out that fits the bill. Indeed, we check:
as asserted. Thus we continue the integration:
which is a nice, tidy value. More generally, we find
pointing directly away from the (positively) charged line, neither up nor down, and falling off in magnitude as the first power of the distance from the line.