# Calculating potential of infinite line charge with integral

I wanted to compute the electric potential of an infinite charged wire, with uniform linear density $\lambda$.

I know that the potential can easily be calculated using Gauss law, but I wanted to check the result using the horrifying integral (assuming the wire is in the $z$ axis) \begin{align} &\phi({\bf r})=\int_{-\infty}^{+\infty}dz' \frac{\lambda}{\sqrt{x^2+y^2+(z-z')^2}} \end{align}

The antiderivative of the integrand is $$g({\bf r},z')=-\lambda\log\left( \sqrt{x^2+y^2+(z-z')^2} + (z-z') \right)$$

So the potential is: $$\phi({\bf r})=\lim_{z' \rightarrow +\infty}g({\bf r},z') -\lim_{z' \rightarrow -\infty}g({\bf r},z')$$

The first limit converges: $$\lim_{z' \rightarrow +\infty}g({\bf r},z')= \lim_{z' \rightarrow +\infty} -\lambda\log\left( \sqrt{x^2+y^2+(z-z')^2} + (z-z') \right)= -\lambda\log(\sqrt{x^2+y^2})$$

But the second limit diverges! $$\lim_{z' \rightarrow -\infty}g({\bf r},z')= \lim_{z' \rightarrow -\infty} -\lambda\log\left( \sqrt{x^2+y^2+(z-z')^2} + (z-z') \right)=\infty$$

Then $\phi=\infty$, which is absurd. So, why this calculation went wrong? Thanks

• Ordinarily, the potential can be set to zero 'at' infinity. Is that the case for an infinite line of charge? Commented Sep 30, 2017 at 2:26

## 1 Answer

First, look at your integral for large $z'$. It goes as $1/z'$, which is divergent. So your math is fine. That's not a problem, however.

Remember that potentials are determined up to an additive constant. According to Gauss law, you should get that the field falls off as $1/\sqrt{x^2+y^2} = 1/r$, which means that the potential is indeed a logarithm, like what you have. That infinity is your "free constant" of the potential and is an artefact of the "infinitely long wire" assumption.