

In that case,

As seen from the figure, in the spherical coordinate system,

Consider an infinitesimally small section of the sphere (the cuboid shown in the picture) located at a distance r from the center, at an polar angle





The total charge contained in this infinitesimally small section is then given by,

The electric field due to this infinitesimally small section of the sphere at the center of the sphere will be given by,

But at the beginning of the problem to solve the problem we assumed a coordinate system whose x-axis was aligned in the direction of the vector

