Electric field produced by ring of charge (opposite charge on each semi circle) The suggested solution in the following problem was written by the instructor at my University. I think there is an error and solved the problem my own way, but we can't seem to agree on the correct solution.



With λ being the charge density on the ring, which is Q/2piR or -Q/2piR depending on the semi circle. 
What do you think?
 A: Let P be at the origin and the ring be in a plane perpendicular to the z axis, with its centre at (0, 0, a). Let the positive semicircle run from (R, 0, a) via (0, R a) to (–R, 0, a). Let angle $\phi$ be the angle between the radius running to a variable point on the ring, and the radius parallel to the x-axis. Then the displacement vector from the point to P is$$\vec{r}=-(a \vec{k}+R \cos \phi\ \vec{i} + R \sin \phi\ \vec{j})$$But the electric field at P due to the element of ring at angle $\phi$ is$$d\vec{E}=k_{E}\ \frac{Q\ d\phi}{2 \pi}\ \frac{\vec r}{r^3}\ \ \ \text{in which}\ \ \ r=(a^2+R^2)^{\frac{1}{2}}$$
The field components at P in the z direction will cancel for the two halves of the ring. Neither half will have a resultant field component in the x direction (by symmetry), so we need only add the field components, $d\vec{E}.\vec{j}$, in the y direction. For the ring element at $\phi$, the contribution is$$dE_y=k_{E} \frac{Q}{2\pi r^3}d \phi\ \vec{r}.\vec{j}\ \ =\ -k_{E} \frac{Q}{2\pi r^3}d \phi\ R\sin \phi$$
So for the whole positive semicircle
$$E_y=-k_{E} \frac{QR}{2\pi r^3} \int_0 ^\pi \sin \phi\ d \phi\ \ =-\ \ k_{E} \frac{QR}{\pi r^3}.$$
For the negative semicircle$$E_y=-k_{E} \frac{-QR}{2\pi r^3} \int_\pi ^{2\pi} \sin \phi\ d \phi\ \ =-\ \ k_{E} \frac{QR}{\pi r^3}.$$
For both semicircles together, one half pulls in the –y direction and the other half pushes in that direction, so the total field strength will be twice as much.
I think that this answer is the same as yours, once you've re-expressed that pesky $\lambda$ !   
