# Electric potential inside non-conducting ball with cavity

After studying electric field variation inside a non-conducting ball with cavity, I wished to calculate the potential of some points to compare. For simplicity, I made this diagram

And want to calculate the potential at point O (centre of ball) and B (centre of cavity)

Now as my teacher told me, I have to subtract the potential of a point in or outside the cavity from potential of point with respect to the ball

Here we will be taking cavity as another ball of same volume charge density

And used these formulæ

The electrostatic potential $$\phi$$ observed at radial distance $$r$$ away from the centre of a non-conducting, uniformly charged ball of radius $$R$$ and volume charge density $$\rho$$ is given by $$\phi(r)= \begin{cases} \frac\rho{\epsilon_0}\left(\frac{R^3}{3r}\right)&,r\geqslant R\\ \frac\rho{\epsilon_0}\left(\frac12R^2-\frac16r^2\right)&,r\leqslant R \end {cases}$$

But on applying on this on B and O, I am getting that the potential at O more than at B, which is contrary to the answer key.

So I want any other method to find potential.

• The picture did not show. And if there is a cavity we need to know some relations there too. May 3, 2023 at 15:40
• Can you please check now. If there further any mistake please correct it by own. I am not much familiar with latex here May 4, 2023 at 2:25
• Contrary to what? @OpenLearner
– nasu
May 4, 2023 at 2:57
• Does the sphere have uniform charge density? May 4, 2023 at 3:10
• Hint: You can consider the cavity as a superposition of a positively charged and negatively charged sphere (so that it is neutral). Then, the potential at the center is due to a uniformly (positively) charged large sphere without cavity and a negatively charged sphere placed in the cavity. May 4, 2023 at 3:13

In my current understanding of your problem, the outer big ball has radius $$R$$ and the cavity has radius $$R/2$$. Let the centre of the cavity be $$A$$, contrary to what you wrote, because in your drawing, $$B$$ is the unique point on the surface of both the ball and the cavity.
The potentials at those points, found by the method you are given, are $$\phi(O)=\frac5{12}\frac\rho{\epsilon_0}R^2\\ \phi(A)=\frac4{12}\frac\rho{\epsilon_0}R^2\\ \phi(B)=\frac3{12}\frac\rho{\epsilon_0}R^2$$ i.e. I think your answer key is wrong. Even in the case of just a complete ball and nothing else, the potential just keeps getting stronger as you move towards the centre of the ball. Is the volume charge density $$\rho < 0 ?$$