# Electric field at the centre of a ball

Question : Find the electric field at the centre of a ball of radius R with volume charge density rho = a.r, where a is a constant vector and r is a radius vector drawn from ball's centre.

Relevant Equations and attempt at solution : I used the basic formula for electric field due to continuous volume charge density and arrived at an equation which I tried to solve two different ways as shown in image. I am getting different solutions by trying different methods which is not possible.
I have tried to think of a reason for this and my reasoning for this anomaly has been shown in the image.

#### Attachments

• IMG_20160628_234944_1467138002625.jpg
37.1 KB · Views: 484

haruspex
Homework Helper
Gold Member
When theta varies, ##\hat r## varies, no?

Nitin Gupta
When theta varies, ##\hat r## varies, no?

Oho.. And since r hat is varying I can't take it as a constant under integration.. That's why we convert the spherical system to cartesian one.. Where the unit vectors are independent of the angles.. And that was the point of this exercise.. To teach us to consider the constancy of unit vectors when doing problems...

Is there any other way this could be done without resorting to cartesian coordinate system (or, for that matter, any system where the unit vectors are independent of angles)..such that I integrate using r hat itself..??

did you try the Maxwell equation in differential form?
div E=rho/e
you used intergral form.
Or use Laplace equation to find voltage then use E=-gradV

Last edited:
Nitin Gupta
did you try the Maxwell equation in differential form?
div E=rho/e
you used intergral form.
Or use Laplace equation to find voltage then use E=-gradV
Yeah... Actually I wanted to figure it out this way