I have the following homework problem:
A line of charge $\lambda$ is located on the z-axis. Determine the electric flux for a rectangular surface with corners at coordinates: $(0, R, 0)$, $(w, R, 0)$, $(0,R, L)$, and $(w, R, L)$.
This is what I have come up with so far:
The line of charge, is located on the $z$-axis. We can recall that $\Phi = \int_{S}\vec{E}~\mathrm{d}A$. We initially note that this is parallel to the $xz$-plane, ergo we will integrate in respect to $x$ and $z$. Due to the fact that this is an infinite line of charge, there is no change in the field as we vary the distance along the $z$-axis. Our integral is $$\int_0^L\int_0^w\vec{E}~\mathrm{d}x\mathrm{d}z$$ We can recall that $$E=\frac{\lambda}{2\pi\varepsilon_0r}$$ We can see that $r=\sqrt{x^2+R^2}$ by the Pythagorean Theorem. By substitution we have the following integral: $$\int_0^L\int_0^w\frac{\lambda}{2\pi\varepsilon_0\sqrt{x^2+R^2}}\mathrm{d}x\mathrm{d}z = \frac{\lambda L}{2\pi\varepsilon_0}\int_0^w\frac{1}{\sqrt{x^2+R^2}}\mathrm{d}x$$
When I solve this I get:
$$\Phi=\frac{\lambda L}{2\pi\varepsilon_0}\sinh^{-1}\left(\frac{w}{R}\right)$$
I am not sure where I am going wrong. I may be doing something conceptually incorrect.