# What vertical velocity must a projectile launch with to reach a certain height, given a variable gravity?

Let's say we're launching a projectile and we want it to max out at a height of .5g, which, if given Earth, comes to about 9,000 km. (In this, I'm using g as the gravity at the surface, not as the gravity experienced by the object.) Now, I fully understand how to launch a projectile to 9000 km given a constant gravity. In this, $$h = v^2/2g$$, and assuming that h = 9,000 km and that g = 9.8 m/s, we get 13,300 m/s.

However, especially as the projectile approaches this height, the force of gravity experienced by this object is not constant. Because of this, 13,300 m/s is greater than escape velocity, so it would have no max height. I'm at a loss on how to find the velocity of the projectile. Critically, the height depends on the velocity and the time. The velocity depends on the gravity and the time. The gravity depends on the height. As such, there's a circle of sorts, where I can't seem to figure out one without knowing the others, and since I don't know the others, I can't make any headway.

I figured one could use recursion to solve this - setting up timepoints, using the height from the previous timepoint, calculating the gravity, then using this gravity to figure out how much velocity will decrease by the next timepoint, and using all of this to figure out the next height - but this "solution" only offers an approximation, is inaccurate, and computationally intensive. A program would be required, and I was hoping that the results could be gleaned with a calculator rather than a computer program.

Feel free to ignore air resistance and assume starting height is 0. If required for the solution or an example, feel free to assume we're talking about Earth.

Given these parameters, what would be the formula for the initial vertical velocity required to reach a certain height, given that such a height is high enough that the force of gravity changes?

As you said to ignore air resistance,etc, the easiest way to find it is by conserving energy, as gravitational force is conservative.

Let's say you shoot a projectile with velocity v from the surface "perpendicularly" , R being the radius of the Earth and it reaches a height h from the centre.

Taking potential energy to be 0 at infinity,

Initial mechanical energy=Final mechanical energy

So $$\frac{mv^2}2 - \frac {GM_{earth}m}{R} =-\frac {GM_{earth}m}{h}$$

This is because the final velocity is 0 assuming it just reaches that height and falls back.

You can find v from this.

I think you meant launching the rocket perpendicularly? If you launched at an angle then it would require some slight changes along with angular momentum conservations.