Calculus courses teach the derivative as a set of rules. Analysis asks what the rules rest on. This post defines the derivative as a limit, proves that differentiable functions are continuous, and proves the product and chain rules without the usual gap. The centre of the post is the Mean Value Theorem. It is the one tool that turns information about f′ into information about f, and almost every later result depends on it: "zero derivative means constant", L'Hôpital's rule, and Taylor's theorem with a remainder you can actually bound. Along the way you meet functions that break naive intuition: a derivative that exists everywhere but is not continuous, a smooth function whose Taylor series is useless, and a continuous function with no derivative anywhere. It builds on the ε–δ limits, the Extreme Value Theorem and the Intermediate Value Theorem from post 02.
Series map: 00 The Real Numbers & Completeness → 01 Sequences & Series → 02 Topology of ℝ & Continuity → 03 Differentiation & Taylor's Theorem (this post) → 04 The Riemann Integral → 05 Uniform Convergence & Power Series.
Learning Outcome
Define the derivative as a limit of difference quotients and compute it from the definition.
Prove that a function differentiable at a point is continuous there, and show with ∣x∣ that the converse fails.
Prove the product rule and the chain rule, using the "linear approximation" form of the derivative to avoid dividing by zero.
State and prove the Interior Extremum Theorem, Rolle's Theorem, the Mean Value Theorem and Cauchy's Generalised Mean Value Theorem.
Use the Mean Value Theorem to prove "f′=0 implies constant", monotonicity tests and numeric inequalities.
State and prove Darboux's theorem, and explain why x2sin(1/x) matters.
Apply L'Hôpital's rule with all of its hypotheses checked.
State and prove Taylor's theorem with the Lagrange remainder, and use it to get a proven error bound.
Place the smooth non-analytic function e−1/x2 and Weierstrass's nowhere-differentiable function in the hierarchy of smoothness.
Chapter 1 — The derivative as a limit
Terminology
Interval — in this post, I always means an interval of R with more than one point.
Difference quotient — for x=c, the slope of the secant line through (c,f(c)) and (x,f(x)), that is x−cf(x)−f(c).
Derivative at a point — the limit of the difference quotient as x→c, when that limit exists as a real number.
One-sided derivative — the same limit taken only from the right (x→c+) or only from the left. At an endpoint of a closed interval only one side makes sense, and "differentiable at the endpoint" means the one-sided derivative exists.
Differentiable on an interval — differentiable at every point of it.
Class Ck — Ck(I) is the set of functions whose first k derivatives exist on I and whose k-th derivative is continuous. C∞ means derivatives of every order exist.
Definition
Let f:I→R and c∈I. Then f is differentiable at c if the limit
f′(c)=x→climx−cf(x)−f(c)
exists (as a real number). In ε–δ form: for every ε>0 there is δ>0 such that 0<∣x−c∣<δ and x∈I imply
x−cf(x)−f(c)−f′(c)<ε.
Writing x=c+h gives the equivalent form f′(c)=limh→0hf(c+h)−f(c).
Worked example. For f(x)=x2 and c=3:
x−3x2−9=x+3(x=3),sof′(3)=x→3lim(x+3)=6.
The cancellation is legal because the limit never looks at x=3 itself.
Worked example: the absolute value at 0. For f(x)=∣x∣ the difference quotient at 0 is x∣x∣, which is 1 for x>0 and −1 for x<0. The right-hand limit is 1, the left-hand limit is −1, so the two-sided limit does not exist. The function ∣x∣ is continuous at 0 but not differentiable there. Its graph has a corner.
Differentiable implies continuous
Theorem. If f:I→R is differentiable at c, then f is continuous at c.
Proof. For x=c,
f(x)−f(c)=x−cf(x)−f(c)⋅(x−c).
As x→c the first factor tends to f′(c) and the second tends to 0. By the product rule for limits (post 01, carried over to functions via sequences in post 02), f(x)−f(c)→f′(c)⋅0=0. So limx→cf(x)=f(c). ■
The converse is false: ∣x∣ is continuous at 0 and not differentiable there. Chapter 7 shows something much stronger: a function can be continuous everywhere and differentiable nowhere.
The linear-approximation form (Carathéodory)
The following reformulation removes every risky division from later proofs.
Lemma.f is differentiable at c if and only if there is a function φ:I→R that is continuous at c and satisfies
f(x)−f(c)=φ(x)(x−c)for all x∈I.
In that case f′(c)=φ(c).
Proof. If f′(c) exists, define φ(x)=x−cf(x)−f(c) for x=c and φ(c)=f′(c). The identity holds (at x=c both sides are 0) and φ is continuous at c by the definition of f′(c). Conversely, if such a φ exists, then for x=c the difference quotient equals φ(x), which tends to φ(c). ■
Read it as: near c, f changes by "slope times displacement", where the slope φ(x) is allowed to wobble but settles to f′(c).
Chapter 2 — Rules of differentiation
Theorem (algebra of derivatives). Let f,g be differentiable at c and k∈R. Then
(f+g)′(c)=f′(c)+g′(c) and (kf)′(c)=kf′(c);
(fg)′(c)=f′(c)g(c)+f(c)g′(c);
if g(c)=0, then (f/g)′(c)=g(c)2f′(c)g(c)−f(c)g′(c).
Proof of the product rule. Add and subtract f(x)g(c):
As x→c: f(x)→f(c) because differentiable implies continuous, and the two quotients tend to g′(c) and f′(c). ■
The sum rule is immediate from limit laws. For the quotient rule, first prove (1/g)′(c)=−g′(c)/g(c)2 (note that g(x)=0 near c by continuity), then apply the product rule.
The chain rule, done properly
Theorem (chain rule). Let g:I→R be differentiable at c, let g(I)⊆J for an interval J, and let f:J→R be differentiable at g(c). Then f∘g is differentiable at c and
and let x→c. This breaks whenever g(x)=g(c) for x arbitrarily close to c, because then you divide by zero infinitely often. That really happens: g(x)=x2sin(1/x) (with g(0)=0) takes the value 0 at x=1/(nπ) for every integer n≥1.
Correct proof. By the lemma, there is ψ continuous at d=g(c) with f(y)−f(d)=ψ(y)(y−d) for all y∈J, and ψ(d)=f′(d). There is also φ continuous at c with g(x)−g(c)=φ(x)(x−c) and φ(c)=g′(c). Put y=g(x):
The function x↦ψ(g(x))φ(x) is continuous at c: g is continuous at c, ψ is continuous at g(c), and products of functions continuous at c are continuous at c. By the lemma again, f∘g is differentiable at c with derivative ψ(g(c))φ(c)=f′(g(c))g′(c). ■
No division by g(x)−g(c) appears anywhere.
Trick: whenever a proof wants to divide by something that might be zero, try the Carathéodory form. It turns "limit of a quotient" into "continuity of a factor", and continuity composes cleanly.
Chapter 3 — Extrema, Rolle and the Mean Value Theorem
Interior extremum theorem
Theorem. Let f:(a,b)→R have a maximum (or minimum) at c∈(a,b), and let f be differentiable at c. Then f′(c)=0.
Proof (maximum case). For x>c we have f(x)−f(c)≤0 and x−c>0, so the difference quotient is ≤0; the right-hand limit gives f′(c)≤0. For x<c the numerator is ≤0 and the denominator <0, so the quotient is ≥0; the left-hand limit gives f′(c)≥0. Hence f′(c)=0. ■
Watch out: the point must be interior. f(x)=x on [0,1] has its maximum at 1 and f′(1)=1. And the converse fails: f(x)=x3 has f′(0)=0 but no extremum at 0.
Rolle's theorem
Theorem (Rolle). Let f be continuous on [a,b] and differentiable on (a,b), with f(a)=f(b). Then there is c∈(a,b) with f′(c)=0.
Proof. By the Extreme Value Theorem (post 02), f attains a maximum M and a minimum m on the compact set [a,b]. If both are attained only at the endpoints, then M=m=f(a) and f is constant, so f′(c)=0 for every c∈(a,b). Otherwise one of them is attained at some interior c, and the interior extremum theorem gives f′(c)=0. ■
All three hypotheses matter. Continuity at the endpoints: f(x)=x on [0,1) with f(1)=0. Differentiability inside: ∣x∣ on [−1,1]. Equal end values: x on [0,1].
The Mean Value Theorem
Theorem (MVT). Let f be continuous on [a,b] and differentiable on (a,b). Then there is c∈(a,b) with
f′(c)=b−af(b)−f(a).
Geometrically: somewhere the tangent line is parallel to the secant line through the end points.
Proof. Subtract the secant line. Let
h(x)=f(x)−(f(a)+b−af(b)−f(a)(x−a)).
Then h is continuous on [a,b], differentiable on (a,b), and h(a)=h(b)=0. Rolle gives c∈(a,b) with 0=h′(c)=f′(c)−b−af(b)−f(a). ■
Worked example.f(x)=x3 on [0,2]. The secant slope is 2−08−0=4. Solve f′(c)=3c2=4 in (0,2): c=32≈1.1547. The theorem only promises that such a c exists; here you can find it.
Consequences
Corollary 1 (zero derivative). If f′(x)=0 for every x in an interval I, then f is constant on I.
Proof. Take x<y in I. The MVT on [x,y] gives f(y)−f(x)=f′(c)(y−x)=0. ■
The interval matters: f(x)=sign(x) on R∖{0} has f′=0 everywhere on its domain but is not constant, because the domain is not an interval.
Corollary 2 (same derivative). If f′=g′ on an interval, then f−g is constant. This is why antiderivatives are unique "up to +C".
Corollary 3 (monotonicity). On an interval I, with f differentiable on I:
Hypothesis on the interval
Conclusion
f′≥0
f is increasing (x<y⇒f(x)≤f(y))
f′>0
f is strictly increasing
f′≤0 or f′<0
decreasing or strictly decreasing
∣f′∣≤M
∣f(x)−f(y)∣≤M∣x−y∣ (Lipschitz)
Each line is one application of f(y)−f(x)=f′(c)(y−x). The converse of line 2 fails: x3 is strictly increasing but f′(0)=0.
Worked example: a Lipschitz bound. Since ∣cos∣≤1, the last line gives ∣sina−sinb∣≤∣a−b∣ for all real a,b.
Worked example: estimating a square root. Apply the MVT to x on [100,101]: 101−10=2c1 for some c∈(100,101). Since 10<c<101,
0.04975…=21011<101−10<201=0.05.
The true value is 101−10=0.049875…, inside the bracket.
Cauchy's generalised Mean Value Theorem
Theorem (Cauchy MVT). Let f,g be continuous on [a,b] and differentiable on (a,b). Then there is c∈(a,b) with
(f(b)−f(a))g′(c)=(g(b)−g(a))f′(c).
Proof. Let h(x)=(f(b)−f(a))g(x)−(g(b)−g(a))f(x). A direct computation gives h(a)=f(b)g(a)−g(b)f(a)=h(b). Rolle gives c with h′(c)=0, which is the claim. ■
With g(x)=x this is the ordinary MVT. The version with two functions is what L'Hôpital's rule needs.
Chapter 4 — Derivatives are not arbitrary functions
A derivative that is not continuous
Let
g(x)={x2sin(1/x)0x=0,x=0.
At 0: xg(x)−g(0)=∣xsin(1/x)∣≤∣x∣→0, so g′(0)=0. For x=0 the ordinary rules give
g′(x)=2xsin(1/x)−cos(1/x).
As x→0 the first term tends to 0 but cos(1/x) oscillates between −1 and 1 for ever. So g′ exists at every point of R, yet limx→0g′(x) does not exist. A function can be differentiable everywhere with a discontinuous derivative. In the notation of Chapter 1: g is differentiable on R but g∈/C1(R).
Darboux's theorem
Discontinuous derivatives still cannot jump. They always have the intermediate value property.
Theorem (Darboux). Let f be differentiable on [a,b] (one-sided at the endpoints). If y lies strictly between f′(a) and f′(b), then there is c∈(a,b) with f′(c)=y.
Proof. Assume f′(a)<y<f′(b) (the other case is symmetric). Let g(x)=f(x)−yx. Then g is differentiable on [a,b] with g′(a)=f′(a)−y<0 and g′(b)=f′(b)−y>0. As a continuous function on [a,b], g attains a minimum at some c (EVT).
c=a: since g′(a)<0, the quotient x−ag(x)−g(a) is negative for x slightly bigger than a, so g(x)<g(a) there, and a is not a minimum.
c=b: since g′(b)>0, the quotient x−bg(x)−g(b) is positive for x slightly smaller than b; the denominator is negative, so g(x)<g(b), and b is not a minimum.
So c∈(a,b) and the interior extremum theorem gives g′(c)=0, that is, f′(c)=y. ■
Note that the proof does not use the Intermediate Value Theorem for f′, because f′ need not be continuous.
Consequence. A derivative cannot have a jump discontinuity. For example, there is no differentiable F:R→R with F′(x)=sign(x) for all x: that function takes the values −1 and 1 but never 21.
Common pitfall: "has the intermediate value property" does not imply "continuous". The derivative g′ above has the property (by Darboux) and is discontinuous at 0.
Chapter 5 — L'Hôpital's rule
Theorem (L'Hôpital, zero-over-zero form). Let f,g be differentiable on (a,b), with g′(x)=0 for all x∈(a,b). Suppose
where L∈R (the rule also holds for L=±∞). Then limx→a+g(x)f(x)=L. The same holds for x→b−, for two-sided limits, and for x→±∞.
Proof (L finite). Extend f and g to [a,b) by f(a)=g(a)=0; they are now continuous on [a,x] for each x∈(a,b). By Rolle, g(x)=0 (otherwise g′=0 somewhere in (a,x)). Cauchy's MVT on [a,x] gives cx∈(a,x) with
g(x)f(x)=g(x)−g(a)f(x)−f(a)=g′(cx)f′(cx).
Given ε>0, choose δ with g′(t)f′(t)−L<ε for a<t<a+δ. If a<x<a+δ then a<cx<a+δ too, so g(x)f(x)−L<ε. ■
The infinity-over-infinity form. The same conclusion holds if instead limx→a+∣g(x)∣=∞ (nothing more is needed about f). The proof is a little longer; see Rudin, Theorem 5.13.
Worked example. Find limx→0x3x−sinx.
f(x)=x−sinx and g(x)=x3 both tend to 0; the quotient of derivatives is 3x21−cosx, still of the form 0/0.
Differentiate again: 6xsinx, still 0/0.
Once more: 6cosx→61.
Reading the chain backwards, each step's hypotheses hold near 0: the denominators x3, 3x2, 6x have derivatives 3x2, 6x, 6, which are non-zero for x=0. So
x→0limx3x−sinx=61.
Common pitfall: the rule goes one way only. With f(x)=x+sinx and g(x)=x as x→∞, f/g=1+xsinx→1, but f′/g′=1+cosx has no limit. The rule is silent, not wrong: its hypothesis "the limit of f′/g′ exists" fails.
Watch out: check the 0/0 or ∞/∞ form first. limx→0x+2x+1=21, but "differentiating" top and bottom gives 1.
Chapter 6 — Taylor's theorem
Taylor polynomials
If f is n times differentiable at a, its Taylor polynomial of degree n at a is
It is the unique polynomial of degree at most n whose value and first n derivatives at a match those of f. P1 is the tangent line. The remainder is Rn(x)=f(x)−Pn(x). Everything useful about Taylor polynomials is a statement about Rn.
The theorem
Theorem (Taylor, Lagrange remainder). Let n≥0. Suppose f(n) is continuous on [a,b] and differentiable on (a,b). Then there is c∈(a,b) with
The same holds with b<a (then c lies between b and a). For n=0 this is exactly the MVT.
Proof. Let Pn be the Taylor polynomial at a and choose the number M so that
f(b)=Pn(b)+M(b−a)n+1.
Define g(x)=f(x)−Pn(x)−M(x−a)n+1 on [a,b]. Because Pn(k)(a)=f(k)(a) for k≤n and every derivative of order at most n of (x−a)n+1 vanishes at a,
g(a)=g′(a)=⋯=g(n)(a)=0,g(b)=0.
Rolle on [a,b] with g(a)=g(b)=0 gives x1∈(a,b) with g′(x1)=0.
Rolle on [a,x1] with g′(a)=g′(x1)=0 gives x2∈(a,x1) with g′′(x2)=0.
Continue: after n+1 steps you have xn+1∈(a,b) with g(n+1)(xn+1)=0.
(The hypotheses let each step apply Rolle: g(k) is continuous on [a,b] and differentiable on (a,b) for every k≤n.) Since Pn has degree at most n, Pn(n+1)=0, and the (n+1)-th derivative of M(x−a)n+1 is (n+1)!M. So 0=f(n+1)(xn+1)−(n+1)!M. With c=xn+1, M=(n+1)!f(n+1)(c), which is the claim. ■
The error bound you actually use. If ∣f(n+1)(t)∣≤K for all t between a and x, then
∣f(x)−Pn(x)∣≤(n+1)!K∣x−a∣n+1.
Worked example 1: the number e
Take f(x)=ex, a=0, x=1. Every derivative is ex, so Pn(1)=∑k=0nk!1 and
e−Pn(1)=(n+1)!ecfor some c∈(0,1).
You also need a bound on e that does not use this computation. The standard one is e<3: expanding (1+1/m)m with the binomial theorem shows that every term of the sequence defining e is at most ∑k=0mk!1, and since k!≥2k−1 this is at most 1+1+21+61+(81+161+…)=1235<3. With ec<e<3 you get 0<e−Pn(1)<(n+1)!3.
and the error is below 8!3=403203≈7.44×10−5. The true error is e−252685≈2.79×10−5, inside the bound. The bound is honest: it is proved, not observed.
Worked example 2: sin(0.1) with an almost sharp bound
For f=sin at a=0 the derivatives cycle through sin,cos,−sin,−cos, so
sinx=x−3!x3+5!x5−7!x7+…
The coefficient of x4 is 0, so P3=P4. Use the degree-4 remainder, which involves f(5)=cos with ∣cos∣≤1:
∣sin(0.1)−P4(0.1)∣≤5!(0.1)5=12010−5≈8.33×10−8.
Here P4(0.1)=0.1−60.001=6000599=0.0998333…, while sin(0.1)=0.0998334166…. The actual error is 8.3313×10−8, just under the bound 8.3333×10−8.
Trick: when the next Taylor coefficient is zero, the degree-n polynomial equals the degree-(n+1) one, and you may use the smaller, higher-order remainder. For sin and cos this gains a whole power of x for free.
Watch out: the bound needs K to bound f(n+1) on the whole interval between a and x, not just at a. For ex on [0,1] that is why you need e<3 first.
Chapter 7 — Smooth, analytic, and the monsters
Smooth but not analytic
Let
f(x)={e−1/x20x=0,x=0.
Claim.f is C∞ on R and f(k)(0)=0 for every k≥0.
Sketch of proof. For x=0, induction shows f(k)(x)=pk(1/x)e−1/x2 for some polynomial pk. At 0, use the definition and induction: xf(k)(x)−0=x1pk(1/x)e−1/x2, and with t=1/x this is a polynomial in t times e−t2, which tends to 0 as ∣t∣→∞ because et2 outgrows every power of t. So f(k+1)(0)=0. ■
Consequently every Taylor polynomial of f at 0 is the zero polynomial, and Rn(x)=f(x)>0 for every x=0 and every n. The Taylor series at 0 converges everywhere, to the wrong function. So "infinitely differentiable" does not imply "equal to its Taylor series". A function that equals its Taylor series near each point is called (real) analytic; this f is smooth but not analytic at 0. Taylor's theorem is not wrong here: it only claims the remainder has the Lagrange form, and here the remainder simply does not go to 0. Post 05 returns to this with power series.
Continuous but nowhere differentiable
Theorem (Weierstrass, 1872). Let 0<a<1, let b be an odd positive integer, and let ab>1+23π. Then
W(x)=n=0∑∞ancos(bnπx)
is continuous at every x∈R and differentiable at no x∈R.
For example, a=21, b=13 gives ab=6.5>1+23π≈5.712. Continuity comes from the Weierstrass M-test of post 05: ∣ancos(bnπx)∣≤an and ∑an converges, so the series converges uniformly, and uniform limits of continuous functions are continuous. The non-differentiability proof is a careful estimate of difference quotients (Hardy showed in 1916 that ab≥1 is enough). The picture to keep: the graph has corners at every scale, like ∣x∣ at 0, but everywhere.
The hierarchy
Class
Example that is in this class but not the next
continuous
∣x∣ (not differentiable at 0)
differentiable
x2sin(1/x) (derivative not continuous at 0)
C1
x∣x∣ (derivative 2∣x∣, not differentiable at 0)
C∞
e−1/x2 (not analytic at 0)
analytic
sinx, ex, polynomials
Each row is strictly larger than the next. Weierstrass's W sits in row 1 and is as far from row 2 as possible.
Practice Exercises
Exercise 1. Show that f(x)=x∣x∣ is differentiable on R with f′(x)=2∣x∣, and that f′ is not differentiable at 0.
Solution
For x>0, f(x)=x2 so f′(x)=2x; for x<0, f(x)=−x2 so f′(x)=−2x. At 0: xf(x)−f(0)=∣x∣→0, so f′(0)=0. In all cases f′(x)=2∣x∣. Then f′=2∣x∣ has a corner at 0 (difference quotients ±2), so f′′(0) does not exist. So f∈C1(R) but f is not twice differentiable.
Exercise 2. Find the point c promised by the MVT for f(x)=x on [1,4].
Solution
Secant slope 4−14−1=31. Solve f′(c)=2c1=31: c=23, so c=49=2.25, which lies in (1,4).
Exercise 3. Prove that ln(1+x)<x for every x>0.
Solution
Apply the MVT to ln(1+t) on [0,x]: ln(1+x)−ln1=1+c1x for some c∈(0,x). Since c>0, 1+c1<1, so ln(1+x)<x.
Exercise 4. Compute limx→0x21−cosx with L'Hôpital's rule, checking the hypotheses.
Solution
Both 1−cosx and x2 tend to 0, both are differentiable, and (x2)′=2x=0 for x=0. The quotient of derivatives is 2xsinx→21 (using xsinx→1, or one more application of the rule). So the limit is 21.
Exercise 5. Approximate 1.1 by the degree-2 Taylor polynomial of 1+x at 0, and prove an error bound.
Solution
f(x)=(1+x)1/2 gives f(0)=1, f′(0)=21, f′′(0)=−41, so P2(x)=1+2x−8x2 and P2(0.1)=1+0.05−0.00125=1.04875. The third derivative is f′′′(t)=83(1+t)−5/2, which is at most 83 for t∈(0,0.1). So
∣1.1−1.04875∣≤3!3/8(0.1)3=160001=6.25×10−5.
Check: 1.1=1.0488088…, an error of about 5.88×10−5. Since f′′′>0 the remainder is positive, so 1.04875 is an underestimate.
Exercise 6. Suppose f:R→R satisfies ∣f(x)−f(y)∣≤(x−y)2 for all x,y. Prove that f is constant.
Solution
For x=y, x−yf(x)−f(y)≤∣x−y∣. Letting x→y gives f′(y)=0 for every y. By Corollary 1 of the MVT on the interval R, f is constant.
Exercise 7. Can the floor function ⌊x⌋ be the derivative of some function F on [0,2]?
Solution
No. On [0,2] the floor function takes the values 0, 1 and 2 but never 21. If F′=⌊x⌋ on [0,2], Darboux's theorem on [0,1] (where F′(0)=0 and F′(1)=1) would give c with F′(c)=21. Contradiction.
Cheat-sheet
Result
Hypotheses
Conclusion
Differentiable ⇒ continuous
f′(c) exists
f continuous at c
Carathéodory form
f′(c) exists
f(x)−f(c)=φ(x)(x−c), φ continuous at c
Chain rule
g′(c) and f′(g(c)) exist
(f∘g)′(c)=f′(g(c))g′(c)
Interior extremum
max or min at interior c, f′(c) exists
f′(c)=0
Rolle
continuous on [a,b], diff. on (a,b), f(a)=f(b)
some f′(c)=0
MVT
continuous on [a,b], diff. on (a,b)
f(b)−f(a)=f′(c)(b−a)
Cauchy MVT
same, for f and g
(f(b)−f(a))g′(c)=(g(b)−g(a))f′(c)
Darboux
diff. on [a,b]
f′ has the intermediate value property
L'Hôpital
0/0 or ∞/∞, g′=0, f′/g′→L
f/g→L
Taylor (Lagrange)
f(n) continuous on [a,b], diff. on (a,b)
Rn=(n+1)!f(n+1)(c)(b−a)n+1
Error bound
∣f(n+1)∣≤K between a and x
∣Rn(x)∣≤(n+1)!K∣x−a∣n+1
Smooth but not analytic
e−1/x2
all f(k)(0)=0, Taylor series is 0
What's next
Post 04 builds the Riemann integral from scratch: partitions, upper and lower Darboux sums, the Riemann criterion, and proofs that continuous and monotone functions are integrable. The Mean Value Theorem from this post is the engine of the proof of the Fundamental Theorem of Calculus there, and a relative of x2sin(1/x) returns as a warning about what that theorem needs.
References
Stephen Abbott, Understanding Analysis, 2nd ed., Springer (Undergraduate Texts in Mathematics), 2015 — Chapter 5, "The Derivative", including Darboux's theorem and a continuous nowhere-differentiable function.
Robert G. Bartle and Donald R. Sherbert, Introduction to Real Analysis, 4th ed., Wiley, 2011 — Chapter 6, including the Carathéodory form of the chain rule.
Michael Spivak, Calculus, 4th ed., Publish or Perish, 2008 — Chapters 10–11 and 20 (Taylor polynomials and remainders).
Jiří Lebl, Basic Analysis I: Introduction to Real Analysis, free textbook — jirka.org/ra, Chapter 4.
G. H. Hardy, "Weierstrass's non-differentiable function", Transactions of the American Mathematical Society 17 (1916), 301–325.
Note: this post is in progress. Planned additions: the Peano and integral forms of the Taylor remainder, convex functions and the second-derivative test, a full proof that the Weierstrass function is nowhere differentiable, and Newton's method with its quadratic error bound.