# 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

No it is not correct. Integral of reciprocal of a square root is not a logarithm (you say so in the last line).

• I deleted an inappropriate comment and some obsolete/chatty ones. – David Z Sep 22 '13 at 16:05

Assuming the integration is correct (if you didn't forget to multiply the result by 2 for 2L), the solution is correct. And yes the electric field is the negative gradient of the potential

• Actually I forgot to evaluate the integral at z=0, so it's missing a term. Besides that, it's good. – Lefty Sep 20 '13 at 14:38