-GM/2R
+GM/R
-GM/R
+GM/3R
Gravitational potential at any inside point is given as V = -GM/2R³(3R² - r²)(i) for r = R/2 V = +GM/8R
Subtracting potential due to cavity of mass Mc = M/8 and Rc = R/2
Gravitational potential at center is obtained by substituting r = 0 in equation (i) = +GM/8R
V = +GM/8R - (-GMc/2Rc) = +GM/8R + 3GM/8(2R/2) => V = -GM/R