I calculated the gravitational potential inside a massive sphere with constant density and got the result:
$$\Phi = -2\pi G\rho R^2 + \frac{2}{3}\pi G\rho R_p^2$$ Where $R$ is the radius of the sphere and $R_p$ the distance of the point where the potential is evaluated from the center. It is fine, because minus the gradient of the potential gives the well known result that the acceleration of gravity increases linearly with the radius.
It is easy to use the result for $\Phi$, and show that the potential of a hollow sphere, with external radius $R_e$ and internal radius $R_i$ is constant. $$\Phi_h = -2\pi G\rho R_e^2 + \frac{2}{3}\pi G\rho R_p^2 - (-2\pi G\rho R_i^2 + \frac{2}{3}\pi G\rho R_p^2) = -2\pi G\rho(R_e^2 - R_i^2)$$
Once again it is fine, because the acceleration is indeed zero inside.
But when I try to calculate directly the potential inside a (infinitelly thin) spherical shell, I got a wrong result, with a non-constant field. The integration is simpler than for a massive sphere, but I can't find the mistake. All the sites of the internet that I saw calculate directly the acceleration inside, not the potential.
Does anyone know where it is calculated? Or present the derivation as an answer?