A rod of length L carries a charge Q uniformly distributed along its length.
Find the electrical field at point P on the axis of the rod, a distance a away from the end of the rod.
The linear charge density λ is the quantity of charge per unit length, so
λ = Q/L (1)
We can imagine that the rod divided into infinitesimal (extremely small) elements dq.
dq = λdx = Qdx/L (2)
Each element dq makes an infinitesimal contribution to the electric field at the point P.
dE = kdq/x2 (3)
We substitute equation (2) into equation (3) and we get
dE = kQdx/(Lx2) (4)
Now we can add up contributions to the electric field from all locations of dq along the rod between a and L+a by taking a definite integral.
E = a∫L+a[kQ/(Lx2)]dx
E = (kQ/L)*a∫L+adx/x2
E = (kQ/L)*[-1/x]aL+a
E = (kQ/L)*[-1/(L+a)+1/a]
E = kQ/(a(L+a))
It is interesting that the rod can become a point charge
If L → 0 or a>>L then E = kQ/a2