In the figure shown, find the ratio of the linear charge densities (on semi-infinite straight wire) and (on semi-circular part), that is so that the field at O is along y direction.
Electric field due to semi-circular part:
Electric field due to straight part:
For net field to be along y-axis: