hey for those interested I actually sorted myself out on this one, the final equation i used was the integral of rho(r^2 -a^2)*dr / 2 *r* e0 [a,R]. Where rho is the charge density, a is the interior radius, r is a variable, dr is the differential radius element, and e0 is epsilon naught, 8.854e-12.