# Calculate electric potential and electric field of uniformly charged wire

Say you have a uniformly charged straight wire of length $2L$ going from $-L$ to $+L$ along the $z$ axis with its midpoint located at $z=0$. What is the electrostatic potential, in cylindrical coordinates, for points in the midplane of the wire ($x,y$ plane)? From this electric potential, calculate the electric field in the $x,y$ plane.

My intuition is telling me that, because of the symmetry, the only direction the electric can be directed is in the xy-plane. So we have $$dq=\lambda dz$$ Thus, since $$dV=\frac{kdq}{r}$$ We have $$V=2\int_0^L \frac{kdq}{r}$$ Also $$r=\sqrt{x^2+y^2+z^2}$$ The integral is then $$2k\int_0^L \frac{\lambda dz}{\sqrt{x^2+y^2+z^2}}$$ Evaluating this I get $$V = 2 k \lambda \ln ( \sqrt{(x^2 + y^2 + z^2)} + z)$$ I know it's not in spherical coordinates, but can someone tell me if this is right so far? If so, the electric field is then given by the negative gradient, correct?

• One way to do a quick sanity check on this: very far ($r>>L$) from the source, one should expect the potential and field to behave in a particular way; make sure your final answer does! – BMS Sep 20 '13 at 15:00
• You might also want to rewrite the logarithm with the other boundary term from the integral to get something like $\ln(a)-\ln(b)=\ln(\frac{a}{b})$. This way, the argument of the log is dimensionless. It's bad practice to have functions of dimensional quantities, something chemists refuse to understand. – Jonas Greitemann Sep 21 '13 at 13:36