I'm having trouble imagining how to set up and solve energy conservation problems when using $U = \frac{-GMm}{r}$ instead of the usual simplification of $U = mgh$.
I know how to solve general energy conservation problems, and I know/understand the explanation of $U = \frac{-GMm}{r}$ and how it's defined with reference to work and being brought from infinity.
But I only really get that explanation in a sort of vacuum. I don't know how to attach it to other equations and make it work.
To better show what I mean, I was playing with a small little problem I made: Planet of mass 100kg and 10m radius, "rocket" of 10kg mass and initial velocity of 20m/s, and a goal of finding r2, the final distance from the center of the planet when all of the kinetic energy is used up.
I made G=1 for the sake of making the numbers "nice". I don't think that messes things up. I set this up as $$KE_i + U_i = U_f$$
$$ \frac{1}{2}mv_i^2 +\frac{-GMm}{r_1} = \frac{-GMm}{r_2} $$
$$ \frac{1}{2}mv_i^2 -\frac{GMm}{r_1} = \frac{-GMm}{r_2} $$
$$ \frac{1}{2}(10)(20)^2 -\frac{(1)(100)(10)}{10} = \frac{-(1)(100)(10)}{r_2} $$
$$ 2000 - 100 = \frac{-1000}{r_2} $$
$$ r_2 = -0.52 ?!?! $$
Not only do I get a number smaller than my original radius, it's also negative. Obviously I'm not quite sure how to correctly fit these ideas together.
How does the procedure for creating conservation of energy equations change to make this work?
Just wanted to make clear, I'm not asking to help me solve some math problem, I'm struggling to see how the concepts of energy conservation formulas and the general gravitational energy formulation fit together and play nicely.