Lebesgue's Integral and the Limits of Riemann
How Dirichlet's impossible function exposed the limits of Riemann's integral—and forced a 26-year-old to rebuild calculus from scratch in 1902.
Written by AI. Harold "Harry" Goodman

Photo: AI. Kasper Winter
There is a particular kind of story that mathematics tells badly and that video can, occasionally, tell well. It is the story of a definition breaking — not a calculation going wrong, not a proof containing an error, but the very framework for asking a question turning out to be insufficient. STEM in Motion by Gaurav's recent seventeen-minute piece, The Integral That Changed Mathematics Forever, takes on one of the cleaner versions of this story: the Dirichlet function, the Riemann integral's failure to process it, and Henri Lebesgue's 1902 reconstruction of what an integral actually is.
What interests me about the video — and about the history it narrates — is less the mathematics itself than the communication problem threaded through it. At every stage, someone had to find a way to make a fundamentally new idea legible to people whose intuitions had been built on the old one. That is a craft problem. It is the same problem Gaurav is solving in real time across seventeen minutes of animation.
A Function That Refused to Behave
The Dirichlet function is almost insultingly simple to state. Assign the value 1 to every rational number and 0 to every irrational number. That is the entire definition. What makes it lethal to Riemann's integral is the way rational and irrational numbers cohabit the number line — not in separate neighborhoods but in absolute, irreducible interlock. Between any two rationals there is always an irrational; between any two irrationals there is always a rational. The two sets are dense in each other in a way that no physical slicing can separate.
Riemann's method — and the video explains this with commendable precision — works by bounding area from above and below. You take your function, cut the x-axis into subintervals, build rectangles at the highest and lowest values in each slice, and check whether those upper and lower sums converge as the slices get thinner. For the Dirichlet function, they never do. Every subinterval, no matter how fine, contains both rationals and irrationals, so the upper sum is always 1 and the lower sum is always 0. The gap does not narrow. It stays fixed at 1 regardless of how many slices you make.
The video notes, correctly, that Dirichlet constructed this function in 1829 — twenty-five years before Riemann wrote his integrability criterion. Dirichlet was working on Fourier series and needed an example that would test where integration methods of his era failed. He found one. What he could not have anticipated was that it would take four more decades before mathematics even had the vocabulary to explain why it failed, let alone how to fix it.
Forty Years With the Wrong Tool
Here is where I find myself pausing over the history in a way that the video moves past somewhat quickly.
Between Dirichlet in 1829 and Lebesgue in 1902, two serious mathematicians took partial runs at the problem. In 1892, Camille Jordan extended Riemann's squeeze idea from rectangles to more general shapes, trying to measure complex regions by bounding them from inside and outside. It did not work for the Dirichlet function because Jordan was still cutting the x-axis into intervals — and as long as you cut the x-axis into intervals, you get the same inextricable mixing of rationals and irrationals. Then Émile Borel built something different: not a way to measure shapes, but a framework for measuring arbitrary sets of points. He could calculate the size of complicated collections of numbers. He built, as the video puts it, the ruler. And then he set it down.
That gap between Borel building the instrument and Lebesgue picking it up and asking what you could build with it — that is the detail I keep returning to. It is a familiar gap in the history of any craft: the tool exists, the need exists, and still the connection is not made. Borel had a way to measure sets; what he did not have, apparently, was the question "what if integration meant measuring sets?" That question sounds obvious in retrospect. It was not obvious in prospect. Anyone who has ever worked in a form long enough to see a technique that everybody uses but nobody has named knows the feeling of that gap — the strange retroactive clarity of seeing what was sitting right there.
Lebesgue closed it at twenty-six, in his doctoral thesis at the University of Paris in 1902. He turned the problem sideways. Instead of asking, for each interval on the x-axis, how high the function goes, he asked: for each height the function reaches, how much of the x-axis produces that height? It is a rotation of the question rather than an improvement of the machinery.
How Lebesgue Explained Himself
What Gaurav's video handles well — and what I think is the most interesting moment in the entire history — is the analogy Lebesgue used to explain his own method. In a letter describing what he had done, Lebesgue wrote:
"I have to pay a certain sum, which I have collected in my pocket. I take the bills and coins out of my pocket and give them to the creditor in the order I find them until I have reached the total sum. That is the Riemann integral. But I can proceed differently. After I have taken all the money out of my pocket, I order the bills and coins according to identical values, and then I pay the several heaps one after the other to the creditor. That is my integral."
I want to stay with this for a moment, because it is doing something that mathematical writing rarely does. Lebesgue had just rebuilt the conceptual foundations of integration. He had introduced measure theory, generalized the definition of length to apply to arbitrary sets of points, and resolved a problem that had been open for most of his lifetime. And when he sat down to explain what he had done — not to a student, but to a fellow mathematician — he did not reach for abstraction. He told a story about paying a bill.
That is a specific choice, and it is not an obvious one. He could have described the measure-theoretic construction directly. He could have led with the formal definition. Instead he reached for a scene: money, a creditor, a pocket, an ordering. He made his idea narratable before he made it rigorous, because he understood, at some level, that the idea would travel farther as a story than as a definition. The bill analogy does not prove anything. It does not make the mathematics easier to check. What it does is give a listener a frame — a sequence of physical actions — inside which the abstract machinery becomes imaginable.
That is not decoration. That is how conceptual shifts actually propagate between minds. The calculus hidden in geometry has the same quality — once you have the right frame, the machinery reveals itself. Lebesgue had to transmit not just a result but a reorientation, and he knew a story would carry it when a definition would merely state it.
The Measure of Nothing
Before Lebesgue's integral could handle Dirichlet's function, it needed to answer a foundational question: how much of the number line do the rational numbers actually occupy?
The answer is zero, and the proof is elegant enough to be worth following. Rational numbers are countably infinite — you can list them, one by one, assigning each a position in an ordered sequence. Call them Q1, Q2, Q3, and so on. Now pick any positive number epsilon — say, 0.001. Cover Q1 with an interval of length epsilon/2. Cover Q2 with an interval of length epsilon/4. Cover Q3 with an interval of length epsilon/8. In general, cover the nth rational with an interval of length epsilon divided by 2 to the power of n. The total length of all these intervals sums to a geometric series that equals epsilon. Since epsilon can be chosen as small as you like, the total measure of the rational numbers must be smaller than any positive number. The only non-negative number with that property is zero.
So the rationals — infinitely numerous, present everywhere along the line, falling between every pair of irrationals — occupy no space at all. On any bounded interval, such as from zero to one, the irrationals claim all the measure, because the rationals contribute nothing to the total length.
This is what makes Lebesgue's calculation of the Dirichlet function almost terse in its simplicity. The function produces two outputs: 1 on the rationals and 0 on the irrationals. Lebesgue's integral multiplies each output by the measure of the set where it occurs. Height 1, times measure zero. Plus height 0, times measure 1. The integral is zero. A function that Riemann's method could not touch resolves in a single line.
What Gaurav Actually Does With the Story
Gaurav's sequencing deserves some attention here, because the choices are not inevitable. He opens with the punchline — a function that breaks the standard integral — then reverses and explains Riemann's construction before returning to show the failure in full. That is a deliberate narrative gambit. You know something is going to go wrong before you are given the tools to see why, which means the construction of Riemann's integral carries a kind of dramatic irony that a more linear account would not have. You watch a perfectly reasonable edifice being built with the knowledge that it has a specific crack in it.
He then gives Jordan and Borel their due — two paragraphs that a tighter video might have cut — before arriving at Lebesgue. That patience matters. The forty-year gap between Dirichlet's function and its resolution is not incidental. It is the point. Showing mathematicians taking partial runs at the problem, getting partway there, and still not cracking it makes the eventual rotation of the question feel earned rather than miraculous. Lebesgue did not simply have a better idea. He asked a question that the previous forty years had not known to ask.
The video lands, ultimately, on the downstream consequences: Riesz and Fischer's 1907 proof that L2 — the space of square-integrable functions under Lebesgue's definition — is mathematically complete, and John von Neumann's 1932 use of that completeness as the rigorous foundation for quantum mechanics. The Born rule, used to calculate the probability of finding a particle at a given location, is computed as a Lebesgue integral. Dirichlet wrote his function as a pure counterexample in Fourier analysis and had no mechanism for anticipating any of this.
That is not a lesson about the utility of pure mathematics, though people will read it that way. It is something more specific: a story about what happens when a question gets asked in a slightly wrong form for seventy years, and then someone — twenty-six, Paris, 1902 — asks it in the right one.
Harold "Harry" Goodman is Buzzrag's spoken word and audio storytelling correspondent.
We Watch Tech YouTube So You Don't Have To
Get the week's best tech insights, summarized and delivered to your inbox. No fluff, no spam.
More Like This
Roman Empire History With Anthony Kaldellis
Anthony Kaldellis joins Lex Fridman to argue the Byzantine Empire never existed—it was Rome all along. A historian makes the case across 2,200 years.
Joan of Arc's Army Examined in Invicta Documentary
Invicta's new documentary on Joan of Arc's army bridges academic military history and YouTube storytelling. Harry Goodman examines what that translation costs and earns.
How the Square Root of 2 Shook Ancient Greek Mathematics
The Pythagoreans believed whole numbers governed all of reality. One diagonal line—and one brave mathematician—proved them catastrophically wrong.
Common History Myths That Schools Still Teach
From Napoleon's height to Viking helmets, a new video maps the historical myths that textbooks kept alive—and asks why bad history is so hard to dislodge.
How a Programmer Tried to Crack the Rubik's Cube
Sebastian Lague's coding adventure to solve the Rubik's Cube reveals why 43 quintillion permutations humbles even clever algorithms. A craft-focused breakdown.
Martin Road Series Retro D12E: A Modern Acoustic Classic
Explore why the Martin Road Series Retro D12E is a hit with musicians, blending vintage aesthetics with modern features.
RAG·vector embedding
2026-08-10This article is indexed as a 1536-dimensional vector for semantic retrieval. Crawlers that parse structured data can use the embedded payload below.