Gravitationnal potential of a sphere

What would be the tactic to find the gravitationnal potential function of a sphere of uniform density with radius a and mass M ? I know the expression of the potential for a shell of radius R. I thought I could integrate from 0 to a and it would give the potential of the sphere, but apparently not.

It appears that you somehow have never used Gauss's Law, or are aware of the integral form of Gauss's Law. Furthermore, why are you even using cartesian coordinates (which would make this problem WAY more complicated) and not spherical coordinates?

Staff: Mentor

This all sounds overly complicated for such a simple problem. Why not use Gauss's law in its integral form: The gravitational flux through any closed surface, [itex]\Phi = -4 \pi G M[/itex] (where M is the mass enclosed by the surface and G is the gravitational constant).

Edit: Zapper beat me to it! And I will move this to the appropriate forum.