Babbage's life was typical of the 19th century gentleman scientist. Like many of his peers, inherited wealth allowed him to explore his interests and contribute to research in mathematics, astronomy, and engineering.
Babbage's largest project, the Difference Engine no. 1, was a machine intended to save the government money by preventing critical errors in tables calculated and copied by hand. But after twenty years of costly work on his design - in which time he suffered through personal disputes with his toolmaker Joseph Clement and lost his father, wife, and all but three of their eight children - the Difference Engine no. 1 remained uncompleted.
Difference Engine no. 1
Tables of data generated from polynomial functions were critical for aiding navigation at sea using the lunar distance method of determining longitude. But because such tables had to be calculated by human 'computers', they suffered from errors in both calculation and in transcription and typesetting for the printing process.
Babbage was something of a connoisseur of tables and fastidiously combed through them for errors. During a meeting with Herschel in 1821 to verify calculations made by human computers he lamented,
"I wish to God these calculations had been executed by steam." Babbage in 1821(1)
Babbage's idea, hatched over the following two years, was for a device that would reduce the calculation of polynomial functions to mechanical addition using the method of finite differences. The engine would be 'programmed' with a function and cranked by hand to deliver the result. It would also be equipped with a press that would allow results to be printed as they were calculated in real time and replicated on the spot without error.
In 1822 he received funding for the device, called the 'Difference Engine', and hired a toolmaker, Joseph Clement, to build it. The Difference Engine called for nearly 25,000 parts in total, one of the most complicated engineering feats attempted in its day.
Although the engine would only be able to calculate polynomial functions, these could approximate logarithms and trigonometric functions, which was of much use to scientists and navigators. Babbage often required support for the device from his friends in high scientific society, and John Herschel used a seafaring comparison to great rhetorical effect:
"An undetected error in a logarithmic table is like a sunken rock at sea yet undiscovered, upon which it is impossible to say what wrecks may have taken place." Sir John Herschel, 1842 (2)
Understandably, the government was more interested in reliable tables than the machine in principle. A demonstration model was constructed in 1832, but despite his best efforts Babbage never saw one of his engines put to work in his lifetime.
Funding was officially cut off in 1842 at which time he had spent over £17,000, ten times as much as originally intended. Somewhat embarrassingly, the British government purchased a difference engine based on Babbage's original design made by Swedes Georg and Edvard Schuetz, which they demonstrated at the World's Fair in 1855. Babbage, however, was already preoccupied with bigger problems.