Mission planners use gravity assists because they allow the objective to be accomplished with much less fuel (and hence with a much smaller, cheaper rocket) than would otherwise be required. Lifting extra fuel into orbit, just so it can be used later, is exponentially expensive. Furthermore, the extra speed gained by gravity assists dramatically reduces the duration of a mission to the outer planets.

Gravity assists seem a bit mysterious, like one is getting something for nothing. This feeling can persist even if you know some physics. Since energy is conserved, you reason, how can a spacecraft obtain a net velocity boost by passing by a planet? Energy conservation suggests the spacecraft should speed up while approaching the planet, but then lose the same speed while departing. Recently I was talking with a colleague, an excellent plasma physicist who knew the phrase "gravity assist" but thought it must be marketing hyperbole because he didn't believe it could actually work. The mystery begs to be explained.

The key to understanding how a gravity assist works is to consider the problem from two different points of view, or reference frames. It's convenient to think about reference frames for both the planet and for the sun (or the solar system). For economy of language I'll call them the "planet frame" and the "sun frame."

In the planet frame, the planet sits still (by definition!). More importantly, since the planet is so much more massive than the spacecraft, the planet sits almost exactly at the center of mass of the two objects and does not react by any measurable amount as a result of the encounter. For example, Jupiter is about 10 to the 24th power times more massive than the Voyager spacecraft, so Jupiter ignores an encounter to an extremely high degree of precision. This means the spacecraft's total energy, made up of kinetic energy (energy of motion) plus potential energy (energy due to proximity to a massive object), is conserved throughout the encounter in this frame.

In the planet frame, then, the spacecraft indeed speeds up on approach and slows down by the same amount while departing, just like my colleague thought. During the approach, as the spacecraft falls into the gravity well of the planet, it gains kinetic energy (i.e. speed) and loses gravitational potential energy, trading one for the other just like a ball rolling downhill. After the encounter it climbs back out of the gravity well and loses whatever kinetic energy it gained during the approach, ending up with the same final speed it started with. The direction of the spacecraft changes during the encounter, however, so typically it leaves the planet heading in a different direction. The amount of deflection can be controlled by adjusting how close the spacecraft comes to the planet. The closer it gets, the greater the deflection. It's possible to have a very small deflection, near zero degrees, by arranging a wide miss. The maximum deflection is 180 degrees, sending the spacecraft back where it came from, obtained by arranging an extremely close approach. Mathematically the spacecraft's path is a hyperbola, so we say the spacecraft follows a hyperbolic trajectory in the planet frame.

Now let's consider what the encounter looks like in the Sun frame, where the Sun is stationary and the planet is moving. The difference between the planet frame and the Sun frame is just the velocity of the planet with respect to the Sun. To convert from the planet frame to the Sun frame, we simply add the velocity of the planet to both the planet and the spacecraft. This velocity is a vector, which means direction is important, and it can be in any arbitrary direction depending on the planet's position in its orbit at the time of the encounter (It also changes with time because the planet is following a curved orbit around the sun, but during the relatively short encounter with the spacecraft it's a reasonable approximation to consider the planet as moving in a straight line). Because the direction of the spacecraft changes when it encounters the planet and because the original direction of the spacecraft is also arbitrary, it's not immediately obvious how the encounter will look in the Sun frame. The arbitrariness of the directions gives rise to a rich set of possible behavior in the Sun frame, all in accordance with Newton's laws of motion, even though in the planet frame the encounters are simple hyperbolic trajectories. Crucially, because the direction changes, the speed of the spacecraft is different before and after the encounter when viewed in the Sun frame. The outgoing speed is not the same as the incoming speed, and the spacecraft can either speed up or slow down. Let's see by example how this works.