Example 31.21. (Calculus) Electric Potential of a Uniform Line of Charge.
Find the electric potential of a uniformly charged non-conducting wire with linear density \(\lambda\) (SI units \(\text{C/m} \)) and length \(L\) at a point that lies on a line that divides the wire into two equal parts.

Answer.
\(\dfrac{\lambda}{4\pi\epsilon_0}\, \ln\left( \dfrac{\sqrt{x^2 + (L/2)^2} + L/2}{ \sqrt{x^2 + (L/2)^2} - L/2 } \right)\text{.}\)
Solution.
We start with identifying a representative cell on the line. This is shown in the figure as an infinitesimal elment at coordinate \(y\text{.}\) The charge in the cell is \(dq = \lambda\,dy\text{.}\) From the figure, it is clear that the electric potential of this charge will be
\begin{equation*}
d\phi = \dfrac{1}{4\pi\epsilon_0}\, \dfrac{\lambda\, dy}{\sqrt{x^2 + y^2}}.
\end{equation*}
Here \(x\) is the field point. Therefore, when we sum over (i.e. integrate) the charges, we will keep \(x\) fixed. We will get the net potential at \((x,0)\text{,}\) which is the location of the field point.

Carrying out the integration yields the answer.
\begin{align*}
\phi_P \amp = \dfrac{\lambda}{4\pi\epsilon_0}\, \int_{-L/2}^{L/2} \dfrac{dy}{\sqrt{x^2 + y^2}} \\
\amp = \dfrac{\lambda}{4\pi\epsilon_0}\, \ln\left( \dfrac{\sqrt{x^2 + (L/2)^2} + L/2}{ \sqrt{x^2 + (L/2)^2} - L/2 } \right).
\end{align*}