
The easiest way to solve this problem is to choose a coordinate system where the x-axis is oriented in the direction of the vector




Now any point on the surface of the sphere can be represented by two angles, namely the azimuthal angle



Now consider an infinitesimally small rectangular section on the sphere that subtends azimuthal and inclination angles of





The charge contained in this infinitesimally small section of the sphere surface is given by,


The electric field due to this infinitesimally small section at the center is given by,

Now recall that we had chosen a coordinate system where the x-axis was oriented along the vector


