- 15,866
- 9,001
Here is another approach. Take your pick. You know (or you can derive) from Gauss's law that the electric field due to an infinite line of charge is $$\mathbf{ E}= \frac{\lambda}{2\pi\epsilon_0 r}\mathbf{\hat r}$$ where ##r## is the radial distance from the wire to the point of interest P.physics1000 said:Exactly, that is how you should graph it, was not given like that, but that is the point.
Can you translate that into Cartesian coordinates and write vector ##\mathbf E(x,y,z)## relative to an origin as shown in the figure in post #24? Note that you will have to be a bit careful with expressing the unit vector ##~\mathbf{\hat r}##. If so, then choose a suitable path from the reference point O (the origin) to point P and do the line integral $$\Phi(x,y,z)=-\int_0^P \mathbf E(x,y,z)\cdot d\mathbf l.$$Note that the field lines are concentric circles perpendicular to the ##z##-axis, therefore there is no ##z##-dependence worry about.