At the end of the eighteenth century, calculus worked very well and nobody could properly explain why. Leibniz’s $dx$ were “infinitely small” quantities: sometimes they were treated as if they were different from zero, so that one could divide by them, and right afterwards as if they were zero, so that one could discard them. Bishop Berkeley had mocked this in 1734, calling them “ghosts of departed quantities”.

Lagrange was bothered by it. In 1797 he published a book whose subtitle is a whole programme:

Containing the principles of the differential calculus, freed from all consideration of the infinitely small, of vanishing quantities, of limits and of fluxions, and reduced to the algebraic analysis of finite quantities.

— Joseph-Louis Lagrange, Theory of Analytic Functions (1797)

The derived function

Lagrange’s idea was that every reasonable function can be expanded in a power series. If you give the variable $x$ an increment $i$, then

$$f(x+i)=f(x)+p\,i+q\,i^2+r\,i^3+\cdots,$$

where $p, q, r, \ldots$ are new functions of $x$. Lagrange defined the first of them, the coefficient of $i$, as the derived function of $f$, and wrote it with a prime: $f'(x)$. The derivative of $f'$ is $f''$, and so on.

See how this works for $f(x)=x^3$. Expanding the cube,

$$(x+i)^3=x^3+3x^2\,i+3x\,i^2+i^3.$$

The coefficient of $i$ is $3x^2$, so $f'(x)=3x^2$. There was no need to divide by something that later vanishes, nor to discard anything: it was enough to read off a coefficient. That was what Lagrange wanted.

Where the plan failed

The plan had a flaw, which Cauchy pointed out in 1823: not every function equals its power series. The function

$$f(x)=e^{-1/x^2}\ \ (x\neq0),\qquad f(0)=0,$$

is so flat near zero that all its derivatives are zero there. Its power series about zero is $0+0\,i+0\,i^2+\cdots=0$, but the function is not zero. Starting from the series, as Lagrange did, is not enough. Cauchy refounded calculus on the idea of a limit, and it is his version that is taught today.

But along the way, Lagrange found two tools that survived the wreck of his plan.

The mean value theorem

The first is the mean value theorem, which he needed to control his series. In today’s form: if $f$ is differentiable on the interval from $a$ to $b$, there is at least one point $c$ between them at which

$$f'(c)=\frac{f(b)-f(a)}{b-a}.$$

The right-hand side is the slope of the line joining the points $(a,f(a))$ and $(b,f(b))$ on the graph. The theorem says that somewhere along the way the tangent line is parallel to that line.

In road language: if you covered 120 km in an hour and a half, your average speed was 80 km/h. The theorem guarantees that at some instant the speedometer read exactly 80. You may have gone slower and faster, but to go from one to the other you had to pass through the average. That is why average-speed cameras, which measure the time between two points on a road, can fine someone without ever having seen the car above the limit.

The error of the approximation

The second tool is the Lagrange remainder. When you replace a function by the first terms of its series, you make an error. Lagrange showed that this error has the same form as the next term, only with the derivative evaluated at an unknown point $c$ between $x$ and $x+h$:

$$\begin{aligned}f(x+h)={}&f(x)+f'(x)\,h+\frac{f''(x)}{2}h^2+\cdots\\&+\frac{f^{(n)}(x)}{n!}h^n\\&+\underbrace{\frac{f^{(n+1)}(c)}{(n+1)!}h^{n+1}}_{\text{remainder}}.\end{aligned}$$

We do not know where $c$ is, but often we know the largest size of the derivative, and that is enough to guarantee how many decimal places of the approximation are correct. The mean value theorem is the case $n=0$ of this formula.

Exercise: find the point c of the mean value theorem for f(x) = x² between 0 and 2

The slope of the line between $(0,0)$ and $(2,4)$ is $\frac{4-0}{2-0}=2$. The derivative is $f'(x)=2x$, and $2c=2$ gives $c=1$. At the point $(1,1)$ the tangent to the parabola is parallel to the line joining the ends.

Exercise: how large can the error be in e ≈ 1 + 1 + 1/2 + 1/6 ?

This is the series of $e^x$ about $0$, with $x=1$ and terms up to $h^3$. The Lagrange remainder is $\frac{e^c}{4!}\cdot1^4$, with $c$ between $0$ and $1$. Since $e^c

Sources: Joseph-Louis Lagrange, Théorie des fonctions analytiques (1797), in volume 9 of the Œuvres de Lagrange · Judith V. Grabiner, The Origins of Cauchy’s Rigorous Calculus (1981) · Earliest Uses of Symbols of Calculus, Jeff Miller.


All Lagrange topics · ← Shuffling the roots: Lagrange’s theorem · Lagrange multipliers: optimising under a constraint →

Image credits.