ED08E1: Electric Field of a Finite Charged Rod - Complete Component Integrals and
Trigonometric Substitution
This worked companion expands the first finite-rod example from ED08. We will calculate both
Cartesian components of the electric field from Coulomb’s law. In particular, we will not set the
vertical component equal to zero by invoking an odd-function argument. Instead, we will integrate
it, evaluate its antiderivative at both endpoints, and see the cancellation emerge as an actual
calculation.
We will also derive the antiderivatives with a trigonometric substitution, rather than simply
announcing a formula from an integration table. The goal is to learn a repeatable method for
continuous-source electrostatics.
1 Problem statement and coordinate system
A straight rod of uniform line charge density λ extends along the z axis from z = −L to z = +L,
where L > 0. The rod’s total length is 2L and its total charge is
We want the electric field at a point on the perpendicular bisector, a distance s > 0 to the right of
the midpoint:
We use Cartesian coordinates with z pointing upward. The charge density λ is a signed quantity; it
may be positive or negative.
Figure 1. The finite charged rod occupies the z axis from −L to +L. A source element at height η
contributes along the displacement R toward the observation point at sx. For positive charge at
η > 0, that contribution has positive x and negative z components.
What we must find
The answer is a vector, not just a magnitude:
There is no y component because every source element, the rod, and the observation point lie in
the xz plane. However, the value of Ez is still to be established by integration.
2 What is a source coordinate, and why introduce η?
In ED08 the position of a source element was written z′ (“z prime”). To make this calculation
easier to read we rename that integration coordinate η (Greek eta). It describes where on the rod
the little charge element is located. It is not the observation coordinate.
At a given source height η,
The infinitesimal length of the rod is dη, so its charge is
units confirm this: λ has units C∕m and dη has units m, so dq has units of coulombs.
3 Construct the source-to-field displacement carefully
Coulomb’s law must use the vector pointing from the source element to the observation point. It is
the observation position minus the source position:
Substitute the two vectors:
The minus sign before η is essential. If the source lies above the midpoint (η > 0), the
displacement from that source toward the observation point is directed downward in
z.
Because x and z are perpendicular,
Hence
and the unit vector toward the observation point is
4 Build the differential electric-field vector
The electric field of a small source charge dq is
We substitute the unit vector to express the same law in a more useful form:
Using dq = λdη, Equation (7), and R3 = (s2 + η2)3∕2,
This is the central setup equation. It contains both components, their signs, and the same
distance-dependent denominator.
To find the total field, add contributions from every source element:
Because Cartesian unit vectors do not depend on the source coordinate η, we can integrate their
scalar coefficients independently.
5 Separate the two component integrals explicitly
Reading off the coefficient of x in Equation (13) gives
Reading off the coefficient of z gives
Notice the differences:
- Ex has a constant numerator s, because the horizontal distance from every source
element to the observation point is the same.
- Ez has the numerator −η, because the vertical displacement from a source element to
the observation point changes with its height along the rod.
- We will evaluate both definite integrals. Do not cancel Ez before performing its
calculation.
Figure 2. Contributions to the field from one source element above the midpoint and one below it.
The diagram helps check component directions, but the cancellation of Ez will be proved by
explicitly evaluating the integral.
6 Why a trigonometric substitution is useful here
Both component integrals contain the same expression,
Whenever we see a positive constant squared plus an integration variable squared beneath a square
root, the substitution
is worth trying. Here s > 0 is fixed as we integrate: it is the position of the observation point, not
the integration variable.
The reason for this substitution is the trigonometric identity
It changes the troublesome sum of squares into a perfect square in trigonometric form.
Figure 3. The right triangle used for η = stan𝜃. Its adjacent side is s, its opposite side is η when
η > 0, and its hypotenuse is
. Negative values of η correspond to negative values of 𝜃.
Step A: differentiate the substitution
Since
and s is constant during integration,
Therefore
This equation is just as important as Equation (18); when changing integration variables we must
change the differential as well.
Step B: simplify the denominator
Square Equation (18):
Add s2 to both sides:
Factor out s2:
Apply the identity:
Raise both sides to the 3∕2 Power. Since −π∕2 < 𝜃 < π∕2 and s > 0, sec 𝜃 is positive,
so
The positivity condition avoids silently dropping absolute-value signs during the square-root
operation.
Step C: transform the integration limits
The original integral runs from η = −L to η = +L. Because
we define
Thus the lower endpoint becomes
and the upper endpoint becomes
Since L > 0 and s > 0, the angle α lies between 0 and π∕2.
Step D: record the triangle relations for later
From the triangle in Figure 3,
so the opposite side is L, the adjacent side is s, and the hypotenuse is
. Therefore
We will use these relations to translate our answers back into the original distances s and
L.
7 Complete x-component integration, one algebraic step at a time
Start by rewriting Equation (15):
We replace dη with Equation (22), the denominator with Equation (27), and the limits with −α
and +α:
Cancel powers of s in the fraction:
Cancel powers of sec 𝜃:
Finally use 1∕ sec 𝜃 = cos 𝜃. The entire transformed integral becomes
Simplify the constant multiplier s∕s2 = 1∕s:
The original radical has disappeared. This is the payoff of the substitution.
The antiderivative of cosine is sine:
Apply the fundamental theorem of calculus:
Write out the upper value minus the lower value:
Since sin(−α) = − sin α,
Collect the two equal terms:
Finally insert Equation (33):
Thus
No antiderivative was guessed: we obtained the answer from the explicit variable change, simplified
the transformed integral, evaluated its endpoints, and converted the trigonometric answer back to
lengths.
8 Complete z-component integration instead of assuming cancellation
Now repeat the same process for the other component. It is important to keep its leading minus
sign throughout.
The original expression is
We use the same substitution,
with
and
The limits again become −α and +α. Substitute each item into the integral:
In the numerator the two factors of s multiply to s2:
Cancel s2∕s3 = 1∕s and sec 2∕ sec 3 = 1∕ sec:
Recall the definitions
Therefore
The transformed integral is now elementary:
We find the antiderivative directly:
Evaluate at the two limits:
An expression in square brackets evaluated between limits means upper value minus lower value.
Writing out that subtraction,
Remove the parentheses inside the brackets:
Now use cos(−α) = cos α. The endpoint triangles have the same adjacent length s and the same
hypotenuse
, so both cosines are s∕
:
The two endpoint terms are identical and cancel:
This is the explicit proof that the vertical component vanishes. We did not need to invoke an
odd-function integration rule. Instead, the algebra of the definite integral produced equal endpoint
contributions with opposite signs.
9 A second check of the z integral by direct differentiation
Although our primary method was trigonometric substitution, we can check its result using a
simple derivative. Consider
Here s is still constant. Apply the chain rule:
The factors of two cancel:
Thus the integrand in Equation (48), including its leading minus sign, is a derivative:
The fundamental theorem of calculus gives
Substitute the upper endpoint η = L and lower endpoint η = −L explicitly:
Because (−L)2 = L2, the parenthesis is zero, confirming Equation (63).
This check also clarifies a general lesson: a zero definite integral does not require its integrand to be
zero. Contributions along the rod can be nonzero but integrate to zero over the complete
interval.
10 Assemble the electric-field vector
We started with
The two explicit integrations produced
and
Therefore
This is exactly the finite-rod expression obtained in ED08 by a shorter symmetry argument, but
we have now proved every component by integration.
For λ > 0 the field points in the +x direction. For λ < 0 the scalar coefficient is negative, and the
field points toward the rod in the −x direction. We do not need a new formula for negative
charge.
11 Four ways to check the answer
Check 1: units
The factor λ∕(𝜖0s) has units of electric field. The remaining factor
is dimensionless, because its numerator and denominator are both lengths.
Check 2: infinite-line limit
Keep s and λ fixed while extending the endpoints without bound, L →∞. Write
As L →∞, the ratio s∕L → 0, so the bracket tends to one. Hence
This is the well-known infinite straight line-charge field at a point on its positive radial
axis.
Check 3: distant rod behaves like a point charge
Far away from the finite rod, s ≫ L. Factor s out of the radical:
where s > 0. The result becomes
Because L∕s is small, the last factor approaches one. Recognizing the total charge Q = 2λL,
The complete rod looks approximately like a point charge at large distances. This is also a direct
connection to the monopole term of the multipole expansion in ED10.
Check 4: approach a long rod from nearby
If s ≪ L while s remains positive, then
≃ L and
This is the same functional behavior as the infinite line. Very close to the middle of a long rod, the
finite ends have little influence.
12 Independent verification using electric potential
This section is optional for a first reading, but it provides an especially useful test because
potential requires integrating a scalar kernel instead of vector components.
Choose V (∞) = 0. The potential from the rod is
Apply our same substitution η = s tan 𝜃. The radical becomes
and the differential is dη = s sec 2𝜃 d𝜃. Thus
Cancel the factors to obtain
To derive the antiderivative of secant, multiply numerator and denominator by sec 𝜃 + tan 𝜃:
Expand the numerator:
But
This is the numerator exactly. Let u = sec 𝜃 + tan 𝜃; then du is the numerator times d𝜃.
Hence
Restoring the angle,
Evaluate from −α to +α:
Since sec 2α − tan 2α = 1, the denominator is the reciprocal of the numerator. Therefore
From the right triangle,
Our potential is
An equivalent expression uses the inverse hyperbolic sine:
Because the potential depends only on s at the perpendicular-bisector observation point, the radial
field there is Ex = −dV∕ds. To check it, set w = L∕s and use
The chain rule gives
Since s > 0,
Therefore
in complete agreement with Equation (73). This verifies the x component without assuming the
formula from the original vector integral.
13 A numerical example
Suppose
The total rod length is 2L = 0.50 m, and the total charge is
Substitute into the result with 1∕(4π𝜖0) ≃ 8.988 × 109 N m2∕C2:
Calculate the denominator first:
Compute the distance in the radical:
Hence
The numerator is
Therefore
The complete vector result is
The z component remains exactly zero by the calculation above. The field magnitude is positive
and points along +x because λ > 0.
14 Common mistakes and how to catch them
- Using R = rsource − r. That points from the observation point toward the charge and
reverses the signs in the field contribution. We need observation minus source.
- Forgetting to transform dη. If η = s tan 𝜃, then dη = s sec 2𝜃 d𝜃. The substitution is
incomplete without this factor.
- Keeping the old limits after substituting. When changing variables to 𝜃, the limits
become −α and +α.
- Dropping the leading minus sign in Ez. The numerator of the z component is −η
because R = sx − ηz.
- Canceling Ez before evaluating its integral. Symmetry is a useful prediction, but the
purpose of this worked example is to obtain zero by direct integration.
- Confusing L with the total rod length. The rod extends from −L to L, so its total length
is 2L.
- Mistaking the finite-rod field for a point-charge law at every distance. The near-field
and far-field distance dependences differ.
15 Short exercises for independent practice
- Repeat the z-component calculation when the limits are η = a and η = b, with
−L ≤ a < b ≤ L. Do not assume the result is zero. Using the direct antiderivative,
obtain
- For the same limits a,b, use the trigonometric substitution to find the x component:
- Verify explicitly that the formulas above reduce to the main result when a = −L and
b = L.
- With the total charge Q held fixed, let L → 0 and explain why the rod approaches a point
charge, whereas holding λ fixed while L → 0 makes the total charge vanish.
16 Final perspective
The mathematical strategy is reusable:
- Identify source and observation positions.
- Form R = r − rsource with the correct signs.
- Write the vector Coulomb integrand before separating components.
- Keep all nonzero-looking components until they have been explicitly integrated.
- Choose a substitution that eliminates the radical; transform both the differential and
the limits.
- Evaluate endpoint values carefully, then translate back to physical distances.
- Check units, charge signs, and limiting geometries.
The finite charged rod is a particularly good self-study problem because its algebra is simple
enough to carry out completely, yet it introduces the same source-integral techniques used for
rings, disks, cylinders, spheres, and more general charge distributions.
References
[1] D. J. Griffiths, Introduction to Electrodynamics, 5th ed., Cambridge University Press,
2023.
[2] E. M. Purcell and D. J. Morin, Electricity and Magnetism, 3rd ed., Cambridge
University Press.