This second edition of the popular text by John Betts incorporates lots of new material while maintaining the concise and focused presentation of the original edition. The book describes how sparse optimization methods can be combined with discretization techniques for differential-algebraic equations and used to solve optimal control and estimation problems. The interaction between optimization and integration is emphasized throughout the book. The relevant background in nonlinear programming methods that exploit sparse matrix technology is presented, along with description of discretization techniques for solving differential-algebraic equations. It will appeal to users of optimal control working in fields such as the aerospace industry, chemical process control, mathematical biology, robotics and multibody simulation, and engineering. It is also suitable for graduate courses on optimal control methods. The SOCS software referenced within the book can be licensed from Boeing by readers interested in receiving the code and training materials for further investigation.