Electric flux for a rectangular surface? 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. 
 A: Here is the solution in my opinion:
One thing you forgot is that flux involves the force perpendicular to the area. F.dA remember? So the solution integral would be $\frac{\lambda}{L2\pi\epsilon_0} \int\frac{1}{\sqrt{x^2 + R^2}}\sin\theta\ \mathrm{d}x\mathrm{d}z$. If you look at the figure attached

$$\begin{align}F &=
\int_0^L \int_0^w \frac{\lambda}{2\pi\epsilon_0}\frac{1}{\sqrt{x^2 + R^2}}\sin\theta\ \mathrm{d}x\mathrm{d}z \\
&= \int_0^L \int_0^w \frac{\lambda}{2\pi\epsilon_0}\frac{R}{(\sqrt{x^2 + R^2})^2}\sin\theta\ \mathrm{d}x\mathrm{d}z\qquad\biggl(\sin\theta = \frac{R}{\sqrt{x^2 + R^2}}\biggr) \\
&= \frac{\lambda R}{2\pi\epsilon_0}\int_0^L \int_0^w \frac{1}{(x^2 + R^2)}\sin\theta\ \mathrm{d}x\mathrm{d}z \\
&= \frac{\lambda L}{2\pi\epsilon_0 R} \int_0^w \frac{1}{1 + (x/R)^2}\ \mathrm{d}x \\
&= \frac{\lambda L}{2\pi\epsilon_0}\biggl[\tan^{-1}\biggl(\frac{x}{R}\biggr)\biggr]_0^w \\
&= \frac{\lambda L}{2\pi\epsilon_0}\tan^{-1}\biggl(\frac{w}{R}\biggr)
\end{align}$$
A: flux is not a vector. hence you have to calculate E.dA . write the electric field with direction and then take its dot product with area vector and then do the double integral.
A: I think the integral would simply be $Φ=(λ/L2πε0)\sin^{−1}(w/R)$ and not $\sinh^{-1}$.
