Well I am using Ve = SQRT(2GM/r) which is the calculation for escape velocity.

That equation is giving you an answer that doesn't make any sense. Thus, one must conclude that it is not valid for subsurface acceleration due to gravity.

If A(x) is the acceleration due to gravity at distance (x) from the center of the planet, then the escape velocity would be:

v = [tex]\int_d^\infty A(x) dx[/tex] for d is distance from the center of Earth.

Above the surface, A(x) = GM/r

^{2}Substituting it into the integral above, one gets:

v = [tex]\int_d^\infty \frac{GM}{x^2} dx[/tex] = [tex]\frac{-GM}{x} |_d^\infty[/tex] = 0 - [tex]\frac{-GM}{d}[/tex] = [tex]\frac{GM}{d} [/tex]

Oops, it looks like velocity is in time, and I calculated it with respect to distance... See the

derivation in Wikipedia here.So it should be: (1/2)v

^{2} = [tex]\frac{GM}{d} [/tex], and v = [tex]\sqrt{\frac{2GM}{d}}[/tex]

Now, we know that the acceleration due to gravity function below the surface of earth is

**NOT** A(x) = GM/r

^{2}, so we should expect the escape velocity function to fail.

We can break the function down into two parts.

A

_{b}(x) = Acceleration due to gravity below the surface of Earth.

A

_{s}(x) = Acceleration due to gravity in space (above the surface of Earth)

Set the radius of Earth = 6,371 km.

And one gets the equation:

(1/2) v

^{2} = [tex]\int_d^{6,371 km} A_b(x) dx[/tex] + [tex]\int_{6,371 km}^\infty A_s(x) dx[/tex]

We've already solved the second half of the equation above, but you need a good approximation for A

_{b}(x) for the acceleration due to gravity below the surface.

Consider:

A

_{b}(x) = 9.8*x/(6,371 km)

That would give you the case for the constant density of Earth (straight line on the Wikipedia graph above).

Simply integrate it, and one gets:

(1/2) v

^{2} **=** [tex]\int_d^{6,371 km} \frac{9.8*x dx}{6,371 km}[/tex] + [tex]\int_{6,371 km}^\infty \frac{GM}{x^2} dx[/tex]

**=** [tex](\frac{9.8\frac{m}{s^2}}{6,371 km})\frac{1}{2}x^2 |_d^{6,371 km} + \frac{GM}{6,371 km}[/tex]

**=** [tex](\frac{9.8\frac{m}{s^2}}{6,371 km})(\frac{1}{2})({(6,371 km)}^2 - d^2) + \frac{GM}{6,371 km}[/tex]

So, your escape velocity (subsurface) is

v

_{e} = [tex]\sqrt{2(\frac{9.8\frac{m}{s^2}}{6,371 km})(\frac{1}{2})({(6,371 km)}^2 - d^2) + \frac{2GM}{6,371 km}}[/tex]

Ok, so I graphed the above equation, giving a nice curve, of the general shape of what I had scribbled by hand above.

[attachment=18569]

Note, this uses the constant density of Earth. You'll probably want to substitute in your preferred subsurface density/gravitational acceleration function.