How does a calculator know sin 0.3?
Press sin 0.3 on a calculator and appears instantly. The chip did not draw a triangle. It added up a handful of terms of
(real libraries also use range reduction and carefully tuned polynomials, but the idea is the same). Two questions turn this trick into mathematics. Why does the infinite sum equal ? And how many terms are enough for ten correct digits? The answer to both is Taylor's theorem with remainder, and its proof rests on a chain of results — limits, derivatives, the mean value theorem — that is the backbone of this lesson.
The same chain answers questions an engineer in Lagos, a pharmacologist in São Paulo or a climate modeller in Pune meets daily: if a quantity changes at a known rate, how much has it changed in total? (Integrate.) If a function has derivative zero, must it be constant? (Yes — but only on an interval, and the proof needs the mean value theorem.) If an infinite sum's terms shrink to zero, does the sum settle down? (Not necessarily: grows without bound.)
This lesson is a university-level treatment of calculus of one variable. It assumes the informal ideas of introductory calculus, exponentials and logarithms, sequences and geometric series and trigonometry, and makes them precise.
Zooming in and adding up
Zoom in on the graph of a differentiable function and it looks more and more like a straight line. The slope of that line is the derivative: the derivative is the best linear approximation,
Chop an interval into thin strips and add up "height × width": that is a Riemann sum, and as the strips get thinner the sums approach the integral. The fundamental theorem of calculus says these two processes undo each other.
Both ideas rest on the word approach. Newton and Leibniz worked with "vanishing quantities" and "infinitesimals" that were sometimes zero and sometimes not, and Bishop Berkeley mocked them as "the ghosts of departed quantities" (1734). The repair, completed in the nineteenth century by Cauchy, Bolzano and Weierstrass, replaced motion and infinitesimals by a game with inequalities: you name a tolerance ; I must find a closeness that guarantees it.
The ε–δ game for x² at a = 3
A limit is a promise: for every tolerance ε there is a δ. Choose δ and see whether the graph stays inside the band.
Claim: limx→3 (x²) = 9Your move: find δ > 0 so that every x with 0 < |x − a| < δ satisfies |f(x) − L| < ε.
- f(x) = x²
- ε-band L ± ε
- δ-window a ± δ
- graph outside the band
The challenge ε
Checked at 2,118 sample points: evidence, not a proof.
Try shrinking : you can always find a working , but it must shrink too. Then move the claimed limit away from and watch every fail once is small. (The widget samples thousands of points: that is evidence, not proof. The proof is in the worked examples below.)
Definitions
Throughout, functions are real-valued and defined on subsets of .
Definition— limit
Let be defined on an open interval around , except possibly at itself. We write if for every there is such that
One-sided limits and use only or .
Definition— continuity
is continuous at (a point of its domain ) if for every there is such that for all with . It is continuous on if it is continuous at every point of .
The order of the quantifiers matters: may depend on and on . If one works for all at once, is uniformly continuous on .
Definition— derivative
Let be defined on an open interval containing . Then is differentiable at , with derivative , if the limit
exists (as a real number). Higher derivatives are defined by repeating. is of class on an interval if exists and is continuous there, and smooth () if it is for every .
Definition— Riemann integral
Let be bounded on . A tagged partition is a choice of points together with tags ; its mesh is . The Riemann sum is . We say is Riemann integrable with integral if for every there is such that for every tagged partition of mesh less than .
Every continuous function on is Riemann integrable, and so is every monotone function; both facts are proved in real analysis (the first using uniform continuity). We use freely the elementary properties: linearity, additivity over adjacent intervals, and the estimate .
Definition— improper integral
If is integrable on for every , then when this limit exists (the integral converges). Integrals of functions that are unbounded near an endpoint are defined by the same kind of limit.
Definition— convergent series
The series converges to if its partial sums satisfy . It converges absolutely if converges, and conditionally if it converges but not absolutely.
Definition— Taylor polynomial and Taylor series
If is times differentiable at , its Taylor polynomial of degree at is
and is the remainder. If is smooth, its Taylor series at is (a Maclaurin series when ). is (real) analytic at if its Taylor series converges to on some interval around .
Worked examples and non-examples
Example— An ε–δ proof: x² is continuous
Fix and . Since , we must control . If then . So choose
Then gives . Notice that depends on : near you must stay much closer. In fact is not uniformly continuous on . (This exact argument is checked by Lean below.)
Example— A derivative from the definition, and a corner
For (), the binomial theorem gives .
For at : the difference quotient is for and for , so the limit does not exist. is continuous but not differentiable at . Continuity does not imply differentiability — Weierstrass (1872) even built a function continuous everywhere and differentiable nowhere.
Example— Three integration techniques
- Substitution (, ):
- Integration by parts (, ):
- Partial fractions: , so as : a convergent improper integral.
Example— Series: convergent, divergent, and conditionally convergent
- converges (integral test, ); Euler found its sum, , in the 1730s.
- diverges although : group the terms as , each bracket at least .
- converges (to ) by the alternating series test, but not absolutely. By Riemann's rearrangement theorem its terms can be reordered to converge to any real number you like: conditional convergence depends on the order of the terms.
Derivatives and the mean value theorem
Theorem— Proposition (differentiable implies continuous)
If is differentiable at , then is continuous at .
Proof
For , , and as this tends to .
∎
To prove the chain rule cleanly we use a reformulation of the derivative due to Carathéodory, which avoids dividing by quantities that might be zero.
Theorem— Lemma (Carathéodory's criterion)
is differentiable at if and only if there is a function , continuous at , with for all near . In that case .
Proof
If exists, put for and ; continuity of at is exactly the definition of . Conversely, given , the difference quotient equals for , which tends to .
∎
Theorem— Theorem (chain rule)
If is differentiable at and is differentiable at , then is differentiable at and .
Proof
Write and with continuous at , continuous at , , . Then
The function is continuous at , because is continuous at (previous proposition) and at . By Carathéodory's criterion, .
∎
The product, quotient and inverse-function rules are proved in the same spirit. The theorems that make derivatives useful rest on one deep fact about the real line, proved in real analysis from the completeness of (see the topology viewpoint below):
Theorem— Theorem (extreme value theorem)
A continuous function on a closed bounded interval attains a maximum and a minimum value.
Theorem— Lemma (Fermat's interior extremum theorem)
If has a local maximum or minimum at an interior point and is differentiable at , then .
Proof
Say is a local maximum: for small. For small the quotient is , so its limit ; for small it is , so . Hence . A minimum is a maximum of .
∎
Theorem— Theorem (Rolle)
If is continuous on , differentiable on , and , then for some .
Proof
By the extreme value theorem attains a maximum and a minimum on . If both are attained only at the endpoints, then , so is constant and every works. Otherwise one of them is attained at some , and by Fermat's lemma.
∎
Theorem— Theorem (mean value theorem)
If is continuous on and differentiable on , where , then
Proof
Let and tilt the graph: . Then is continuous on , differentiable on , and (check: ). Rolle's theorem gives with .
∎
Theorem— Corollary (what the sign of f′ tells you)
Let be differentiable on an interval .
- If on , then is constant on .
- If on , then is strictly increasing on (and if , increasing).
Proof
For in , the mean value theorem on gives for some . If the right side is ; if it is positive.
∎
The interval matters: has derivative on but is not constant. This corollary is what makes antiderivatives unique up to a constant on an interval.
Theorem— Theorem (Cauchy's mean value theorem)
If are continuous on and differentiable on , then for some ,
Proof
Apply Rolle's theorem to ; a short computation gives .
∎
Theorem— Theorem (L'Hôpital's rule, 0/0 form)
Let be differentiable on with there, and suppose and as . If as , then as . The same holds for left-hand and two-sided limits.
Proof
Set ; then are continuous on for every . First, : otherwise Rolle's theorem on would give a zero of . Cauchy's theorem on gives with , that is,
Given , choose with for . For we have , so .
∎
Example— L'Hôpital twice, and the hypotheses that matter
Each step is legitimate because the previous quotient was of the form and the next limit exists. By contrast, by continuity, while blindly differentiating gives : the rule only applies to indeterminate forms.
Secants become a tangent
Shrink h and watch the secant line turn into the tangent: its slope approaches the derivative.
- f(x) = sin(x)
- secant through P and Q
- tangent line (numerical slope)
Slope of the secant PQ
(f(x₀ + h) − f(x₀)) / h = (0.9771 − 0.7071) / 1 = 0.27
Slope of the tangent at P
f′(0.785) ≈ 0.7071
Numerical estimate (central difference with a tiny step).
Difference quotients as h shrinks
| h | (f(x₀ + h) − f(x₀)) / h |
|---|---|
| 1 | 0.26995 |
| 0.1 | 0.6706 |
| 0.01 | 0.70356 |
| 0.001 | 0.70675 |
As h shrinks, Q slides towards P, the secant turns into the tangent, and its slope settles on the derivative f′(x₀).
Integration and the fundamental theorem
Theorem— Theorem (fundamental theorem of calculus, part 1)
Let be integrable on and . If is continuous at , then is differentiable at and .
Proof
For small, additivity gives
Given , continuity gives with when . For the integral above has absolute value at most , so the left side is at most in absolute value.
∎
In particular every continuous function on an interval has an antiderivative.
Theorem— Theorem (fundamental theorem of calculus, part 2)
Let be continuous on and differentiable on with there, and suppose is integrable on . Then
Proof
Take any partition . By the mean value theorem on each there is with . Summing, the left side telescopes:
So is a Riemann sum, for partitions of every mesh. As the mesh tends to these sums tend to ; hence the two numbers are equal.
∎
Theorem— Corollary (integration by parts and substitution)
If are on , then . If is on and is continuous on an interval containing , then .
Proof
For parts, is continuous, so part 2 gives ; rearrange. For substitution, let be an antiderivative of (part 1). By the chain rule , so both sides equal by part 2.
∎
Theorem— Proposition (p-integrals)
converges if and only if , and then equals .
Proof
For , , which tends to if and to if . For the integral is .
∎
Riemann sums for ∫₀¹ eˣ dx = e − 1
Approximate the area under a curve with thin strips, and watch the error shrink as the strips get thinner.
- f(x) = exp(x)
Midpoint sum with 8 strips
M8 = 1.717164
Exact value of the integral
∫01 f(x) dx = 1.718282
Error (sum − integral)
−0.001118
All four rules with n = 8
| Rule | Sum | Error |
|---|---|---|
| Left (L8) | 1.613126 | −0.105156 |
| Right (R8) | 1.827911 | 0.109629 |
| Midpoint (M8) | 1.717164 | −0.001118 |
| Trapezoid (T8) | 1.720519 | 0.002237 |
Double n and watch the error: left and right sums roughly halve it, midpoint and trapezoid sums cut it to about a quarter.
Compare the four rules as you double the number of strips: the left-rule error roughly halves, while the midpoint and trapezoid errors drop by a factor of about four. The experiment below measures these rates.
Series and convergence tests
All the tests rest on the monotone convergence theorem (a bounded increasing sequence of reals converges), which is one form of the completeness of . For a series with non-negative terms, the partial sums increase, so such a series converges exactly when its partial sums are bounded.
Theorem— Theorem (comparison test)
If for all and converges, then converges.
Proof
The partial sums of increase and are bounded by .
∎
Theorem— Theorem (absolute convergence implies convergence)
If converges, then converges.
Proof
Since , we have , so converges by comparison. Then is a difference of two convergent series.
∎
Theorem— Theorem (ratio test)
Suppose for large and . If , then converges absolutely; if , it diverges. If the test says nothing.
Proof
If , pick with . For we have , so , and converges by comparison with a geometric series. If then for large , so and the series diverges (its partial sums cannot settle if the terms do not tend to ). For : diverges while converges, and both have .
∎
Theorem— Theorem (integral test)
Let be positive, continuous and decreasing on . Then converges if and only if converges.
Proof
Because decreases, for each . Summing over :
All three quantities increase with . If the integral converges, the left inequality bounds the partial sums; if the series converges, the right inequality bounds , which then converges as (and increases in ).
∎
With and the -integrals: converges if and only if .
Theorem— Theorem (alternating series test)
If decreases to , then converges to some , and .
Proof
The even partial sums increase, since , and the odd ones decrease, since ; also . Both subsequences are monotone and bounded, so they converge, and to the same limit because . The limit lies between any two consecutive partial sums, so .
∎
The p-series: slide p across 1
Add the terms one by one. Do the partial sums Sₙ settle down, or keep growing?
- partial sums Sₙ
- terms aₙ
S300 = a1 + … + a300 = 1.641606
Partial sums on a screen are evidence, never proof: a series can look settled and still diverge, as the harmonic series does.
Taylor's theorem
Theorem— Theorem (Taylor's theorem with Lagrange remainder)
Let be continuous on the closed interval between and , and let exist on the open interval between them. Then for some strictly between and ,
Proof
Keep fixed and let the base point vary: for between and put
Differentiating term by term, the sum telescopes (the derivative of the -th term is for ), leaving
Now , , and . Cauchy's mean value theorem on the interval between and gives strictly between them with , that is, . Since we may cancel , which gives the formula.
∎
For this is the mean value theorem. The remainder formula is a certificate of accuracy: if between and , then .
Theorem— Corollary (the exponential series)
For every real , . Similarly and for all .
Proof
Every derivative of is , so Taylor's theorem at gives . For fixed , the numbers satisfy , so (by the ratio argument above). Hence . For and use .
∎
Example— How many terms for sin 0.3?
The Maclaurin polynomial of is also , since the coefficient is . With the error at is at most . Three terms already give seven correct decimals; the experiment below compares such bounds with the actual errors.
Is every smooth function the sum of its Taylor series? Cauchy showed in 1823 that the answer is no.
Theorem— Theorem (a smooth function that is not analytic)
Let for and . Then is smooth on and for every . So its Taylor series at is identically zero, yet for every .
Proof
Step 1. For each integer , . Indeed, with , this is , because for every (one term of its series) — take .
Step 2. For , for some polynomial . This holds for with , and if it holds for , then by the chain and product rules
with .
Step 3. By induction, exists and equals . For this is the definition. If , then
because is a finite combination of powers , and each by Step 1. Steps 2 and 3, together with Step 1 again, also show each is continuous at , so is smooth.
∎
Flat at 0, yet not zero
Move the sliders and trace along the curves to read off values.
- f(x) = exp(−1/x²)
- its Taylor series at 0
- f(x) = exp(−1/x²): y = 0.3679
- its Taylor series at 0: y = 0
Near the graph is so flat that no polynomial can see it: every Taylor polynomial at is the zero polynomial. The lesson? Taylor's theorem says — always true — but whether must be proved, function by function, usually with the Lagrange bound.
Calculus in Lean and Mathlib
Mathlib has a large, general library of calculus: HasDerivAt f f' x says has derivative at , ∫ x in a..b, f x is the interval integral (defined via Lebesgue integration, which agrees with the Riemann integral for Riemann-integrable functions), HasSum a s says a series converges (unconditionally) to , and taylorWithinEval gives Taylor polynomials. The lesson's module re-proves several results from more basic library facts — these are marked independent — and cites others directly.
First, continuity. Mathlib defines it with neighbourhood filters; for real functions this unfolds to exactly our ε–δ definition, and the example is proved with the same as on paper, each calc line matching a step of the human proof:
/-- Mathlib defines continuity with neighbourhood filters; for real functions this is exactly
the ε–δ definition of the lesson. This applies Mathlib's `Metric.continuousAt_iff` and
`Real.dist_eq` (the distance on `ℝ` is `|x - y|`). -/
theorem continuousAt_iff_eps_delta (f : ℝ → ℝ) (a : ℝ) :
ContinuousAt f a ↔ ∀ ε > 0, ∃ δ > 0, ∀ x, |x - a| < δ → |f x - f a| < ε := by
simp only [Metric.continuousAt_iff, Real.dist_eq]/-- The squaring function is continuous at every point, proved directly with ε and δ as in the
lesson: take `δ = min 1 (ε / (2|a| + 1))`. If `|x - a| < δ` then `|x + a| ≤ |x - a| + 2|a|
< 2|a| + 1`, so `|x² - a²| = |x - a| |x + a| < δ (2|a| + 1) ≤ ε`. -/
theorem sq_eps_delta (a ε : ℝ) (hε : 0 < ε) :
∃ δ > 0, ∀ x : ℝ, |x - a| < δ → |x ^ 2 - a ^ 2| < ε := by
have hpos : 0 < 2 * |a| + 1 := by positivity
refine ⟨min 1 (ε / (2 * |a| + 1)), lt_min one_pos (div_pos hε hpos), fun x hx => ?_⟩
have h1 : |x - a| < 1 := lt_of_lt_of_le hx (min_le_left _ _)
have h2 : |x - a| < ε / (2 * |a| + 1) := lt_of_lt_of_le hx (min_le_right _ _)
have hsum : |x + a| < 2 * |a| + 1 :=
calc |x + a| = |(x - a) + 2 * a| := by ring_nf
_ ≤ |x - a| + |2 * a| := abs_add_le _ _
_ = |x - a| + 2 * |a| := by rw [abs_mul, abs_two]
_ < 1 + 2 * |a| := by linarith
_ = 2 * |a| + 1 := by ring
calc |x ^ 2 - a ^ 2| = |x - a| * |x + a| := by rw [← abs_mul]; ring_nf
_ ≤ |x - a| * (2 * |a| + 1) := by
exact mul_le_mul_of_nonneg_left hsum.le (abs_nonneg _)
_ < ε / (2 * |a| + 1) * (2 * |a| + 1) := by
exact mul_lt_mul_of_pos_right h2 hpos
_ = ε := div_mul_cancel₀ ε hpos.ne'The chain rule is a single application of Mathlib's HasDerivAt.comp (Mathlib's proof is the general one for maps between normed spaces — see the multivariable lesson):
/-- The chain rule: if `f` has derivative `f'` at `x` and `g` has derivative `g'` at `f x`,
then `g ∘ f` has derivative `g' · f'` at `x`. This applies Mathlib's `HasDerivAt.comp`. -/
theorem chain_rule {f g : ℝ → ℝ} {f' g' x : ℝ} (hf : HasDerivAt f f' x)
(hg : HasDerivAt g g' (f x)) : HasDerivAt (g ∘ f) (g' * f') x :=
hg.comp x hfThe mean value theorem, derived from Rolle's theorem by tilting the graph exactly as in the human proof, next to Mathlib's own version:
/-- **The mean value theorem**, derived from Rolle's theorem exactly as in the lesson. Tilt
the graph: `g x = f x - m (x - a)` with `m = (f b - f a)/(b - a)` has `g a = g b`, so Rolle's
theorem (Mathlib's `exists_hasDerivAt_eq_zero`) gives `c` with `g' c = f' c - m = 0`. -/
theorem mvt_from_rolle {f f' : ℝ → ℝ} {a b : ℝ} (hab : a < b)
(hfc : ContinuousOn f (Icc a b)) (hff' : ∀ x ∈ Ioo a b, HasDerivAt f (f' x) x) :
∃ c ∈ Ioo a b, f' c = (f b - f a) / (b - a) := by
set m := (f b - f a) / (b - a) with hm
have hba : b - a ≠ 0 := sub_ne_zero.mpr hab.ne'
-- The tilted function and its derivative.
let g : ℝ → ℝ := fun x => f x - m * (x - a)
have hgc : ContinuousOn g (Icc a b) :=
hfc.sub (continuousOn_const.mul (continuousOn_id.sub continuousOn_const))
have hgab : g a = g b := by
simp only [g, sub_self, mul_zero, sub_zero, hm]
field_simp
ring
have hgg' : ∀ x ∈ Ioo a b, HasDerivAt g (f' x - m) x := by
intro x hx
have hlin : HasDerivAt (fun x => m * (x - a)) m x := by
simpa using ((hasDerivAt_id x).sub_const a).const_mul m
exact (hff' x hx).sub hlin
obtain ⟨c, hc, hc0⟩ := exists_hasDerivAt_eq_zero hab hgc hgab hgg'
exact ⟨c, hc, sub_eq_zero.mp hc0⟩/-- Mathlib's own **mean value theorem**, `exists_hasDerivAt_eq_slope`. Same statement as
`mvt_from_rolle`; Mathlib proves it from Cauchy's mean value theorem. -/
theorem mvt {f f' : ℝ → ℝ} {a b : ℝ} (hab : a < b) (hfc : ContinuousOn f (Icc a b))
(hff' : ∀ x ∈ Ioo a b, HasDerivAt f (f' x) x) :
∃ c ∈ Ioo a b, f' c = (f b - f a) / (b - a) :=
exists_hasDerivAt_eq_slope f f' hab hfc hff'Its two most-used consequences, each proved from mvt_from_rolle:
/-- A function on `ℝ` whose derivative is zero everywhere is constant. Proof from the mean
value theorem: for `x < y`, some `c` has `0 = f' c = (f y - f x)/(y - x)`, so `f y = f x`. -/
theorem const_of_deriv_zero {f : ℝ → ℝ} (hf : ∀ x, HasDerivAt f 0 x) (x y : ℝ) :
f x = f y := by
-- It suffices to treat `x < y`; the case `x = y` is trivial and `x > y` is symmetric.
have key : ∀ u v : ℝ, u < v → f u = f v := by
intro u v huv
obtain ⟨c, -, hc⟩ := mvt_from_rolle (f' := fun _ => 0) huv
(fun t _ => (hf t).continuousAt.continuousWithinAt) (fun t _ => hf t)
have hvu : v - u ≠ 0 := sub_ne_zero.mpr huv.ne'
have : f v - f u = 0 := by
have := hc.symm
rwa [div_eq_zero_iff, or_iff_left hvu] at this
linarith
rcases lt_trichotomy x y with h | rfl | h
· exact key x y h
· rfl
· exact (key y x h).symm/-- A function whose derivative is positive everywhere is strictly increasing. Proof from the
mean value theorem: for `x < y`, `f y - f x = f'(c) (y - x)` with `f'(c) > 0` and `y - x > 0`. -/
theorem strictMono_of_deriv_pos {f f' : ℝ → ℝ} (hf : ∀ x, HasDerivAt f (f' x) x)
(hpos : ∀ x, 0 < f' x) : StrictMono f := by
intro x y hxy
obtain ⟨c, -, hc⟩ := mvt_from_rolle hxy
(fun t _ => (hf t).continuousAt.continuousWithinAt) (fun t _ => hf t)
have hyx : 0 < y - x := sub_pos.mpr hxy
have hdiff : f y - f x = f' c * (y - x) := by
rw [hc]; field_simp
have : 0 < f y - f x := by rw [hdiff]; exact mul_pos (hpos c) hyx
linarithL'Hôpital's rule appears in Mathlib in many variants (one-sided, at infinity, with deriv); here is the two-sided form. Note that the conclusion is about the punctured neighbourhood filter 𝓝[≠] a, i.e. with :
/-- **L'Hôpital's rule**, two-sided `0/0` form: if `f` and `g` have derivatives `f'`, `g'` near
`a`, `g'` does not vanish near `a`, `f, g → 0` at `a`, and `f'/g' → l`, then `f/g → l` as
`x → a` with `x ≠ a`. This applies Mathlib's `HasDerivAt.lhopital_zero_nhds`, which is proved
from Cauchy's mean value theorem as in the lesson. -/
theorem lhopital {f g f' g' : ℝ → ℝ} {a l : ℝ}
(hff' : ∀ᶠ x in 𝓝 a, HasDerivAt f (f' x) x) (hgg' : ∀ᶠ x in 𝓝 a, HasDerivAt g (g' x) x)
(hg' : ∀ᶠ x in 𝓝 a, g' x ≠ 0) (hfa : Tendsto f (𝓝 a) (𝓝 0)) (hga : Tendsto g (𝓝 a) (𝓝 0))
(hdiv : Tendsto (fun x => f' x / g' x) (𝓝 a) (𝓝 l)) :
Tendsto (fun x => f x / g x) (𝓝[≠] a) (𝓝 l) :=
HasDerivAt.lhopital_zero_nhds hff' hgg' hg' hfa hga hdivThe fundamental theorem of calculus, and two integrals computed with it. Integration by parts found the antiderivative ; Lean only needs to check it, by differentiating:
/-- **Fundamental theorem of calculus** (evaluation form): if `F' = f` on `[a, b]` and `f` is
integrable there, then `∫ₐᵇ f = F b - F a`. This applies Mathlib's
`intervalIntegral.integral_eq_sub_of_hasDerivAt`. -/
theorem ftc {F f : ℝ → ℝ} {a b : ℝ} (hF : ∀ x ∈ uIcc a b, HasDerivAt F (f x) x)
(hint : IntervalIntegrable f MeasureTheory.volume a b) :
∫ x in a..b, f x = F b - F a :=
intervalIntegral.integral_eq_sub_of_hasDerivAt hF hint/-- `∫₀¹ x² dx = 1/3`, computed with the fundamental theorem and the antiderivative `x³/3`. -/
theorem integral_sq : ∫ x in (0 : ℝ)..1, x ^ 2 = 1 / 3 := by
have hF : ∀ x ∈ uIcc (0 : ℝ) 1, HasDerivAt (fun x : ℝ => x ^ 3 / 3) (x ^ 2) x := by
intro x _
have := (hasDerivAt_pow 3 x).div_const 3
convert this using 1
push_cast
ring
rw [ftc hF ((continuous_pow 2).intervalIntegrable 0 1)]
norm_num/-- `∫₀¹ x eˣ dx = 1`. Integration by parts *finds* the antiderivative `(x - 1) eˣ`; the
fundamental theorem then *checks* it: `((x - 1) eˣ)' = eˣ + (x - 1) eˣ = x eˣ`. -/
theorem integral_x_exp : ∫ x in (0 : ℝ)..1, x * Real.exp x = 1 := by
have hF : ∀ x ∈ uIcc (0 : ℝ) 1,
HasDerivAt (fun x : ℝ => (x - 1) * Real.exp x) (x * Real.exp x) x := by
intro x _
have := ((hasDerivAt_id' x).sub_const 1).mul (Real.hasDerivAt_exp x)
convert this using 1
ring
have hcont : Continuous fun x : ℝ => x * Real.exp x := by fun_prop
rw [ftc hF (hcont.intervalIntegrable 0 1)]
simpSeries need care with words. In Mathlib, Summable a means unconditional convergence (the sum does not depend on the order of the terms), which for real series is equivalent to absolute convergence. So the alternating harmonic series is not Summable in Mathlib, although its partial sums converge. The proof that absolute convergence implies convergence follows the lesson line by line (, then subtract), and the second version restates the conclusion in terms of partial sums, exactly as in the lesson. The -series test is cited from Mathlib, which proves it by Cauchy condensation rather than the integral test:
/-- **An absolutely convergent series converges.** The lesson's proof: `0 ≤ aₙ + |aₙ| ≤ 2|aₙ|`,
so `∑ (aₙ + |aₙ|)` converges by comparison, and `aₙ = (aₙ + |aₙ|) - |aₙ|` is a difference of two
convergent series. (Mathlib states the general fact as `Summable.of_norm`.) -/
theorem summable_of_abs {a : ℕ → ℝ} (h : Summable fun n => |a n|) : Summable a := by
have hsum : Summable fun n => a n + |a n| := by
refine Summable.of_nonneg_of_le (fun n => ?_) (fun n => ?_) (h.mul_left 2)
· linarith [neg_abs_le (a n)]
· linarith [le_abs_self (a n)]
have : a = fun n => (a n + |a n|) - |a n| := by
funext n; ring
rw [this]
exact hsum.sub h/-- The same theorem in the lesson's language of partial sums: if `∑ |aₙ|` converges, then the
partial sums `a₀ + ⋯ + a_{N-1}` converge to a limit. (In Mathlib, `Summable` means
*unconditional* convergence, which for real series is the same as absolute convergence; so
`Summable` gives convergent partial sums, via `HasSum.tendsto_sum_nat`, but a conditionally
convergent series such as `∑ (-1)ⁿ/(n+1)` is *not* `Summable`.) -/
theorem partial_sums_converge_of_abs {a : ℕ → ℝ} (h : Summable fun n => |a n|) :
∃ S, Tendsto (fun N => ∑ n ∈ Finset.range N, a n) atTop (𝓝 S) :=
⟨_, (summable_of_abs h).hasSum.tendsto_sum_nat⟩/-- The `p`-series test: `∑ 1/nᵖ` converges if and only if `p > 1`. This applies Mathlib's
`Real.summable_one_div_nat_rpow` (proved there with Cauchy condensation). -/
theorem p_series (p : ℝ) : Summable (fun n : ℕ => 1 / (n : ℝ) ^ p) ↔ 1 < p :=
Real.summable_one_div_nat_rpowTaylor's theorem with Lagrange remainder and the exponential series are cited from Mathlib:
/-- **Taylor's theorem with Lagrange remainder.** If `f` is `n` times continuously
differentiable on the closed interval between `x₀` and `x`, and its `n`-th derivative is
differentiable inside, then `f x - Pₙ(x) = f⁽ⁿ⁺¹⁾(ξ) (x - x₀)ⁿ⁺¹/(n+1)!` for some `ξ` strictly
between. This applies Mathlib's `taylor_mean_remainder_lagrange`. (Mathlib's derivatives here
are taken *within* the interval, which agrees with the ordinary ones for smooth `f`.) -/
theorem taylor_lagrange {f : ℝ → ℝ} {x x₀ : ℝ} {n : ℕ} (hx : x₀ ≠ x)
(hf : ContDiffOn ℝ n f (uIcc x₀ x))
(hf' : DifferentiableOn ℝ (iteratedDerivWithin n f (uIcc x₀ x)) (uIoo x₀ x)) :
∃ ξ ∈ uIoo x₀ x, f x - taylorWithinEval f n (uIcc x₀ x) x₀ x =
iteratedDerivWithin (n + 1) f (uIcc x₀ x) ξ * (x - x₀) ^ (n + 1) / (n + 1).factorial :=
taylor_mean_remainder_lagrange hx hf hf'/-- `eˣ = ∑ xⁿ/n!` for every real `x`. This applies Mathlib's
`NormedSpace.expSeries_div_hasSum_exp` together with `Real.exp_eq_exp_ℝ`, which identifies the
real exponential with the exponential series. -/
theorem exp_series (x : ℝ) : HasSum (fun n : ℕ => x ^ n / n.factorial) (Real.exp x) := by
rw [Real.exp_eq_exp_ℝ]
exact NormedSpace.expSeries_div_hasSum_exp xFinally, the misconception "smooth implies analytic". Mathlib's expNegInvGlue is the one-sided cousin of Cauchy's function: for and for . Mathlib proves it is smooth. We prove that all its derivatives vanish at , by a different route from the human proof above: the function is identically zero to the left of , so its derivatives vanish there, and continuity of the derivatives carries the zeros to :
/-- Mathlib's `expNegInvGlue` is `exp (-1/x)` for `x > 0` and `0` for `x ≤ 0`; it is smooth
(`expNegInvGlue.contDiff`). **Every derivative of it at `0` is `0`**, so its Taylor series at
`0` is the zero series. Proof: on `(-∞, 0)` the function is locally zero, so each iterated
derivative vanishes there; iterated derivatives of a smooth function are continuous, so the
value at `0` is the limit from the left, which is `0`. -/
theorem flat_iteratedDeriv_zero (n : ℕ) : iteratedDeriv n expNegInvGlue 0 = 0 := by
have hcont : Continuous (iteratedDeriv n expNegInvGlue) :=
(expNegInvGlue.contDiff (n := ⊤)).continuous_iteratedDeriv n (by exact_mod_cast le_top)
-- The iterated derivative vanishes at every negative point.
have hneg : ∀ x : ℝ, x < 0 → iteratedDeriv n expNegInvGlue x = 0 := by
intro x hx
have hloc : expNegInvGlue =ᶠ[𝓝 x] fun _ => (0 : ℝ) := by
filter_upwards [gt_mem_nhds hx] with y hy
exact expNegInvGlue.zero_of_nonpos hy.le
rw [hloc.iteratedDeriv_eq n]
simp
-- Take the limit from the left.
have hlim : Tendsto (iteratedDeriv n expNegInvGlue) (𝓝[<] 0)
(𝓝 (iteratedDeriv n expNegInvGlue 0)) :=
(hcont.tendsto 0).mono_left nhdsWithin_le_nhds
have hzero : Tendsto (iteratedDeriv n expNegInvGlue) (𝓝[<] 0) (𝓝 0) := by
refine tendsto_const_nhds.congr' ?_
filter_upwards [self_mem_nhdsWithin] with x hx
exact (hneg x hx).symm
exact tendsto_nhds_unique hlim hzero/-- …and yet `expNegInvGlue x > 0` for every `x > 0`: the function is not the sum of its
(zero) Taylor series on any interval `(0, r)`. This applies Mathlib's
`expNegInvGlue.pos_of_pos`. -/
theorem flat_pos {x : ℝ} (hx : 0 < x) : 0 < expNegInvGlue x :=
expNegInvGlue.pos_of_pos hxWhat is and is not formalised here. Formalised: everything displayed above. Independently proved: the ε–δ example, the mean value theorem from Rolle, its two corollaries, both integrals, absolute convergence (in both forms), and the flatness of expNegInvGlue. Cited from Mathlib: the ε–δ characterisation, the chain rule, L'Hôpital's rule, the fundamental theorem, the -series test, Taylor's theorem and the exponential series. Not formalised here: the extreme value theorem and Rolle's theorem themselves (Mathlib has both, as IsCompact.exists_isMaxOn and exists_hasDerivAt_eq_zero, and our mean value theorem uses the latter), the Riemann-sum definition of the integral, and the two-sided function (whose flatness needs the polynomial bookkeeping of the human proof).
Error bounds versus actual errors
Taylor's theorem promises an upper bound on the error. How good is the promise? The first experiment computes Taylor polynomials of and exactly (with rational arithmetic), compares the actual error with the Lagrange bound, and then looks at Cauchy's flat function, where the Taylor polynomials stay at zero.
"""Taylor polynomials: the Lagrange error bound against the actual error.
Taylor's theorem says f(x) = T_n(x) + R_n(x) with
R_n(x) = f^(n+1)(xi) x^(n+1) / (n+1)! for some xi between 0 and x. Bounding
|f^(n+1)| gives a guaranteed error bound. This experiment computes Taylor
polynomials of exp and sin exactly (rational arithmetic), compares the actual
error (against the library functions) with the Lagrange bound, finds how many
terms of the series for e give ten correct digits, and shows Cauchy's flat
function exp(-1/x^2), whose Taylor polynomials at 0 are all zero.
Runs unchanged in the browser (Pyodide) using only the standard library.
"""
import math
from fractions import Fraction
def exp_taylor(x, n):
"""Exact value of the Maclaurin polynomial sum_{k=0}^{n} x^k / k!."""
if n < 0:
raise ValueError("degree must be non-negative")
x = Fraction(x)
term = Fraction(1)
total = Fraction(1)
for k in range(1, n + 1):
term = term * x / k
total += term
return total
def sin_taylor(x, n):
"""Exact value of the Maclaurin polynomial of sin of degree n."""
if n < 0:
raise ValueError("degree must be non-negative")
x = Fraction(x)
total = Fraction(0)
for k in range(1, n + 1, 2):
sign = -1 if (k - 1) // 2 % 2 else 1
total += sign * x**k / math.factorial(k)
return total
def exp_bound(x, n):
"""Lagrange bound on |exp(x) - T_n(x)|: e^max(x,0) |x|^(n+1) / (n+1)!.
The unknown point xi lies between 0 and x, so e^xi <= e^max(x, 0).
"""
return math.exp(max(x, 0)) * abs(x) ** (n + 1) / math.factorial(n + 1)
def sin_bound(x, n):
"""Lagrange bound on |sin(x) - T_n(x)|, using |sin^(m+1)| <= 1.
For odd n the next coefficient of sin is zero, so T_n = T_(n+1) and the
remainder of degree m = n + 1 gives a sharper bound.
"""
m = n + 1 if n % 2 else n
return abs(x) ** (m + 1) / math.factorial(m + 1)
def degree_for_e(tolerance):
"""Least n whose Lagrange bound 3/(n+1)! for |e - T_n(1)| is below tolerance."""
n = 0
while 3 / math.factorial(n + 1) >= tolerance:
n += 1
return n
def flat(x):
"""Cauchy's smooth function: exp(-1/x^2) for x != 0, and 0 at 0."""
return 0.0 if x == 0 else math.exp(-1 / x**2)
def error_rows(f, poly, bound, x, degrees):
"""Rows (n, actual error, bound) for the given degrees."""
rows = []
for n in degrees:
actual = abs(f(x) - float(poly(Fraction(x), n)))
rows.append((n, actual, bound(x, n)))
return rows
def main():
cases = [
("exp", math.exp, exp_taylor, exp_bound, 1, [2, 4, 6, 8, 10]),
("exp", math.exp, exp_taylor, exp_bound, -2, [2, 4, 8, 12, 16]),
("sin", math.sin, sin_taylor, sin_bound, 0.3, [1, 3, 5, 7]),
]
print("Maclaurin polynomials: actual error versus Lagrange bound")
for name, f, poly, bound, x, degrees in cases:
print(f"f = {name}, x = {x}")
print(" n actual error Lagrange bound bound / actual")
for n, actual, b in error_rows(f, poly, bound, x, degrees):
print(f" {n:2d} {actual:.3e} {b:.3e} {b / actual:7.2f}")
n = degree_for_e(1e-10)
print(f"Degree n with 3/(n+1)! < 1e-10 (ten digits of e): n = {n}")
approx = float(exp_taylor(1, n))
print(f" T_{n}(1) = {approx:.12f}, error {abs(math.e - approx):.1e}")
print("Cauchy's flat function: every T_n at 0 is the zero polynomial")
for x in [0.5, 0.2, 0.1]:
print(f" x = {x}: f(x) = {flat(x):.3e} = error of T_n for every n")
print()
print("Epistemic status: the polynomial values are exact rationals; the")
print("errors are measured against floating-point exp and sin, so they are")
print("numerical evidence for these x and n only. That the bound holds for")
print("every x and n is Taylor's theorem; that exp is the sum of its series")
print("is the lesson's corollary. For the flat function no degree helps.")
if __name__ == "__main__":
main()Numerical integration has error bounds too. For a function with continuous second derivative, the midpoint rule with strips on has error at most , and the trapezoid rule at most ; Simpson's rule, for functions, at most . (These are theorems, proved with Taylor's theorem; see a numerical analysis text.) The second experiment measures the rates on :
"""How fast do Riemann sums converge? Left, midpoint, trapezoid and Simpson.
For the integral of e^x over [0, 1] (exact value e - 1) we compute four
approximations with n = 4, 8, ..., 64 strips and measure the observed order
of convergence: if the error behaves like C / n^p, doubling n divides it by
2^p, so p = log2(error(n) / error(2n)). Theory (proved with Taylor's theorem)
predicts p = 1 for the left rule, 2 for the midpoint and trapezoid rules and
4 for Simpson's rule, for smooth integrands.
Runs unchanged in the browser (Pyodide) using only the standard library.
"""
import math
def left_sum(f, a, b, n):
"""Left Riemann sum with n equal strips."""
h = (b - a) / n
return h * sum(f(a + i * h) for i in range(n))
def midpoint_sum(f, a, b, n):
"""Midpoint rule with n equal strips."""
h = (b - a) / n
return h * sum(f(a + (i + 0.5) * h) for i in range(n))
def trapezoid_sum(f, a, b, n):
"""Trapezoid rule with n equal strips."""
h = (b - a) / n
inner = sum(f(a + i * h) for i in range(1, n))
return h * (0.5 * f(a) + inner + 0.5 * f(b))
def simpson_sum(f, a, b, n):
"""Composite Simpson's rule with n equal strips (n must be even)."""
if n <= 0 or n % 2:
raise ValueError("Simpson's rule needs a positive even number of strips")
h = (b - a) / n
odd = sum(f(a + i * h) for i in range(1, n, 2))
even = sum(f(a + i * h) for i in range(2, n, 2))
return h / 3 * (f(a) + 4 * odd + 2 * even + f(b))
def observed_order(error_n, error_2n):
"""Estimate p from errors with n and 2n strips, assuming error ~ C / n^p."""
return math.log2(abs(error_n) / abs(error_2n))
RULES = [
("left", left_sum),
("midpoint", midpoint_sum),
("trapezoid", trapezoid_sum),
("Simpson", simpson_sum),
]
def error_table(f, a, b, exact, ns):
"""Map each rule name to its list of signed errors (approximation - exact)."""
return {name: [rule(f, a, b, n) - exact for n in ns] for name, rule in RULES}
def main():
exact = math.e - 1
ns = [4, 8, 16, 32, 64]
table = error_table(math.exp, 0.0, 1.0, exact, ns)
print("Integral of e^x over [0, 1] = e - 1; signed errors (approx - exact)")
print(" n left midpoint trapezoid Simpson")
for i, n in enumerate(ns):
row = " ".join(f"{table[name][i]:+.3e}" for name, _ in RULES)
print(f" {n:2d} {row}")
print("Observed order p = log2(E(n) / E(2n)):")
for name, _ in RULES:
errs = table[name]
orders = [observed_order(errs[i], errs[i + 1]) for i in range(len(ns) - 1)]
shown = ", ".join(f"{p:.2f}" for p in orders)
print(f" {name:<9} {shown}")
ratio = table["midpoint"][-1] / table["trapezoid"][-1]
print(f"Midpoint error / trapezoid error at n = 64: {ratio:+.4f}")
print("(about -1/2, so (2M + T)/3 - Simpson with 2n strips - cancels them)")
print()
print("Epistemic status: floating-point evidence for one smooth integrand.")
print("The orders 1, 2, 2, 4 agree with the error theorems for these rules,")
print("which are proved with Taylor's theorem and need f to be smooth enough;")
print("for a function with a kink or a singularity the rates can be worse.")
if __name__ == "__main__":
main()Both experiments are numerical evidence about particular functions and particular . The theorems in the lesson are what guarantee the behaviour for all .
Explore: Taylor polynomials and their limits
Raise the degree and watch the Taylor polynomials of hug the graph on wider and wider intervals — the series converges for every . Then switch to or , whose series converge only on a bounded interval, however high the degree.
Taylor polynomials
Polynomials built from the derivatives at 0 hug the function more and more closely, but only inside the interval of convergence.
- f(x) = sin x
- Taylor polynomial T5
T5(x) = x − x³/3! + x⁵/5!
- f(2) = 0.9093
- T5(2) = 0.93333
- |f − T5| = 0.02404
The function is smooth on all of , yet its Maclaurin series converges only for . Below, the partial sum of degree is written in closed form as . Slide up and watch the partial sums converge inside and blow up outside. Nothing on the real line explains the barrier at ; the analysis viewpoint below does.
Graphing functions
Move the sliders and trace along the curves to read off values.
- 1/(1 + x²)
- partial sum of degree 2N
- 1/(1 + x²): y = 0.5
- partial sum of degree 2N: y = 0
Exercises
1. Calculus of one variable
Warm-upHumanWe want whenever . Following the lesson's recipe with , which does it give for ?
2. Calculus of one variable
Warm-upHumanCompute .
3. Calculus of one variable
CoreHumanFor on , the chord slope is , but wherever it exists. Which hypothesis of the mean value theorem fails?
4. Calculus of one variable
CoreHumanCompute .
5. Calculus of one variable
CoreHumanWhich of these series converge? (Select all that apply.)
6. Calculus of one variable
CoreHumanUsing the Lagrange bound for the Maclaurin polynomial of at , what is the smallest degree that guarantees ? (Use if you like; the answer is the same.)
7. Calculus of one variable
CoreHumanA student writes: . What is wrong?
8. Calculus of one variable
StretchHumanLet for and . On which set does equal the sum of its Maclaurin series?
9. Calculus of one variable
StretchFormalWhich Lean statement correctly formalises the mean value theorem? (Here Icc a b is and Ioo a b is .)
10. Calculus of one variable
StretchComputationalWrite exp_taylor(x, n) returning , and degree_needed(x, tol) returning the least for which the Lagrange bound is less than tol. Then check that really is within tol of math.exp(x).
Common misconceptions
Misconception
"A smooth function equals its Taylor series." Cauchy's function (with value at ) is smooth, all its derivatives at vanish, and so its Taylor series at is — which equals the function only at . Taylor's theorem always holds; convergence of the series to requires , which must be proved.
Misconception
"L'Hôpital's rule works for any quotient." It applies only to indeterminate forms or , and only when the limit of exists. , but differentiating top and bottom gives . And the rule is not always the honest route: computing with L'Hôpital uses — which is that limit, so the argument is circular.
Misconception
"If , then converges." The condition is necessary but not sufficient: the harmonic series diverges. (It grows like — very slowly, which is why computer experiments can mislead.)
Misconception
"." A positive function cannot have negative integral. The fundamental theorem needs an antiderivative on the whole interval, and is unbounded at . As an improper integral, diverges, so the integral does not exist.
Misconception
"A derivative is always continuous." (with ) is differentiable everywhere, with , but has no limit as . Derivatives do, however, always have the intermediate value property (Darboux's theorem).
Many ways of seeing
Topology— Why [a, b] is special: connectedness and compactness
The intermediate value theorem and the extreme value theorem look like facts about functions, but they are facts about the interval. A continuous image of a connected space is connected, and the connected subsets of are exactly the intervals: that is the intermediate value theorem. A continuous image of a compact space is compact, and is compact by the Heine–Borel theorem; a compact subset of is closed and bounded, so it contains its supremum and infimum: that is the extreme value theorem. Rolle's theorem, the mean value theorem, and through them all of calculus, therefore rest on two topological properties of . Over both fail: changes sign on without a rational zero. See point-set topology.
Geometry— Tangent lines, parallel secants and curvature
The mean value theorem has a picture: some tangent line is parallel to the chord from to . The derivative is the slope of the best linear approximation; the second derivative measures how the graph bends away from its tangent. For the graph of , the curvature is , and the circle of radius through the point with the same tangent — the osculating circle — matches the curve to second order, just as the tangent line matches it to first order. Taylor polynomials are the higher-order version of the same idea: is the unique polynomial of degree at most agreeing with to order at . See curves and surfaces.
Algebra— Differentiation is a derivation; dual numbers compute it
Algebraically, is a linear map satisfying the Leibniz rule — a derivation. On polynomials, is determined by and these two rules, with no limits at all. A clean way to compute derivatives mechanically uses the dual numbers : for a polynomial , exactly, because all higher powers of vanish. Extending this to , and the other elementary functions (via , and so on) gives forward-mode automatic differentiation, which computes exact derivatives of programs; the chain rule is just composition of maps of dual numbers. The truncated Taylor polynomial is the analogous computation in .
Number theory— The series for e proves that e is irrational
Taylor's theorem with remainder gives arithmetic information. Suppose with integers . Multiply by :
The left side is an integer (both and every with are integers), and the right side shows it lies strictly between and . Contradiction: is irrational (Fourier's proof, published 1815). The same idea — a quantity that is a positive integer but smaller than — drives the proofs that is irrational and that is transcendental (Hermite, 1873). See real numbers.
Analysis— Why 1/(1 + x²) stops at |x| = 1: look in the complex plane
The Maclaurin series of is the geometric series , which converges exactly for — although the function is smooth and bounded on all of . The explanation is invisible on the real line. A power series converges on a disc in the complex plane (and diverges for ), and the function has poles at , at distance from . By a theorem of complex analysis, the Taylor series of a function holomorphic on a disc converges to it on the whole disc; and it cannot converge on any larger disc, because that disc would contain a pole: the sum of a power series is continuous (indeed holomorphic) on its disc of convergence and would agree with near the pole, where that function is unbounded. So , and the real series is trapped in . Complex differentiability is so rigid that it forces analyticity — the opposite of the real world, where Cauchy's is smooth but not analytic. (Its complex version has an essential singularity at .)
Physics— Velocity, acceleration and Newton's fluxions
Newton called derivatives fluxions: the rate at which a "flowing quantity" changes in time. If is position, is velocity and acceleration, and the fundamental theorem says displacement is the integral of velocity. The mean value theorem has a famous reading: if you drive km in hours, at some instant your speedometer read exactly km/h — the reasoning behind the average-speed cameras used on highways in many countries. Taylor's theorem, cut off at second order, is the physicist's universal approximation: near a stable equilibrium every smooth potential looks like , which is why harmonic oscillators are everywhere (see classical mechanics). That reasoning is a heuristic until one bounds the neglected remainder.
History and global context
- Ancient methods of exhaustion. Archimedes (3rd century BCE) found the area of a parabolic segment and the volume of a sphere by squeezing them between inscribed and circumscribed figures. In China, Liu Hui (3rd century CE) approximated with polygons of up to 3072 sides, and Zu Chongzhi and his son Zu Gengzhi (5th–6th centuries) used a principle equivalent to Cavalieri's to find the volume of a sphere.
- Sums of powers and volumes. Ibn al-Haytham (Cairo, c. 1000) summed fourth powers of integers to find the volume of a solid obtained by rotating a parabola.
- The Kerala school. Mādhava of Saṅgamagrāma (c. 1340–1425) and his successors in Kerala, India, found infinite series for , and , including , together with correction terms to accelerate convergence. The work is preserved in texts such as Jyeṣṭhadeva's Yuktibhāṣā (c. 1530), which gives justifications.
- The calculus of Newton and Leibniz. Pierre de Fermat found tangents and maxima (1630s); Isaac Barrow saw the inverse relation between tangents and areas. Isaac Newton developed his method of fluxions in 1665–66 (published much later), and Gottfried Wilhelm Leibniz published his differential calculus in 1684, with the notation and we still use; the priority dispute that followed divided British and continental mathematics for a century. In Japan, Takebe Katahiro (1722) found a power series for the square of the arcsine.
- Series and functions. Brook Taylor published his series in 1715 and Colin Maclaurin popularised the special case in 1742. Michel Rolle proved his theorem for polynomials (1691). Guillaume de l'Hôpital's textbook of 1696 contains the rule now named after him; it was taught to him by Johann Bernoulli. Leonhard Euler made functions and power series the centre of analysis (Introductio, 1748). Joseph-Louis Lagrange gave the remainder in the form above (1797).
- Rigour. Bernard Bolzano proved the intermediate value theorem (1817). Augustin-Louis Cauchy's Cours d'analyse (1821) and Résumé (1823) defined limits, continuity, derivatives and integrals in essentially modern terms, proved the mean value theorem, and gave the function . Bernhard Riemann defined his integral in 1854. Karl Weierstrass made the ε–δ language standard in his Berlin lectures of the 1860s and constructed a continuous, nowhere-differentiable function (1872).
Further reading
- Michael Spivak, Calculus (1967; 4th edition 2008) — rigorous, beautiful and full of challenging problems; the model for this lesson's level.
- Tom M. Apostol, Calculus, Volume 1 (2nd edition 1967) — integration before differentiation, with careful proofs.
- Richard Courant and Fritz John, Introduction to Calculus and Analysis, Volume I (1965) — strong on applications and intuition.
- Stephen Abbott, Understanding Analysis (2001; 2nd edition 2015) — the natural next step into real analysis.
- Ernst Hairer and Gerhard Wanner, Analysis by Its History (1996) — the theorems of this lesson in their historical order, with original figures.
- Otto Toeplitz, The Calculus: A Genetic Approach (1963).
Next in the Lumenary: multivariable calculus, ordinary differential equations, real analysis and numerical methods.