# Electric Field of a Long, Uniformly Charged Wire

In chapter 1 of Alonso & Finn's Fields and Waves, the electric field and electric potential of a long, uniformly charged wire are calculated. As you can see, $s/r=\sin\alpha$, $R/r=\cos\alpha$ and $s/R=\tan\alpha$. The electric field due to the infinitesimal bit of wire $\text{d}s$ is $\text{d}E=\frac{\lambda\text{ d}s}{4\pi\varepsilon_0r^2}$, and since the vertical components of elements $\text{d}s$ at opposite sides of $O$ will cancel out, what remains is $\text{d}E\cos\alpha$.

The authors argument that integrating from $0$ to $\pi/2$ and multiplying by $2$ will give a fair approximation of the field in the case of a long wire, or perhaps a short distance $R$ from the wire.

We get that $$E=2\int_0^{\pi/2}\text{d}E\cos\alpha=2\int_0^{\pi/2}\frac{\lambda\cos\alpha\text{ d}s}{4\pi\varepsilon_0r^2}.$$

Now, things get a little disturbing for me. The authors substitute $\text{d}s=R\cos^{-2}\alpha\text{ d}\alpha$ and $r^2=R^2/\cos^2\alpha$ to reduce the integral to $$E=\frac{\lambda}{2\pi\varepsilon_0R}\int_0^{\pi/2}\cos\alpha\text{ d}\alpha=\frac{\lambda}{2\pi\varepsilon_0R}.$$

I'm okay with that (more importantly, the result agrees with a similar calculation using Gauss's law), but what if we chose $\text{d}s=r\cos\alpha\text{ d}\alpha$? We get $$E=2\int_0^{\pi/2}\frac{\lambda\cos\alpha\text{ d}s}{4\pi\varepsilon_0r^2}=2\int_0^{\pi/2}\frac{\lambda\cos\alpha r\cos\alpha\text{ d}\alpha}{4\pi\varepsilon_0r^2}=2\int_0^{\pi/2}\frac{\lambda\cos^2\alpha \text{ d}\alpha}{4\pi\varepsilon_0r},$$ which, when substituting $r=R/\cos\alpha$, gives $$E=\frac{\lambda}{2\pi\varepsilon_0R}\int_0^{\pi/2}\cos^3\alpha \text{ d}\alpha=\frac{\lambda}{3\pi\varepsilon_0R}.$$ Did I work this out wrongly, or is there an inconsistency in the authors' arguments here?

(Shit - missed out on something important! Small $r$ is a function of $\alpha$, so my expression for $\text{d}s$ is wrong. :( )

It is correct that $s = r \sin \alpha$, but since $r$ depends on $\alpha$ it does not follow that $ds = r \cos \alpha$. Instead , you have $ds = \left ( r \cos \alpha + dr/d\alpha \sin \alpha \right) d\alpha$. If you work that out you will recover the textbook substitution.