Juergen Moser, who has died aged 71, was an outstanding mathematician who did creative work in several branches of science. He came of age at a time of great excitement in astronomy, and was party to the development of an influential theory for analysing the orbits of planets, asteroids and other celestial bodies.

Mathematicians who plotted the orbital routes that were to take the Apollo astronauts to the Moon and guide the interplanetary spacecraft across the solar system leaned heavily on that knowledge.

When he was a boy Moser built model gliders. Fifteen years later he was devising powerful mathematical techniques that would be used by aeronautical engineers, marine architects and car designers to study the dynamics of complicated systems. His research included the development of new techniques for solving problems described by non-linear differential equations. These are central to research by physicists, electronic engineers, physiologists studying the behavour of the heart, meteorologists, and financial and economic forecasters.

Moser was born in the east Prussian city of Koenigsberg, into a professional family: his father was a psychiatrist. At the age of 15 his wartime high school class was conscripted into a military auxiliary force trained to man the anti-aircraft guns defending their home towns.

He was too slight to lift the heavy explosives, and was given the job of computing their trajectories. Many of his classmates, and his elder brother, died under the bombardment of the Red army driving into Germany.

Once, after he had strayed into Soviet-held territory, Moser was captured, held in a basement half-filled with water and starved for a week. He snatched a frozen turnip that probably saved his life.

But he later believed his life-line had a lot to do with his habit of seeking refuge in mathematics, which he first developed in the barracks: he banished the mayhem of the outside world by thinking about a mathematical problem which he tried to solve in his head.

He returned to high school after the war in what became East Germany, and moved to the west in 1947 to study at Goettingen. But Germany's post-war academic world was still in tatters: the intellectual heart had been ripped out of the scientific establishment 10 years earlier by the Nazis. Moser followed the only path that seemed available to a new generation of talented young Germans and emigrated to the United States. He won a Fulbright scholarship in 1950 to spend a year in New York, where an influential group of pre-war refugees had settled at the institute established by Richard Courant.

Moser returned briefly to Goettingen to work as Carl Siegel's assistant, writing a book on celestial mechanics with his mentor. After completing his PhD in 1955, he returned to New York and married Gertrude Courant.

Two years later, he accepted a position at the Massachusetts Institute of Technology. He became an American citizen in 1959, and one year later accepted an offer to return to the New York University Courant Institute as a professor, where he spent most of his career.

He is best known in astrophysics circles for his work on celestial mechanics, and the part he played in the development of the Kolmogorov-Arnold-Moser (KAM) theory, published in 1962.

The problem to which the post-war generation of astronomers had returned with a vengeance was one that had tantalised scientists for centuries, the stability of the solar system; would it remain as it was for all eternity, or might the planets eventually collide and crash into the Sun?

From Galileo's time, many of the big advances in mathematics were born from pondering the fate of the universe. Isaac Newton invented calculus while trying to prove that celestial bodies always travelled in elliptical orbit. But Newton's proof applied only to systems that consisted of two bodies, say Earth and the Sun.

The KAM theory looked at another question: what happened to well-behaved elliptical orbits if the effect of small perturbations resulting from the gravitational pull of smaller or more distant planets were taken into account? The Russian mathematician Andrei N Kolmogorov announced in 1954 that he had found the answer, arguing that if the disturbance was sufficiently small, many but not all of the orderly motions would survive, with orderly orbits coexisting alongside chaotic ones.

But Kolmogorov outlined a general theory without supplying complete proof. His student, VI Arnold, proved one case: Moser proved another. He was 27 and unknown academically when he was asked to summarise Kolmogorov's argument for a mathematics journal. He identified a critical gap in the Russian's argument. It took him several years to produce the result that filled that gap, with his publication in a German journal of mathematical research in 1962. The result put the KAM theory, and Moser's reputation, on the map.

After nearly 25 years in the US, Moser returned to Europe in 1980 to rebuild the once famous mathematics research institute at the Federal Institute of Technology, in Zurich. He retired in 1995, the year he received the prestigous Wolf Prize for mathematics. He served as president of the International Mathematical Union from 1983 to 1986.

He is survived by his wife Gertrude, a son and two daughters.