This Demonstration simulates the descent of a spaceship on the Moon for different values of the initial parameters. Minimizing the fuel consumed leads to an optimal control problem solved by applying Lagrange's principle and Pontryagin's maximum principle. is the total time of descent, is the time before starting the engine, and is the time the engine is on.