STEMviz
Mathematics · Differential and Integral Calculus

The Derivative as a Limit: Differentiability versus Continuity

The derivative defined as a limit of a difference quotient, basic rules proved from that definition, and the precise relationship between differentiability and continuity.

The Derivative as a Limit: Differentiability versus Continuity

You have computed derivatives since secondary school using rules: the power rule, the product rule, the chain rule. This chapter goes back to what those rules are rules for — the derivative is itself defined as a limit, specifically the limit of a difference quotient — and uses the machinery of Chapters 1–2 to prove the rules rather than merely state them. The central theoretical result of the chapter is the precise relationship between differentiability and continuity: one implies the other, but not conversely, and the standard counterexamples are worth knowing cold.

Have to hand: the ε\varepsilon-δ\delta definition of a limit, the limit laws (sum, product, quotient), and the definition of continuity. Everything here is built directly on those.

The derivative is a limit, not a ratio. dydx\frac{dy}{dx} is notation, not literally a fraction of two infinitesimal quantities — hh in the difference quotient below is always a specific nonzero real number that is sent to 00 in a limit, never a mysterious "infinitely small number" in its own right.

1. The Definition

Definition. ff is differentiable at aa if the limit

f′(a)=lim⁡h→0f(a+h)−f(a)hf'(a) = \lim_{h\to0}\frac{f(a+h)-f(a)}{h}

exists (and is finite). Equivalently, substituting x=a+hx=a+h,

f′(a)=lim⁡x→af(x)−f(a)x−a.f'(a) = \lim_{x\to a}\frac{f(x)-f(a)}{x-a}.

The quantity f′(a)f'(a) is the derivative of ff at aa. If ff is differentiable at every point of a set SS, ff is differentiable on SS, and f′f' denotes the function a↦f′(a)a\mapsto f'(a).

Both forms of the definition are the same limit written with different variables; use whichever is more convenient algebraically for a given function. The quotient f(a+h)−f(a)h\frac{f(a+h)-f(a)}{h} (or f(x)−f(a)x−a\frac{f(x)-f(a)}{x-a}) is the difference quotient — the slope of the secant line through (a,f(a))(a,f(a)) and (a+h,f(a+h))(a+h, f(a+h)).

Geometric meaning. As h→0h\to0, the secant line through (a,f(a))(a,f(a)) and (a+h,f(a+h))(a+h,f(a+h)) rotates toward a limiting position: the tangent line at (a,f(a))(a,f(a)), with slope f′(a)f'(a) and equation y=f(a)+f′(a)(x−a)y = f(a) + f'(a)(x-a). This is exactly the line that best approximates ff near aa (a statement made precise by linear approximation in later chapters).

Worked example. Compute f′(3)f'(3) for f(x)=x2f(x)=x^2 directly from the definition. Using the second form,

f′(3)=lim⁡x→3x2−9x−3=lim⁡x→3(x−3)(x+3)x−3=lim⁡x→3(x+3)=6,f'(3) = \lim_{x\to3}\frac{x^2-9}{x-3} = \lim_{x\to3}\frac{(x-3)(x+3)}{x-3} = \lim_{x\to3}(x+3) = 6,

where the cancellation is valid because x≠3x\ne3 throughout the punctured limit (Chapter 1). So the tangent line to y=x2y=x^2 at (3,9)(3,9) has slope 66 and equation y=9+6(x−3)=6x−9y=9+6(x-3)=6x-9.

2. Basic Rules, Proved from the Definition

Theorem (Constant and Power Rules). If f(x)=cf(x)=c, f′(a)=0f'(a)=0 for every aa. If f(x)=xnf(x)=x^n for a positive integer nn, f′(a)=nan−1f'(a)=na^{n-1} for every aa.

Proof (power rule). Use the algebraic identity xn−an=(x−a)(xn−1+xn−2a+⋯+xan−2+an−1)x^n-a^n = (x-a)(x^{n-1}+x^{n-2}a+\cdots+xa^{n-2}+a^{n-1}), a sum of nn terms. For x≠ax\ne a,

xn−anx−a=xn−1+xn−2a+⋯+an−1.\frac{x^n-a^n}{x-a} = x^{n-1}+x^{n-2}a+\cdots+a^{n-1}.

Each of the nn terms on the right tends to an−1a^{n-1} as x→ax\to a (direct substitution, Chapter 2), so by the sum rule for limits the whole expression tends to n⋅an−1n\cdot a^{n-1}. ■\blacksquare

Theorem (Sum Rule for derivatives). If f,gf,g are differentiable at aa, so is f+gf+g, with (f+g)′(a)=f′(a)+g′(a)(f+g)'(a) = f'(a)+g'(a).

Proof. Form the difference quotient of f+gf+g and split it:

(f+g)(a+h)−(f+g)(a)h=f(a+h)−f(a)h+g(a+h)−g(a)h.\frac{(f+g)(a+h)-(f+g)(a)}{h} = \frac{f(a+h)-f(a)}{h} + \frac{g(a+h)-g(a)}{h}.

As h→0h\to0 each term on the right tends to f′(a)f'(a) and g′(a)g'(a) respectively (by hypothesis), so by the sum rule for limits (Chapter 2) the left side tends to f′(a)+g′(a)f'(a)+g'(a). ■\blacksquare

Theorem (Product Rule for derivatives). If f,gf,g are differentiable at aa, so is fgfg, with (fg)′(a)=f′(a)g(a)+f(a)g′(a)(fg)'(a) = f'(a)g(a) + f(a)g'(a).

Proof. The standard trick is to subtract and add f(a+h)g(a)f(a+h)g(a) in the numerator:

f(a+h)g(a+h)−f(a)g(a)h=f(a+h)g(a+h)−f(a+h)g(a)h+f(a+h)g(a)−f(a)g(a)h\frac{f(a+h)g(a+h) - f(a)g(a)}{h} = \frac{f(a+h)g(a+h)-f(a+h)g(a)}{h} + \frac{f(a+h)g(a) - f(a)g(a)}{h} =f(a+h)⋅g(a+h)−g(a)h+f(a+h)−f(a)h⋅g(a).= f(a+h)\cdot\frac{g(a+h)-g(a)}{h} + \frac{f(a+h)-f(a)}{h}\cdot g(a).

As h→0h\to0: the first factor f(a+h)→f(a)f(a+h)\to f(a) (by the next section's theorem, since ff is differentiable, hence continuous, at aa); the quotient in the first term tends to g′(a)g'(a); the quotient in the second term tends to f′(a)f'(a); and g(a)g(a) is constant. The product and sum rules for limits combine these to give f(a)g′(a)+f′(a)g(a)f(a)g'(a) + f'(a)g(a). ■\blacksquare

These proofs are templates: every differentiation rule you have used since school is a theorem of exactly this shape — rewrite the difference quotient algebraically, then invoke the limit laws of Chapter 2.

3. Differentiability Implies Continuity

Theorem. If ff is differentiable at aa, then ff is continuous at aa.

Proof. We must show lim⁡x→af(x)=f(a)\lim_{x\to a}f(x) = f(a), equivalently lim⁡x→a[f(x)−f(a)]=0\lim_{x\to a}[f(x)-f(a)]=0. Write, for x≠ax\ne a,

f(x)−f(a)=f(x)−f(a)x−a⋅(x−a).f(x)-f(a) = \frac{f(x)-f(a)}{x-a}\cdot(x-a).

As x→ax\to a, the first factor tends to f′(a)f'(a) (by hypothesis, a finite number) and the second factor tends to 00. By the product rule for limits,

lim⁡x→a[f(x)−f(a)]=f′(a)⋅0=0.\lim_{x\to a}[f(x)-f(a)] = f'(a)\cdot0 = 0.

Hence lim⁡x→af(x)=f(a)\lim_{x\to a}f(x) = f(a), so ff is continuous at aa. ■\blacksquare

Why finiteness of f′(a)f'(a) is load-bearing. The proof multiplies a quantity tending to f′(a)f'(a) by a quantity tending to 00; this only forces the product to 00 because f′(a)f'(a) is a finite number. This is exactly where the hypothesis "the limit defining f′(a)f'(a) exists (and is finite)" is used — nowhere else in the chapter is it this directly load-bearing.

Corollary (contrapositive, the practical form). If ff is discontinuous at aa, then ff is not differentiable at aa.

This corollary is the single most useful consequence of the theorem: it lets you rule out differentiability instantly at any point of discontinuity, without computing a difference quotient at all.

4. Continuity Does Not Imply Differentiability

The converse of Section 3's theorem is false, and the standard counterexamples are worth memorising precisely because each illustrates a different way differentiability can fail at a point where continuity still holds.

Worked example (a corner: f(x)=∣x∣f(x)=|x| at x=0x=0). ff is continuous at 00 (Chapter 2). Compute the one-sided difference quotients:

lim⁡h→0+∣h∣−0h=lim⁡h→0+hh=1,lim⁡h→0−∣h∣−0h=lim⁡h→0−−hh=−1.\lim_{h\to0^+}\frac{|h|-0}{h} = \lim_{h\to0^+}\frac{h}{h} = 1, \qquad \lim_{h\to0^-}\frac{|h|-0}{h} = \lim_{h\to0^-}\frac{-h}{h} = -1.

The one-sided limits of the difference quotient disagree (1≠−11\ne-1), so by Chapter 1's one-sided limit theorem the full limit lim⁡h→0∣h∣−0h\lim_{h\to0}\frac{|h|-0}{h} does not exist. ff is continuous but not differentiable at 00: the graph has a corner, with two different one-sided tangent directions.

Worked example (a vertical tangent: f(x)=x1/3f(x)=x^{1/3} at x=0x=0). ff is continuous at 00. The difference quotient is

h1/3−0h=1h2/3→+∞as h→0.\frac{h^{1/3}-0}{h} = \frac{1}{h^{2/3}} \to +\infty \quad\text{as } h\to0.

The difference quotient diverges to +∞+\infty rather than failing to exist by oscillation or one-sided disagreement — a genuinely different failure mode from the corner case. Geometrically the tangent line is vertical, which has no finite slope, consistent with f′(0)f'(0) failing to exist as a finite number.

Three distinct ways differentiability can fail at a point of continuity. (1) A corner: one-sided derivatives exist but disagree (∣x∣|x| at 00). (2) A vertical tangent: the difference quotient diverges to +∞+\infty or −∞-\infty (x1/3x^{1/3} at 00). The sub-case where the two one-sided quotients diverge to opposite infinities, e.g. x2/3x^{2/3} at 00, is called a cusp. (3) Oscillation: the difference quotient has no limit at all, finite or infinite, by the sequential criterion of Chapter 1 (e.g. f(x)=xsin⁡(1/x)f(x)=x\sin(1/x), f(0)=0f(0)=0, is continuous but the difference quotient sin⁡(1/h)\sin(1/h) oscillates with no limit as h→0h\to0).

5. One-Sided Derivatives

Definition. The right-hand derivative of ff at aa is f+′(a)=lim⁡h→0+f(a+h)−f(a)hf'_+(a) = \lim_{h\to0^+}\dfrac{f(a+h)-f(a)}{h}, and the left-hand derivative is f−′(a)=lim⁡h→0−f(a+h)−f(a)hf'_-(a) = \lim_{h\to0^-}\dfrac{f(a+h)-f(a)}{h}, when these one-sided limits exist.

Theorem. ff is differentiable at aa (with derivative f′(a)f'(a)) if and only if both one-sided derivatives exist and are equal, in which case f′(a)=f+′(a)=f−′(a)f'(a) = f'_+(a) = f'_-(a).

This is immediate from Chapter 1's one-sided limit theorem applied to the difference quotient itself. It gives a systematic way to analyse a piecewise function at a junction point: compute both one-sided derivatives using the formula valid on each side, and compare.

Worked example. For f(x)=x2f(x) = x^2 if x≤1x\le1, f(x)=2x−1f(x)=2x-1 if x>1x>1, check differentiability at x=1x=1. First, continuity: lim⁡x→1−x2=1\lim_{x\to1^-}x^2=1 and lim⁡x→1+(2x−1)=1\lim_{x\to1^+}(2x-1)=1 agree and equal f(1)=1f(1)=1, so ff is continuous at 11. Now the one-sided derivatives: f−′(1)=lim⁡h→0−(1+h)2−1h=lim⁡h→0−(2+h)=2f'_-(1) = \lim_{h\to0^-}\frac{(1+h)^2-1}{h} = \lim_{h\to0^-}(2+h) = 2, and f+′(1)=lim⁡h→0+2(1+h)−1−1h=lim⁡h→0+2hh=2f'_+(1) = \lim_{h\to0^+}\frac{2(1+h)-1-1}{h} = \lim_{h\to0^+}\frac{2h}{h}=2. Since f−′(1)=f+′(1)=2f'_-(1)=f'_+(1)=2, ff is differentiable at 11, with f′(1)=2f'(1)=2 — the two pieces meet not just continuously but with matching slopes.

6. Higher-Order Derivatives

If f′f' is itself differentiable at aa, its derivative is written f′′(a)f''(a) (the second derivative), and the pattern continues: f′′′(a)f'''(a), or f(n)(a)f^{(n)}(a) for the nn-th derivative, each defined as the derivative of the previous one, provided it exists. A function with f(n)f^{(n)} continuous is called CnC^n; C0C^0 means merely continuous, C∞C^\infty means infinitely differentiable (true of polynomials, sin⁡\sin, cos⁡\cos, exe^x, among others).

A subtlety worth flagging. ff differentiable does not imply f′f' is continuous, let alone differentiable again. A standard (optional, for interest) example is f(x)=x2sin⁡(1/x)f(x)=x^2\sin(1/x) for x≠0x\ne0, f(0)=0f(0)=0: one can show f′(0)=0f'(0)=0 exists, but f′f' itself is discontinuous at 00. Existence of f′f' everywhere is a strictly weaker statement than ff being C1C^1.

Common Exam Pitfalls

  • Treating "continuous" and "differentiable" as interchangeable. They are not: continuity is necessary but never sufficient for differentiability, as ∣x∣|x| at 00 shows definitively.
  • Concluding non-differentiability only from a sharp-looking graph. A vertical tangent, an oscillating difference quotient, and a simple corner are three structurally different failure modes; identify which one you are looking at by computing the actual limit, not just by inspecting a sketch.
  • Forgetting to check continuity first when continuity is already known to fail. By the contrapositive of Section 3's theorem, a discontinuity at aa instantly rules out differentiability there — computing a difference quotient afterward is unnecessary extra work.
  • Computing one-sided derivatives using the wrong side's formula. For a piecewise function, f−′(a)f'_-(a) must use the formula valid for x<ax<a, and f+′(a)f'_+(a) the formula valid for x>ax>a — using the same formula for both defeats the purpose of the check.
  • Assuming a function differentiable everywhere has a continuous derivative. f′f' existing at every point is weaker than ff being C1C^1; the oscillating-derivative example in Section 6 is the standard warning here.
  • Misreading dydx\frac{dy}{dx} as a literal ratio of infinitesimals. It is notation for a single limit, lim⁡h→0f(a+h)−f(a)h\lim_{h\to0}\frac{f(a+h)-f(a)}{h}; algebraic manipulations that treat dxdx and dydy as separately cancellable numbers need independent justification (typically from the chain rule), not blind fraction arithmetic.

Summary

  • Definition: f′(a)=lim⁡h→0f(a+h)−f(a)h=lim⁡x→af(x)−f(a)x−af'(a) = \lim_{h\to0}\dfrac{f(a+h)-f(a)}{h} = \lim_{x\to a}\dfrac{f(x)-f(a)}{x-a}, the limiting slope of secant lines, equivalently the slope of the tangent line at (a,f(a))(a,f(a)).
  • Basic rules proved from the definition: constant rule (f′=0f'=0), power rule (xn↦nxn−1x^n\mapsto nx^{n-1}, via the factored difference of nn-th powers), sum rule, and product rule (f′g+fg′f'g+fg', via the add-and-subtract trick) — every later differentiation rule follows the same proof template.
  • Differentiability   ⟹  \implies continuity: proved by writing f(x)−f(a)f(x)-f(a) as a product of the difference quotient (tending to the finite f′(a)f'(a)) and (x−a)(x-a) (tending to 00).
  • Continuity does not imply differentiability, with three structurally distinct counterexamples: a corner (disagreeing one-sided derivatives, ∣x∣|x|), a vertical tangent (difference quotient diverges, x1/3x^{1/3}), and oscillation (difference quotient has no limit at all, xsin⁡(1/x)x\sin(1/x)).
  • One-sided derivatives f±′(a)f'_\pm(a) exist analogously to one-sided limits; f′(a)f'(a) exists iff both agree.
  • Higher derivatives f′′,f′′′,f(n)f'',f''',f^{(n)} are defined iteratively; ff differentiable everywhere does not imply f′f' is itself continuous or differentiable again.