For several decades in the 19th century, top astronomers searched for the “missing” planet Vulcan.

The scientific community was convinced that some variations in Mercury’s orbit could be explained only by the gravitational effects of another planet orbiting closer to the sun.

Vulcan, in fact, did not exist. But it literally took an Einstein to prove it.

Thomas Levenson, head of the science writing program at MIT, tells what happened in a small, engaging book, “The Hunt for Vulcan . . . And How Albert Einstein Destroyed a Planet, Discovered Relativity, and Deciphered the Universe.” The story begins in the 17th century, when Isaac Newton developed theories to explain motion throughout the universe.

Based on those theories and on observation of Uranus — then the farthest known planet in our solar system — a mathematician named Urbain-Jean-Joseph Le Verrier predicted in 1846 that there was another planet, even farther out.

Neptune was soon discovered, almost exactly where Le Verrier said it would be, and he became famous. So when, in 1860, he predicted with equal certainty that Vulcan existed, the world believed him and went looking for it. Not until 1915, when Albert Einstein challenged Newton’s theories and re-explained Mercury’s motion, was Le Verrier’s prediction finally debunked.

At heart, this is a story about how science advances, one insight at a time. But the immediacy, almost romance, of Levenson’s writing makes it almost novelistic. This is how he begins the chapter about the discovery of Neptune: “The night is quiet, very dark. Gaslights had come to Prussia’s capital back in 1825, but there still weren’t that many of them, and most were doused by midnight. After that Berlin belonged to those who cherished the night sky — among them, the watchers at the Royal Observatory . . . .”

And when Einstein recalculates Mercury’s orbit using his own theory, and it works, Levenson writes, “Einstein felt all the pure wonder of that perfect match between theory and reality . . . his heart actually shuddered in his chest.”