This is a problem in electromagnetics applying coulomb's law, in brief, we have a disc(wire) with charges on it. We want to calculate the electric field at a point $\displaystyle h$ on the axis of the disc. The book had a rather annoying way of solving the problem, so I wanted to go with something simpler and went with the following:

$\displaystyle (1) \, d\vec{E} = \int \frac{1}{4\pi \epsilon R^2} \vec{R} dq$. R is a unit vector

$\displaystyle (2) \, \vec{R} = \frac{1}{\sqrt{r^2 + h^2}} (-r\cos \theta \vec{i} - r\sin \theta \vec{j} + h\vec{k})$.

$\displaystyle (3) \, dq = \rho_s dA = \rho_s rdrd\theta $.

when we put all of that together, we get:

$\displaystyle \vec{E} = \int\int _s \frac{\rho_s}{4\pi \epsilon (r^2 + h^2)^{3/2} } (-r\cos \theta \vec{i} - r\sin \theta \vec{j} + h\vec{k}) rdrd\theta $.

But unless we take away the 2 $\displaystyle r$s from the vector $\displaystyle (-r\cos \theta \vec{i} - r\sin \theta \vec{j} + h\vec{k})$ we won't get to the right answer which is $\displaystyle \frac{\rho_s}{2\epsilon}( \, \frac{h}{\sqrt{a^2 + h^2}} - 1 \,) \, \vec{k}$.

Note: integral limits $\displaystyle 0 < r < a$ and $\displaystyle 0 < \theta < 2\pi$.

What did I do wrong?