Source code:
![]()
G = 6.67428 * 10^(-11);
R = 12745594/2;
M = 5.9742 * 10^(24);
function g = myg (x)
g = G*M/(R+x)^2
endfunction
xdata=linspace(0,2*R,5000);
plot(xdata,myg)
eps = 10^(-1);
d0 = sqrt(G*M/eps) - R