Question
Question: Consider two elongated uniform charge carriers of infinite extent having identical magnitude line ch...
Consider two elongated uniform charge carriers of infinite extent having identical magnitude line charge distributions but with opposing polarity orientations as shown. The electric field at any coordinate position along the horizontal reference axis (x-axis) for positive values of x-coordinate follows the directional unit vector

cos\theta \hat{i} + sin\theta \hat{j}
\hat{i}
\hat{j}
-sin\theta \hat{i} + sin\theta \hat{j}
\hat{j}
Solution
The electric field at a point on the x-axis (x>0) due to the positive line charge is directed perpendicular to the line, away from it. The distance from (x,0) to this line is r=xsinθ. The magnitude of the field is E1=2πϵ0rλ=2πϵ0xsinθλ. The direction of this field vector makes an angle of 90∘+θ with the positive x-axis. Thus, E1=E1(cos(90∘+θ)i^+sin(90∘+θ)j^)=E1(−sinθi^+cosθj^).
The electric field at the same point (x,0) due to the negative line charge is directed perpendicular to the line, towards it. The distance to this line is also r=xsinθ. The magnitude of the field is E2=2πϵ0rλ=2πϵ0xsinθλ. The line y=−(tanθ)x makes an angle of −θ with the x-axis. The field points towards this line. The total electric field is E=E1+E2. E=2πϵ0xsinθλ(−sinθi^+cosθj^)+2πϵ0xsinθλ(sinθi^+cosθj^) E=2πϵ0xsinθλ(−sinθ+sinθ)i^+2πϵ0xsinθλ(cosθ+cosθ)j^ E=2πϵ0xsinθλ(2cosθj^)=πϵ0xλcotθj^ The electric field is in the +j^ direction. The question asks for the directional unit vector.