On this page
Before calculators, engineers, navigators and bankers looked up numbers in printed tables, and those tables were worked out, copied and typeset by hand. Errors crept in at every step. Charles Babbage set out to build a machine that would remove them. This post covers who Babbage was, how his difference engine calculates using only addition, two worked examples you can do in a notebook, and what a student can learn from why he never finished it.
Who was Charles Babbage?
According to the Computer History Museum, Babbage was born in Walworth, Surrey, on 26 December 1791. He went to Trinity College, Cambridge, in 1810 to study mathematics, was elected a Fellow of the Royal Society in 1816, and held the Lucasian chair of mathematics at Cambridge from 1828 to 1839. He died on 18 October 1871.
He was a polymath. The museum lists, among other things, lighthouse signalling, an ophthalmoscope, an early proposal for "black box" recorders on railways, and an interest in ciphers and lock picking.
Why did Babbage want a calculating machine?
The museum's history of the engines describes an 1821 scene in which Babbage and the astronomer John Herschel were checking hand-calculated tables. Finding error after error, Babbage is said to have exclaimed, "I wish to God these calculations had been executed by steam."
His answer was Difference Engine No. 1, begun in 1821 to calculate and print tables of polynomials automatically. The museum's description of the engines says the design called for some 25,000 parts and would have weighed about four tons. Construction stopped in 1833 after a dispute with his engineer, Joseph Clement, over payment. By then the British Treasury had spent £17,500. All that was completed was a demonstration piece, about one seventh of the calculating section, delivered in 1832.
In 1834 Babbage moved on to a far more ambitious design, the Analytical Engine, a general-purpose programmable machine. Our post on Ada Lovelace and the Analytical Engine picks up that story.
How does the method of differences work?
The museum's page on how the engine works explains the key idea. Calculating a polynomial normally needs multiplication. But if you know the first few values, you can get every later value by addition alone. Adding with gear wheels is much easier than multiplying with them, so the method made the machine possible.
Take the values of a polynomial at equally spaced x. Subtract each value from the next to get first differences. Subtract those to get second differences, and so on. For a polynomial of degree n, the nth differences are constant. Then run the process backwards: add the constant to the last difference, and add that to the last value.
Worked example: a quadratic by addition only
Let F(x) = 2x² + 3x + 1. Work out four starting values by hand:
F(0) = 1, F(1) = 6, F(2) = 15, F(3) = 28.
First differences: 6 − 1 = 5, 15 − 6 = 9, 28 − 15 = 13.
Second differences: 9 − 5 = 4, 13 − 9 = 4. Constant, as expected for degree 2.
Now continue using only addition:
Next first difference: 13 + 4 = 17. So F(4) = 28 + 17 = 45.
Next first difference: 17 + 4 = 21. So F(5) = 45 + 21 = 66.
Check directly: F(4) = 32 + 12 + 1 = 45, and F(5) = 50 + 15 + 1 = 66. Both match.
There is a shortcut for the constant. For a polynomial whose leading term is axⁿ, with steps of 1 in x, the nth difference is a × n!. Here a = 2 and n = 2, so the constant is 2 × 2 = 4. For F(x) = x³ the third difference is 3! = 6. Try it: 1, 8, 27, 64 give first differences 7, 19, 37, second differences 12, 18 and third difference 6. Then 18 + 6 = 24, 37 + 24 = 61, and 64 + 61 = 125 = 5³.
Common mistakes:
Uneven steps. The method needs equally spaced x values. With step h, the nth difference becomes a × n! × hⁿ.
One wrong starting value. A single error in the first values spreads into every later entry, which is why Babbage wanted the machine to print its own results.
Stopping too early. If the differences are not yet constant, you have not gone deep enough for the degree of the polynomial.
Sums and differences of sequences like these are standard JEE material; our guide to sequences and series for JEE has more practice.
Did the difference engine ever work?
Babbage later designed Difference Engine No. 2, between 1847 and 1849. It had registers for seven differences, enough to compute 31-digit values of polynomials up to x⁷. In 1985 the Science Museum in London set out to build it from his drawings, using no more precision than Babbage could have achieved. The museum's account of the modern build says the calculating section was finished in 1991, for the 200th anniversary of his birth, and the printer in 2002. The machine has 8,000 parts, weighs five tons and is 11 feet long. It works as Babbage intended.
The project's conclusion is the interesting part: precision was not what stopped him. His failure "had as much to do with politics, economics, and personalities, as with technology."
What can a student take from Babbage's way of working?
Babbage saw a real, boring problem, errors in tables, and attacked its cause rather than its symptoms. His method also carries a warning. He kept moving to bigger designs before finishing the one in hand, and the engines stayed on paper for over a century.
A routine built on both lessons:
Reduce to simple steps. When a calculation looks heavy, ask whether a table, a pattern or a recurrence can replace it.
Check with an independent method. Like checking F(4) directly, confirm one result by a second route.
Finish one thing. Complete one chapter's problems before starting a more ambitious plan.
When a pattern-based method still feels like a trick, work through it step by step. The Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.
Pick any cubic tonight, build its difference table, and predict the next three values by addition alone.



