Skip to content

The Derivative: From Difference Quotients to the Chain Rule

Prerequisite:Limits and Continuity: Reading ε-δ as a Contract on Error

Raw
  • The derivative f(a)f'(a) is the limit of the difference quotient f(a+h)f(a)h\dfrac{f(a+h)-f(a)}{h} as h0h \to 0. The order of operations — divide first, then pass to the limit — is what matters; it is precisely how the difficulty of the indeterminate form 0/00/0 is avoided.
  • Differentiability is equivalent to the statement that the error committed in approximating f(a+h)f(a+h) by the linear expression f(a)+Ahf(a)+Ah tends to 00 faster than hh does. This reformulation is the gateway to the several-variable theory.
  • Differentiability implies continuity. The converse fails, and x|x| is a counterexample.
  • We derive the derivatives of xnx^n, sinx\sin x, cosx\cos x and exe^x from the definition. The only keys are two limits: limx0sinxx=1\lim_{x\to0}\frac{\sin x}{x}=1 and limh0eh1h=1\lim_{h\to0}\frac{e^h-1}{h}=1.
  • Once linearity, the product rule, the quotient rule and the chain rule have been proved, differentiating elementary functions reduces to mechanical computation. The proof of the chain rule requires a device for avoiding division by 00.
  • The rule for inverse functions, (f1)(b)=1/f(a)(f^{-1})'(b)=1/f'(a), puts logx\log x, x\sqrt{x}, arctanx\arctan x and even the real powers xαx^\alpha within reach at a single stroke.

1. Motivation: the tangent problem and instantaneous velocity

Section titled “1. Motivation: the tangent problem and instantaneous velocity”

The mathematicians of the seventeenth century carried two problems that appear at first sight unrelated: drawing a line touching a curve, the tangent problem (Fermat, Descartes), and assigning an instantaneous velocity to a motion that changes from moment to moment (Galileo, Newton). Differential calculus was born from the recognition that these two are one and the same operation.

Consider the tangent problem first. For a circle we can define a tangent as a line meeting the circle in exactly one point. That definition, however, fails completely for general curves. The parabola y=x2y=x^2 and the yy-axis share only the origin, yet we do not want to call the yy-axis a tangent. Conversely, the line y=1y=1, which ought to be the tangent to y=sinxy=\sin x at x=π/2x=\pi/2, touches the curve at the infinitely many points x=π/2+2nπx=\pi/2+2n\pi (nn an integer). And the tangent y=0y=0 to y=x3y=x^3 at the origin passes straight through the curve to the other side. A global condition on the number of shared points simply cannot capture tangency.

So we change the point of view. The line through the two points (a,f(a))(a, f(a)) and (a+h,f(a+h))(a+h, f(a+h)) on the curve — the secant — has slope

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

which is determined by division alone. If, as we bring the second point toward the first, the slope of the secant settles down to a single value, let us call that value the slope of the tangent.

Now for instantaneous velocity. If the position at time tt is x(t)x(t), then the average velocity from time aa to time a+ha+h is x(a+h)x(a)h\frac{x(a+h)-x(a)}{h}. But what is “the velocity at the instant aa”? Substituting h=0h=0 gives 00\frac{0}{0}, which means nothing. Newton’s “fluxions” and Leibniz’s “infinitesimal dxdx” involved a logically inconsistent procedure: carry out the division treating dx0dx \ne 0, and afterwards regard dxdx as 00. Berkeley attacked this fiercely in his 1734 work The Analyst, calling infinitesimals the ghosts of departed quantities.

The notion of a limit put an end to the confusion. Rather than setting hh equal to 00, carry out the division with h0h \ne 0 and then take the limit of the result as h0h \to 0. Merely interchanging the order makes the difficulty of 0/00/0 disappear. Since the slope of a secant and an average velocity are expressions of the same shape, both problems are settled by a single definition.

In what follows we take the rigorous definition of a limit (the ε\varepsilon-δ\delta formulation) as known. Consult Limits and continuity (ε\varepsilon-δ\delta arguments) as needed.

2. Preliminaries: notation and the Landau symbol

Section titled “2. Preliminaries: notation and the Landau symbol”

Throughout this article IRI \subset \mathbb{R} denotes an open interval, and all functions are real-valued. Since aIa \in I is a point of an open interval, a+hIa+h \in I holds for all sufficiently small h|h|. Hence the difference quotient f(a+h)f(a)h\frac{f(a+h)-f(a)}{h} is defined on some neighborhood of 00 with h=0h = 0 removed, and it makes sense to consider its limit as h0h\to0.

In the proofs we use the following properties of limits as known (all of them results from Limits and continuity).

Property usedContent
algebra of limits(Theorem 4.2)[Limits and Continuity]If the limits exist, the limit of a sum, difference or product is the sum, difference or product of the limits. For a quotient the same holds when the limit of the denominator is not 00
squeeze theorem(Theorem 4.3)[Limits and Continuity]If gfhg \le f \le h and the limits of gg and hh agree, then ff has the same limit
composition with a continuous function(Theorem 5.3)[Limits and Continuity]If u(x)bu(x) \to b as xax \to a and φ\varphi is continuous at bb, then φ(u(x))φ(b)\varphi(u(x)) \to \varphi(b)
continuity of polynomials and rational functions(Corollary 5.2)[Limits and Continuity]Continuous at every point where the denominator is not 00

To speak concisely about the size of an error, we introduce the following notation.

Definition 2.1Landau's little-o

Let rr be a function defined on some punctured neighborhood of 00. If

limh0r(h)h=0\lim_{h \to 0} \frac{r(h)}{h} = 0

holds, we write r(h)=o(h) (h0)r(h) = o(h) \ (h \to 0) and say that rr is an infinitesimal of higher order than hh. More generally, when limh0r(h)/hn=0\lim_{h\to0} r(h)/h^{n} = 0 we write r(h)=o(hn)r(h)=o(h^n).

This “equation” does not assert that the left-hand side equals the right-hand side; it is an abuse of notation meaning “the function on the left is one of the functions with this property”. Accordingly, a formula such as o(h)+o(h)=o(h)o(h)+o(h)=o(h) is to be read from left to right. Indeed, if r1(h)/h0r_1(h)/h \to 0 and r2(h)/h0r_2(h)/h \to 0, then (r1(h)+r2(h))/h0+0=0(r_1(h)+r_2(h))/h \to 0+0=0, so the assertion follows from the limit law for sums alone. Likewise co(h)=o(h)c \cdot o(h) = o(h) for any constant cc.

3. The derivative at a point and the derivative function

Section titled “3. The derivative at a point and the derivative function”

Definition 3.1The derivative at a point

Let II be an open interval, f ⁣:IRf \colon I \to \mathbb{R} and aIa \in I. If the limit

limh0f(a+h)f(a)h\lim_{h \to 0} \frac{f(a+h)-f(a)}{h}

exists as a finite real number, we say that ff is differentiable at the point aa, and we call this limit the derivative of ff at aa, written f(a)f'(a).

Putting x=a+hx = a+h, the conditions h0h \to 0 and xax \to a are the same, so we may also write

f(a)=limxaf(x)f(a)xa.f'(a) = \lim_{x \to a} \frac{f(x)-f(a)}{x-a} .

We choose whichever form is more convenient for the proof at hand.

When ff is differentiable at aa, we define the line

y=f(a)+f(a)(xa)y = f(a) + f'(a)(x-a)

to be the tangent line to the graph of y=f(x)y=f(x) at the point (a,f(a))(a,f(a)). Note the order of ideas: we do not define the word “touch” first and then compute a slope. Rather, the existence of the limit of secant slopes is what we call differentiability, and the line with that limit as its slope is what we call the tangent. As we saw in §1, a definition by counting shared points is useless.

aa + hhf(a+h) - f(a)y = f(x)secanttangent
The slope of the tangent is defined as the limit of the slopes of secants

Example 3.2The tangent to a parabola, from the definition

Let f(x)=x2f(x)=x^2 and compute the derivative at an arbitrary aRa \in \mathbb{R} straight from the definition. For h0h \ne 0,

f(a+h)f(a)h=(a+h)2a2h=2ah+h2h=2a+h.\frac{f(a+h)-f(a)}{h} = \frac{(a+h)^2 - a^2}{h} = \frac{2ah + h^2}{h} = 2a + h .

Along the way we cancelled a factor hh; this is legitimate precisely because the difference quotient is only ever considered for h0h \ne 0. The last expression is a linear function of hh, so it converges to 2a2a as h0h \to 0. Hence ff is differentiable at every point and f(a)=2af'(a)=2a.

The tangent at a=1a=1 is y=1+2(x1)=2x1y = 1 + 2(x-1) = 2x-1. Checking the shared points for good measure, x2(2x1)=(x1)2=0x^2 - (2x-1) = (x-1)^2 = 0 gives only x=1x=1; but as explained in §1, this property of meeting the curve at a single point is not the reason the line is a tangent — it merely happens to hold.

Definition 3.3The derivative function and higher derivatives

If f ⁣:IRf \colon I \to \mathbb{R} is differentiable at every point of II, we say that ff is differentiable on II, and we call the function f ⁣:IRf' \colon I \to \mathbb{R} assigning f(x)f'(x) to each xIx \in I the derivative of ff. It is also written dfdx\dfrac{df}{dx}, ddxf(x)\dfrac{d}{dx}f(x) or DfDf.

If moreover ff' is differentiable on II, its derivative is written f=(f)f'' = (f')' and called the second derivative. In general we define inductively f(0)=ff^{(0)}=f and f(n)=(f(n1))f^{(n)} = (f^{(n-1)})', and call f(n)f^{(n)} the nn-th derivative. When f(n)f^{(n)} exists and is in addition continuous, ff is said to be of class CnC^n.

Differentiability imposes a fairly strong constraint on a function. The first thing we can see is the following.

Theorem 3.4Differentiability implies continuity

Let II be an open interval, f ⁣:IRf \colon I \to \mathbb{R} and aIa \in I. If ff is differentiable at aa, then ff is continuous at aa.

Proof(Theorem 3.4)

For h0h \ne 0 we have the identity obtained by multiplying the difference quotient back by hh:

f(a+h)f(a)=f(a+h)f(a)hh.f(a+h) - f(a) = \frac{f(a+h)-f(a)}{h} \cdot h .

By hypothesis the first factor on the right converges to f(a)f'(a) as h0h \to 0, and the second converges to 00. By the limit law for products (§2), the right-hand side converges to f(a)0=0f'(a) \cdot 0 = 0. Hence limh0f(a+h)=f(a)\lim_{h\to0} f(a+h) = f(a), which is exactly the statement that ff is continuous at aa.

We shall use this theorem repeatedly in what follows. In the proof of the product rule, for example, we need the step ”g(a+h)g(a)g(a+h) \to g(a) because gg is differentiable”, and there we invoke Theorem 3.4.

The converse fails.

Example 3.5The absolute value is not differentiable at the origin

Let f(x)=xf(x)=|x|. This ff is continuous on R\mathbb{R}. But the difference quotient at a=0a=0 is

f(0+h)f(0)h=hh={1(h>0)1(h<0)\frac{f(0+h)-f(0)}{h} = \frac{|h|}{h} = \begin{cases} 1 & (h > 0) \\ -1 & (h < 0) \end{cases}

so the right-hand limit is 11 and the left-hand limit is 1-1. Since the two disagree, the limit as h0h \to 0 does not exist and ff is not differentiable at 00. Where the graph has a corner, the slopes of the secants settle on different values according as we approach from the right or from the left.

Remark 3.6

The gap between continuity and differentiability is in fact not merely a matter of “finitely many corners”. In 1872 Weierstrass constructed a function on R\mathbb{R} that is continuous everywhere and differentiable nowhere (of the form n=0ancos(bnπx)\sum_{n=0}^{\infty} a^n \cos(b^n \pi x)). Differentiability is a far stronger condition than continuity.

4. Differentiability as linear approximation

Section titled “4. Differentiability as linear approximation”

The definition by a limit of difference quotients is convenient for computation, but because it involves dividing by hh it cannot be transferred as it stands to several variables, where hh becomes a vector. So let us prepare an equivalent reformulation in which no division appears. It is at the same time an answer to the question of what operation differentiation really performs.

Theorem 4.1Differentiability and linear approximation

Let II be an open interval, f ⁣:IRf \colon I \to \mathbb{R}, aIa \in I and ARA \in \mathbb{R}. The following two conditions are equivalent.

(i) ff is differentiable at aa and f(a)=Af'(a) = A.

(ii) Setting r(h):=f(a+h)f(a)Ahr(h) := f(a+h) - f(a) - Ah, we have r(h)=o(h) (h0)r(h) = o(h) \ (h \to 0); that is, f(a+h)=f(a)+Ah+o(h)f(a+h) = f(a) + Ah + o(h).

Moreover, a real number AA satisfying condition (ii) is unique if it exists.

Proof(Theorem 4.1)

Since aa is a point of the open interval II, there is a ρ>0\rho > 0 such that 0<h<ρ0 < |h| < \rho implies a+hIa + h \in I. For hh in this range, dividing both sides of the definition of r(h)r(h) by hh (0\ne 0) gives the identity

r(h)h=f(a+h)f(a)hA.\frac{r(h)}{h} = \frac{f(a+h)-f(a)}{h} - A .

By the limit law for sums, the statement that the left-hand side converges to 00 as h0h \to 0 and the statement that the first term on the right converges to AA are equivalent (the constant AA passes through the limit). This is the equivalence of (i) and (ii).

Now uniqueness. Suppose AA and BB both satisfy (ii), with corresponding errors rA,rBr_A, r_B. Taking the difference, for 0<h<ρ0 < |h| < \rho,

(BA)h=rA(h)rB(h).(B - A) h = r_A(h) - r_B(h) .

Dividing both sides by hh gives BA=rA(h)hrB(h)hB - A = \dfrac{r_A(h)}{h} - \dfrac{r_B(h)}{h}, and the right-hand side converges to 00=00 - 0 = 0 as h0h \to 0. The left-hand side is a constant independent of hh, and the limit of a constant function is that constant itself; by uniqueness of limits, BA=0B - A = 0, that is, A=BA = B.

Theorem 4.1 says that differentiability means: the error made in replacing ff locally by a linear function is an infinitesimal of higher order than hh. And f(a)f'(a) is the slope of that best linear function. Since no division by hh appears in this form, replacing hh by a vector and AA by a linear map turns it directly into the definition of the derivative in several variables. For details see the definition of total differentiability(Definition 4.1)[多変数関数の微分と偏微分] in Differentiation in several variables and partial derivatives.

Differentiating the trigonometric functions and the exponential function each reduces to a single limit. We begin with the trigonometric case. From here on, angles are always measured in radians.

Lemma 5.1The basic trigonometric limits

limx0sinxx=1,limx01cosxx=0.\lim_{x \to 0} \frac{\sin x}{x} = 1, \qquad \lim_{x \to 0} \frac{1-\cos x}{x} = 0 .
Proof(Lemma 5.1)

Suppose first that 0<x<π/20 < x < \pi/2. Take the center OO of the unit circle, the point A=(1,0)A=(1,0) on the xx-axis and the point P=(cosx,sinx)P=(\cos x, \sin x) on the circle, and let T=(1,tanx)T=(1,\tan x) be the intersection of the tangent at AA with the ray OPOP. The triangle OAPOAP, the circular sector OAPOAP and the triangle OATOAT are nested in this order, so their areas satisfy

12sinx    x2    12tanx\frac{1}{2}\sin x \;\le\; \frac{x}{2} \;\le\; \frac{1}{2}\tan x

(the area of the sector is x/2x/2, since the radius is 11 and the central angle is xx radians). Multiplying each side by 22 and dividing by sinx>0\sin x > 0 gives

1xsinx1cosx.1 \le \frac{x}{\sin x} \le \frac{1}{\cos x} .

For 0<x<π/20 < x < \pi/2 every side is positive, so taking reciprocals and reversing the inequalities yields

cosxsinxx1.\cos x \le \frac{\sin x}{x} \le 1 .

Since cos\cos is continuous with cos0=1\cos 0 = 1, the squeeze theorem (§2) gives the right-hand limit limx+0sinxx=1\lim_{x \to +0} \frac{\sin x}{x} = 1. Moreover sin(x)x=sinxx=sinxx\frac{\sin(-x)}{-x} = \frac{-\sin x}{-x} = \frac{\sin x}{x}, so the quotient is an even function and the left-hand limit is 11 as well. The two one-sided limits agree, and the first assertion follows.

The second assertion reduces to the first. Using 1cos2x=sin2x1 - \cos^2 x = \sin^2 x and 1+cosx01 + \cos x \ne 0 (for x<π/2|x| < \pi/2 we have cosx>0\cos x > 0), we rewrite

1cosxx=(1cosx)(1+cosx)x(1+cosx)=sin2xx(1+cosx)=sinxxsinx1+cosx.\frac{1-\cos x}{x} = \frac{(1-\cos x)(1+\cos x)}{x(1+\cos x)} = \frac{\sin^2 x}{x(1+\cos x)} = \frac{\sin x}{x} \cdot \frac{\sin x}{1+\cos x} .

As x0x \to 0 the first factor tends to 11, and the second tends to 01+1=0\frac{0}{1+1} = 0 by the continuity of sin\sin and cos\cos together with the limit law for quotients. By the limit law for products the whole expression tends to 10=01 \cdot 0 = 0.

Remark 5.2

This proof grants the geometric fact that the area of the sector is x/2x/2. But defining arc length and area rigorously requires integration, and the computation of those integrals often uses the derivatives of the trigonometric functions. Depending on how a textbook is organized, the argument can therefore become circular. The standard way to avoid this is to define sin\sin and cos\cos, not geometrically, but by the power series

sinx=k=0(1)kx2k+1(2k+1)!,cosx=k=0(1)kx2k(2k)!\sin x = \sum_{k=0}^{\infty} \frac{(-1)^k x^{2k+1}}{(2k+1)!}, \qquad \cos x = \sum_{k=0}^{\infty} \frac{(-1)^k x^{2k}}{(2k)!}

and to rebuild radians and π\pi from there. Along that road, Lemma 5.1 follows directly from estimates on the series (exactly the same argument as the treatment of the exponential function below). For the definition by series see Series and convergence tests, and for the relation between area and integration see The fundamental theorem of calculus and the definite integral.

Next, the exponential function. Here we take exp\exp to be defined by the power series

exp(x):=n=0xnn!(xR)\exp(x) := \sum_{n=0}^{\infty} \frac{x^n}{n!} \qquad (x \in \mathbb{R})

and we use the following two facts, established in Series and convergence tests. First, this series converges absolutely for every xx (d'Alembert's ratio test(Theorem 6.2)[級数と収束判定]). Second, the addition formula exp(x+y)=exp(x)exp(y)\exp(x+y) = \exp(x)\exp(y) holds (the Cauchy product of absolutely convergent(Definition 7.1)[級数と収束判定] series). We set e:=exp(1)=2.71828e := \exp(1) = 2.71828\ldots and from now on also write exp(x)\exp(x) as exe^x.

Lemma 5.3The basic limit for the exponential

limh0eh1h=1.\lim_{h \to 0} \frac{e^h - 1}{h} = 1 .
Proof(Lemma 5.3)

First we check that e<3e < 3. For n1n \ge 1 we have n!=123n2n1n! = 1\cdot 2 \cdot 3 \cdots n \ge 2^{n-1}, so

e=n=01n!1+n=112n1=1+2=3,e = \sum_{n=0}^{\infty} \frac{1}{n!} \le 1 + \sum_{n=1}^{\infty} \frac{1}{2^{n-1}} = 1 + 2 = 3 ,

and since the inequality is strict from n=3n=3 on, e<3e < 3.

Next let 0<h10 < |h| \le 1. Separating the first two terms of the series gives eh1h=n=2hnn!e^h - 1 - h = \sum_{n=2}^{\infty} \frac{h^n}{n!}, so by the triangle inequality (term-by-term estimation is permitted because the series converges absolutely),

eh1hn=2hnn!=h2n=2hn2n!.|e^h - 1 - h| \le \sum_{n=2}^{\infty} \frac{|h|^n}{n!} = |h|^2 \sum_{n=2}^{\infty} \frac{|h|^{n-2}}{n!} .

Here, for n2n \ge 2 we have n!=n(n1)(n2)!2(n2)!n! = n(n-1)\cdot(n-2)! \ge 2 \cdot (n-2)!, hence 1n!12(n2)!\frac{1}{n!} \le \frac{1}{2 \cdot (n-2)!}. Substituting m=n2m = n-2,

n=2hn2n!12m=0hmm!=12exp(h).\sum_{n=2}^{\infty} \frac{|h|^{n-2}}{n!} \le \frac{1}{2}\sum_{m=0}^{\infty} \frac{|h|^{m}}{m!} = \frac{1}{2}\exp(|h|) .

For 0h10 \le |h| \le 1 each term satisfies hmm!1m!\frac{|h|^m}{m!} \le \frac{1}{m!}, so exp(h)e<3\exp(|h|) \le e < 3. Putting all of this together,

eh1h32h2(0<h1),|e^h - 1 - h| \le \frac{3}{2}h^2 \qquad (0 < |h| \le 1) ,

and dividing both sides by h|h|,

eh1h132h.\left| \frac{e^h-1}{h} - 1 \right| \le \frac{3}{2}|h| .

Hence, given ε>0\varepsilon > 0, taking δ:=min{1, 2ε/3}\delta := \min\{1,\ 2\varepsilon/3\} makes the left-hand side at most 32h<32δε\frac{3}{2}|h| < \frac{3}{2}\delta \le \varepsilon for every hh with 0<h<δ0 < |h| < \delta. This is precisely the definition of the required limit.

Theorem 5.4Derivatives of the basic functions

The following hold.

(1) Let nn be a positive integer and f(x)=xnf(x)=x^n (xRx \in \mathbb{R}). Then ff is differentiable at every point of R\mathbb{R} with f(x)=nxn1f'(x) = n x^{n-1}. Here, for n=1n=1 we adopt the convention x0=1x^0 = 1 (including 11 at x=0x=0).

(2) sin\sin is differentiable at every point of R\mathbb{R} with (sin)(x)=cosx(\sin)'(x) = \cos x.

(3) cos\cos is differentiable at every point of R\mathbb{R} with (cos)(x)=sinx(\cos)'(x) = -\sin x.

(4) exp\exp is differentiable at every point of R\mathbb{R} with (exp)(x)=exp(x)=ex(\exp)'(x) = \exp(x) = e^x.

Proof(Theorem 5.4)

(1) Fix aRa \in \mathbb{R}. Let us verify the factorization, valid for xax \ne a,

xnan=(xa)k=0n1xkan1k.x^n - a^n = (x-a)\sum_{k=0}^{n-1} x^k a^{n-1-k} .

Distributing (xa)(x-a) over the sum on the right gives

k=0n1xk+1an1kk=0n1xkank,\sum_{k=0}^{n-1} x^{k+1} a^{n-1-k} - \sum_{k=0}^{n-1} x^{k} a^{n-k} ,

and substituting j=k+1j = k+1 in the first sum turns it into j=1nxjanj\sum_{j=1}^{n} x^{j} a^{n-j}. The second sum is j=0n1xjanj\sum_{j=0}^{n-1} x^{j}a^{n-j}, so the overlapping terms j=1,,n1j=1,\ldots,n-1 cancel, leaving only the term xnx^n with j=nj=n and the term an-a^n with j=0j=0. This proves the factorization.

Consequently, for xax \ne a,

f(x)f(a)xa=xnanxa=k=0n1xkan1k.\frac{f(x)-f(a)}{x-a} = \frac{x^n - a^n}{x-a} = \sum_{k=0}^{n-1} x^k a^{n-1-k} .

The right-hand side is a polynomial in xx, hence continuous (§2), and as xax \to a it converges to

k=0n1akan1k=k=0n1an1=nan1.\sum_{k=0}^{n-1} a^k a^{n-1-k} = \sum_{k=0}^{n-1} a^{n-1} = n a^{n-1} .

Since aa was arbitrary, (1) is proved.

(2) For aRa \in \mathbb{R} and h0h \ne 0, the addition formula sin(a+h)=sinacosh+cosasinh\sin(a+h) = \sin a \cos h + \cos a \sin h gives

sin(a+h)sinah=sinacosh1h+cosasinhh.\frac{\sin(a+h)-\sin a}{h} = \sin a \cdot \frac{\cos h - 1}{h} + \cos a \cdot \frac{\sin h}{h} .

By Lemma 5.1, the fraction in the first term is 1coshh0-\frac{1-\cos h}{h} \to 0 and the fraction in the second term tends to 11; by the limit laws for sums and products the whole expression converges to sina0+cosa1=cosa\sin a \cdot 0 + \cos a \cdot 1 = \cos a.

(3) Similarly, from cos(a+h)=cosacoshsinasinh\cos(a+h) = \cos a \cos h - \sin a \sin h,

cos(a+h)cosah=cosacosh1hsinasinhhcosa0sina1=sina.\frac{\cos(a+h)-\cos a}{h} = \cos a \cdot \frac{\cos h - 1}{h} - \sin a \cdot \frac{\sin h}{h} \longrightarrow \cos a \cdot 0 - \sin a \cdot 1 = -\sin a .

(4) From the addition formula ea+h=eaehe^{a+h} = e^a e^h, for h0h \ne 0,

ea+heah=eaeh1h.\frac{e^{a+h}-e^{a}}{h} = e^{a}\cdot\frac{e^{h}-1}{h} .

Here eae^a is a constant independent of hh, and by Lemma 5.3 the fraction on the right converges to 11; by the limit law for products the whole expression converges to eae^a.

Part (4) of Theorem 5.4 shows that exp\exp has the remarkable property of being unchanged by differentiation. This is why the exponential function turns up everywhere in the theory of differential equations.

Returning to the definition every time we wish to differentiate a particular function is not practical. The following theorem decomposes differentiation into “derivatives of the parts” and “rules for assembling them”.

Theorem 6.1Linearity, the product rule and the quotient rule

Let II be an open interval, f,g ⁣:IRf, g \colon I \to \mathbb{R} and aIa \in I, and suppose both ff and gg are differentiable at aa. Then the following hold.

(1) (Linearity) For all real numbers α,β\alpha, \beta, the function αf+βg\alpha f + \beta g is differentiable at aa and

(αf+βg)(a)=αf(a)+βg(a).(\alpha f + \beta g)'(a) = \alpha f'(a) + \beta g'(a) .

(2) (Product rule) The product fgfg is differentiable at aa and

(fg)(a)=f(a)g(a)+f(a)g(a).(fg)'(a) = f'(a)g(a) + f(a)g'(a) .

(3) (Quotient rule) If moreover g(a)0g(a) \ne 0, then gg has no zero on some open interval containing aa; the function f/gf/g defined there is differentiable at aa and

(fg)(a)=f(a)g(a)f(a)g(a)g(a)2.\left(\frac{f}{g}\right)'(a) = \frac{f'(a)g(a) - f(a)g'(a)}{g(a)^2} .
Proof(Theorem 6.1)

(1) For h0h \ne 0, the definition of the difference quotient gives

(αf+βg)(a+h)(αf+βg)(a)h=αf(a+h)f(a)h+βg(a+h)g(a)h.\frac{(\alpha f + \beta g)(a+h) - (\alpha f + \beta g)(a)}{h} = \alpha\cdot\frac{f(a+h)-f(a)}{h} + \beta\cdot\frac{g(a+h)-g(a)}{h} .

By hypothesis the two difference quotients on the right converge to f(a)f'(a) and g(a)g'(a) respectively, so by the limit laws for sums and scalar multiples the left-hand side converges to αf(a)+βg(a)\alpha f'(a)+\beta g'(a).

(2) We add and subtract f(a)g(a+h)f(a)g(a+h) in the numerator of the difference quotient. For h0h \ne 0,

f(a+h)g(a+h)f(a)g(a)h=f(a+h)g(a+h)f(a)g(a+h)+f(a)g(a+h)f(a)g(a)h=f(a+h)f(a)hg(a+h)  +  f(a)g(a+h)g(a)h.\begin{aligned} \frac{f(a+h)g(a+h) - f(a)g(a)}{h} &= \frac{f(a+h)g(a+h) - f(a)g(a+h) + f(a)g(a+h) - f(a)g(a)}{h} \\ &= \frac{f(a+h)-f(a)}{h}\, g(a+h) \;+\; f(a)\,\frac{g(a+h)-g(a)}{h} . \end{aligned}

In the first term the difference quotient converges to f(a)f'(a) and g(a+h)g(a+h) converges to g(a)g(a); the latter holds because gg, being differentiable at aa, is continuous at aa by Theorem 3.4. This is the place where “differentiability implies continuity” is used. The second term is the product of the constant f(a)f(a) with a difference quotient converging to g(a)g'(a). By the limit laws for products and sums, the whole expression converges to f(a)g(a)+f(a)g(a)f'(a)g(a) + f(a)g'(a).

(3) First we confirm that f/gf/g is defined near aa. By Theorem 3.4, gg is continuous at aa, so taking ε=g(a)/2>0\varepsilon = |g(a)|/2 > 0 in the definition of continuity, there is a δ>0\delta > 0 such that xa<δ|x-a| < \delta (with xIx \in I) implies g(x)g(a)<g(a)/2|g(x)-g(a)| < |g(a)|/2. Then the triangle inequality gives

g(x)g(a)g(x)g(a)>g(a)g(a)2=g(a)2>0,|g(x)| \ge |g(a)| - |g(x)-g(a)| > |g(a)| - \frac{|g(a)|}{2} = \frac{|g(a)|}{2} > 0 ,

so gg has no zero on this neighborhood, and f/gf/g is defined there.

Next we differentiate 1/g1/g. For h0h \ne 0 with h<δ|h| < \delta, placing the terms over a common denominator gives

1h(1g(a+h)1g(a))=1hg(a)g(a+h)g(a+h)g(a)=1g(a+h)g(a)g(a+h)g(a)h.\frac{1}{h}\left(\frac{1}{g(a+h)} - \frac{1}{g(a)}\right) = \frac{1}{h}\cdot\frac{g(a)-g(a+h)}{g(a+h)g(a)} = -\frac{1}{g(a+h)g(a)}\cdot\frac{g(a+h)-g(a)}{h} .

As h0h \to 0 we have g(a+h)g(a)0g(a+h) \to g(a) \ne 0 (again by Theorem 3.4), so by the limit law for quotients the first factor converges to 1g(a)2-\frac{1}{g(a)^2} and the second to g(a)g'(a). Hence 1/g1/g is differentiable at aa with (1g)(a)=g(a)g(a)2\left(\frac{1}{g}\right)'(a) = -\frac{g'(a)}{g(a)^2}.

Finally, regarding fg=f1g\frac{f}{g} = f \cdot \frac{1}{g} and applying (2),

(fg)(a)=f(a)1g(a)+f(a)(g(a)g(a)2)=f(a)g(a)f(a)g(a)g(a)2.\left(\frac{f}{g}\right)'(a) = f'(a)\cdot\frac{1}{g(a)} + f(a)\cdot\left(-\frac{g'(a)}{g(a)^2}\right) = \frac{f'(a)g(a) - f(a)g'(a)}{g(a)^2} .

That the product rule is not f(a)g(a)f'(a)g'(a) can be made plausible by a picture of areas. A rectangle with side lengths ff and gg has area fgfg. Stretching the two sides by Δf\Delta f and Δg\Delta g respectively increases the area by “the strip added horizontally, Δfg\Delta f \cdot g”, plus “the strip added vertically, fΔgf \cdot \Delta g”, plus “the small rectangle in the corner, ΔfΔg\Delta f \cdot \Delta g”. The last term is of second order in hh, so it is o(h)o(h) and vanishes; the two remaining strips correspond to the two terms of the product rule.

Example 6.2Negative powers, the tangent, rational functions

(a) Negative integer powers. Let nn be a positive integer and x0x \ne 0. Taking f1f \equiv 1 (a constant function; f=0f' = 0 follows at once from the definition) and g(x)=xng(x)=x^n in Theorem 6.1 (3),

(1xn)=0xn1nxn1(xn)2=nxn1x2n=nxn1.\left(\frac{1}{x^n}\right)' = \frac{0 \cdot x^n - 1 \cdot n x^{n-1}}{(x^n)^2} = -\frac{n x^{n-1}}{x^{2n}} = -n x^{-n-1} .

Writing m=nm=-n, this reads (xm)=mxm1(x^m)' = m x^{m-1}. Including the case m=0m=0 of a constant function, we have now established the formula (xm)=mxm1(x^m)'=mx^{m-1} for every integer mm, at every x0x \ne 0.

(b) The tangent function. For xx with cosx0\cos x \ne 0 we have tanx=sinxcosx\tan x = \frac{\sin x}{\cos x}. By Theorem 6.1 (3) and Theorem 5.4 (2)(3),

(tan)(x)=cosxcosxsinx(sinx)cos2x=cos2x+sin2xcos2x=1cos2x=1+tan2x.(\tan)'(x) = \frac{\cos x \cdot \cos x - \sin x \cdot(-\sin x)}{\cos^2 x} = \frac{\cos^2 x + \sin^2 x}{\cos^2 x} = \frac{1}{\cos^2 x} = 1 + \tan^2 x .

The last equality comes from reading cos2x+sin2xcos2x\frac{\cos^2 x + \sin^2 x}{\cos^2 x} as a split into 1+tan2x1 + \tan^2 x.

(c) A rational function. For x1x \ne 1 let F(x)=x2+1x1F(x) = \dfrac{x^2+1}{x-1}. The numerator has derivative 2x2x and the denominator has derivative 11, so

F(x)=2x(x1)(x2+1)1(x1)2=2x22xx21(x1)2=x22x1(x1)2.F'(x) = \frac{2x(x-1) - (x^2+1)\cdot 1}{(x-1)^2} = \frac{2x^2 - 2x - x^2 - 1}{(x-1)^2} = \frac{x^2-2x-1}{(x-1)^2} .

7. Differentiating composites (the chain rule)

Section titled “7. Differentiating composites (the chain rule)”

The remaining assembly rule concerns the composite xf(g(x))x \mapsto f(g(x)). Intuitively, gg magnifies a change in the input by the factor g(a)g'(a) and ff magnifies the result by a further factor f(g(a))f'(g(a)), so the overall magnification should be the product of the two.

flowchart LR
A["change in x: h"] -->|"magnification by g: g'(a)"| B["change in u: about g'(a)h"] -->|"magnification by f: f'(g(a))"| C["change in y: about f'(g(a))g'(a)h"]
The chain rule: rates of change compose as a product of magnification factors

Remark 7.1

Naively it looks as though it would suffice to split the difference quotient as

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

and pass to the limit. But this expression loses its meaning for those hh with g(a+h)=g(a)g(a+h) = g(a), where the denominator becomes 00. Nor can we claim that this never happens for hh sufficiently close to 00. The function g(x)=x2sin(1/x)g(x) = x^2 \sin(1/x) (with g(0)=0g(0)=0) treated in Example 7.5 is differentiable at a=0a=0, yet g(1/(nπ))=0=g(0)g(1/(n\pi)) = 0 = g(0) for every n=1,2,n = 1, 2, \ldots, so the denominator vanishes arbitrarily close to 00. The proof therefore needs a different tool.

Theorem 7.2The chain rule

Let I,JI, J be open intervals, g ⁣:IRg \colon I \to \mathbb{R} and f ⁣:JRf \colon J \to \mathbb{R} with g(I)Jg(I) \subset J. Suppose gg is differentiable at aIa \in I and ff is differentiable at b:=g(a)b := g(a). Then the composite fg ⁣:IRf \circ g \colon I \to \mathbb{R} is differentiable at aa and

(fg)(a)=f(g(a))g(a).(f \circ g)'(a) = f'(g(a))\, g'(a) .
Proof(Theorem 7.2)

Define an auxiliary function φ ⁣:JR\varphi \colon J \to \mathbb{R} by

φ(y):={f(y)f(b)yb(yb)f(b)(y=b)\varphi(y) := \begin{cases} \dfrac{f(y)-f(b)}{y-b} & (y \ne b) \\ f'(b) & (y = b) \end{cases}

This φ\varphi has the following two properties.

First, φ\varphi is continuous at bb. Indeed, limybφ(y)\lim_{y \to b}\varphi(y) is exactly the limit of the difference quotient of ff at bb, which by the hypothesis that ff is differentiable at bb equals f(b)=φ(b)f'(b) = \varphi(b). The value assigned to φ\varphi at y=by=b was chosen precisely so as to make it continuous.

Second, for every yJy \in J,

f(y)f(b)=φ(y)(yb).f(y) - f(b) = \varphi(y)\,(y-b) .

For yby \ne b this is just the defining formula for φ\varphi with the denominator cleared, and for y=by = b both sides are 00. Rewriting things in this “multiplicative” form is what removes the danger of dividing by 00.

Now take h0h \ne 0 with a+hIa + h \in I and substitute y=g(a+h)Jy = g(a+h) \in J into the identity above:

f(g(a+h))f(g(a))=φ(g(a+h))(g(a+h)g(a)).f(g(a+h)) - f(g(a)) = \varphi(g(a+h))\,\bigl(g(a+h)-g(a)\bigr) .

Dividing both sides by hh (0\ne 0),

f(g(a+h))f(g(a))h=φ(g(a+h))g(a+h)g(a)h.\frac{f(g(a+h)) - f(g(a))}{h} = \varphi(g(a+h)) \cdot \frac{g(a+h)-g(a)}{h} .

The essential point is that this identity remains correct even for those hh with g(a+h)=g(a)g(a+h) = g(a), both sides then being 00.

It remains to let h0h \to 0. Since gg is differentiable at aa, it is continuous at aa by Theorem 3.4, so g(a+h)g(a)=bg(a+h) \to g(a) = b. As φ\varphi is continuous at bb, the limit property for composition with a continuous function (§2) gives φ(g(a+h))φ(b)=f(b)\varphi(g(a+h)) \to \varphi(b) = f'(b). The second factor converges to g(a)g'(a) by definition. By the limit law for products,

limh0f(g(a+h))f(g(a))h=f(b)g(a)=f(g(a))g(a),\lim_{h\to0}\frac{f(g(a+h)) - f(g(a))}{h} = f'(b)\,g'(a) = f'(g(a))\,g'(a) ,

which says that fgf\circ g is differentiable at aa with derivative the right-hand side.

Remark 7.3

In Leibniz notation, setting y=f(u)y = f(u) and u=g(x)u = g(x), the chain rule reads

dydx=dydududx.\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx} .

Its power lies in looking like the cancellation of fractions, which makes it hard to go wrong when changing variables. Bear in mind, however, that at this stage dydy and dudu are not quantities with a meaning of their own: dydu\frac{dy}{du} is a single symbol meaning “differentiate with respect to uu”. The appearance of cancellation is a happy encoding of the conclusion of Theorem 7.2, not a proof of it. Do not forget either the convention that dydu\frac{dy}{du} denotes the value at u=g(x)u = g(x), that is, f(g(x))f'(g(x)).

Example 7.4Computations with the chain rule

(a) ddxsin(x2)\frac{d}{dx}\sin(x^2). With outer function f(u)=sinuf(u)=\sin u and inner function g(x)=x2g(x)=x^2 we have f(u)=cosuf'(u) = \cos u and g(x)=2xg'(x)=2x, so

ddxsin(x2)=cos(x2)2x=2xcos(x2).\frac{d}{dx}\sin(x^2) = \cos(x^2)\cdot 2x = 2x\cos(x^2).

(b) ddxex2/2\frac{d}{dx}e^{-x^2/2} (the shape occurring in the density of the normal distribution). With outer function f(u)=euf(u)=e^u and inner function g(x)=x2/2g(x) = -x^2/2, where g(x)=xg'(x) = -x,

ddxex2/2=ex2/2(x)=xex2/2.\frac{d}{dx}e^{-x^2/2} = e^{-x^2/2}\cdot(-x) = -x\,e^{-x^2/2}.

(c) ddx(1+x2)10\frac{d}{dx}(1+x^2)^{10}. Reading the outer function as u10u^{10} and the inner as 1+x21+x^2,

10(1+x2)92x=20x(1+x2)9.10(1+x^2)^{9}\cdot 2x = 20x(1+x^2)^{9}.

Expanding first and then differentiating would mean handling a polynomial with 1111 terms; with the chain rule it is one line.

(d) A triple composite. ddxcos3(2x+1)\frac{d}{dx}\cos^3(2x+1). Decomposing as u=2x+1u = 2x+1, v=cosuv = \cos u, y=v3y = v^3 and using the chain rule twice,

dydx=3v2(sinu)2=6sin(2x+1)cos2(2x+1).\frac{dy}{dx} = 3v^2 \cdot (-\sin u)\cdot 2 = -6\sin(2x+1)\cos^2(2x+1).

Remembering it as “multiply the slopes from the inside outwards” makes mistakes less likely, I think.

Example 7.5A differentiable function whose derivative is not continuous

f(x)={x2sin1x(x0)0(x=0)f(x) = \begin{cases} x^2 \sin\dfrac{1}{x} & (x \ne 0) \\ 0 & (x = 0)\end{cases}

Let us examine this function.

First, differentiability at x=0x=0, straight from the definition. For h0h \ne 0,

f(h)f(0)h=hsin1hh\left|\frac{f(h)-f(0)}{h}\right| = \left|h \sin\frac{1}{h}\right| \le |h|

(we used sint1|\sin t| \le 1), so by the squeeze theorem the difference quotient converges to 00. Hence ff is differentiable at 00 with f(0)=0f'(0)=0.

Next, for x0x \ne 0, the product rule Theorem 6.1 (2) together with the chain rule Theorem 7.2 (applied to the composite of sin\sin and 1/x1/x, with (1x)=1x2\left(\frac1x\right)' = -\frac{1}{x^2} from Example 6.2 (a)) gives

f(x)=2xsin1x+x2cos1x(1x2)=2xsin1xcos1x.f'(x) = 2x\sin\frac{1}{x} + x^2 \cdot \cos\frac1x \cdot\left(-\frac{1}{x^2}\right) = 2x \sin\frac1x - \cos\frac1x .

Now take xn=12nπx_n = \frac{1}{2n\pi} (n=1,2,n=1,2,\ldots), so that xn0x_n \to 0. But

f(xn)=2xnsin(2nπ)cos(2nπ)=01=1,f'(x_n) = 2x_n\sin(2n\pi) - \cos(2n\pi) = 0 - 1 = -1 ,

so f(xn)10=f(0)f'(x_n) \to -1 \ne 0 = f'(0). That is, ff is differentiable on all of R\mathbb{R} and yet ff' is not continuous at 00. Being differentiable and being of class C1C^1 are different things.

Derivatives can be discontinuous in this way, but they are not entirely unconstrained either: a derivative always has the intermediate value property (Darboux’s theorem). We take up this topic in The mean value theorem and Taylor’s theorem.

How are we to find the derivative of a function defined as an inverse, such as log\log or arctan\arctan? Since the graph of f1f^{-1} is the reflection of the graph of ff in the line y=xy=x, the slope of the tangent ought to be the reciprocal. The following proposition makes this precise.

Proposition 8.1Differentiating an inverse function

Let II be an open interval and f ⁣:IRf \colon I \to \mathbb{R} a continuous, strictly monotone (increasing or decreasing) function. Then J:=f(I)J := f(I) is an open interval, and there is an inverse function f1 ⁣:JIf^{-1}\colon J \to I, which is continuous (this follows from the intermediate value theorem).

If moreover ff is differentiable at aIa \in I with f(a)0f'(a) \ne 0, then f1f^{-1} is differentiable at b:=f(a)b := f(a) and

(f1)(b)=1f(a)=1f(f1(b)).(f^{-1})'(b) = \frac{1}{f'(a)} = \frac{1}{f'\bigl(f^{-1}(b)\bigr)} .
Proof(Proposition 8.1)

The first part (that JJ is an open interval and that f1f^{-1} exists and is continuous) belongs to the theory of continuous functions, so we leave it to Limits and continuity and prove the second part here.

Let yJy \in J with yby \ne b, and put x:=f1(y)x := f^{-1}(y). Since ff is strictly monotone it is injective, so yby \ne b forces xax \ne a. Hence f(x)f(a)=yb0f(x) - f(a) = y - b \ne 0, and the following rewriting is legitimate:

f1(y)f1(b)yb=xaf(x)f(a)=(f(x)f(a)xa)1.\frac{f^{-1}(y)-f^{-1}(b)}{y-b} = \frac{x-a}{f(x)-f(a)} = \left(\frac{f(x)-f(a)}{x-a}\right)^{-1} .

Now let yby \to b. Since f1f^{-1} is continuous at bb we have x=f1(y)f1(b)=ax = f^{-1}(y) \to f^{-1}(b) = a, and as observed above, xax \ne a is maintained as long as yby \ne b. It is this condition — that the value never coincides with aa — that allows us to substitute directly the limit as xax \to a of a function of the variable xx (we are using the composition property of §2 with the punctured-neighborhood proviso). Since ff is differentiable at aa,

f(x)f(a)xaf(a)0,\frac{f(x)-f(a)}{x-a} \longrightarrow f'(a) \ne 0 ,

and by the limit law for quotients (in the case where the limit of the denominator is not 00) its reciprocal converges to 1f(a)\frac{1}{f'(a)}. Hence f1f^{-1} is differentiable at bb with (f1)(b)=1f(a)(f^{-1})'(b) = \frac{1}{f'(a)}. Substituting a=f1(b)a = f^{-1}(b) gives the last displayed form.

The hypothesis f(a)0f'(a) \ne 0 cannot be dropped. The function f(x)=x3f(x)=x^3 is strictly increasing on R\mathbb{R} with f(0)=0f'(0)=0, but its inverse f1(y)=y1/3f^{-1}(y)=y^{1/3} has difference quotient y1/3y=y2/3+\frac{y^{1/3}}{y} = y^{-2/3} \to +\infty at y=0y=0 and is not differentiable there. The tangent becomes vertical.

Example 8.2Logarithm, square root, arctangent

(a) The natural logarithm. First let us check that exp\exp is strictly increasing on R\mathbb{R}. If t>0t > 0, every term of the series exp(t)=1+t+t22+\exp(t) = 1 + t + \frac{t^2}{2} + \cdots is positive, so exp(t)>1\exp(t) > 1. Also, the addition formula gives exp(x)exp(x)=exp(0)=1\exp(x)\exp(-x) = \exp(0) = 1, so exp(x)0\exp(x) \ne 0; and exp\exp is continuous by Theorem 5.4 (4) together with Theorem 3.4, so combining exp(0)=1>0\exp(0)=1 > 0 with the intermediate value theorem yields exp>0\exp > 0. Therefore, for x<yx < y, exp(y)exp(x)=exp(x)(exp(yx)1)>0\exp(y) - \exp(x) = \exp(x)\bigl(\exp(y-x) - 1\bigr) > 0. That the range is (0,)(0,\infty) we leave to the chapter on series; we write log\log for the inverse function. By Theorem 5.4 (4), exp=exp\exp' = \exp never vanishes, so Proposition 8.1 applies and, for b>0b > 0,

(log)(b)=1exp(logb)=1b.(\log)'(b) = \frac{1}{\exp(\log b)} = \frac{1}{b} .

(b) The square root. Restricting f(x)=x2f(x)=x^2 to I=(0,)I=(0,\infty) makes it strictly increasing with J=(0,)J=(0,\infty), and the inverse is f1(y)=yf^{-1}(y)=\sqrt{y}. The derivative f(x)=2xf'(x)=2x does not vanish on II. Hence, for b>0b > 0,

ddyyy=b=12b.\left.\frac{d}{dy}\sqrt{y}\right|_{y=b} = \frac{1}{2\sqrt{b}} .

(c) The arctangent. Restricting tan\tan to I=(π/2,π/2)I = (-\pi/2, \pi/2) makes it strictly increasing with range R\mathbb{R}. We write arctan\arctan for its inverse. By Example 6.2 (b) we have (tan)(x)=1+tan2x>0(\tan)'(x) = 1+\tan^2 x > 0, so Proposition 8.1 applies and, for bRb \in \mathbb{R},

(arctan)(b)=11+tan2(arctanb)=11+b2.(\arctan)'(b) = \frac{1}{1+\tan^2(\arctan b)} = \frac{1}{1+b^2} .

We merely substituted tan(arctanb)=b\tan(\arctan b) = b, but the interesting thing is that no trigonometric function survives on the right.

Now that we have the logarithm, we can also differentiate real powers. For x>0x > 0 and αR\alpha \in \mathbb{R}, the standard definition is xα:=eαlogxx^{\alpha} := e^{\alpha \log x}. By the chain rule Theorem 7.2 and Example 8.2 (a),

(xα)=eαlogxαx=xααx=αxα1(x^{\alpha})' = e^{\alpha\log x}\cdot \frac{\alpha}{x} = x^{\alpha}\cdot\frac{\alpha}{x} = \alpha x^{\alpha-1}

so the formula of Theorem 5.4 (1) has been extended to arbitrary real exponents. Similarly, setting ax:=exlogaa^x := e^{x\log a} for a>0a > 0 gives (ax)=axloga(a^x)' = a^x \log a. That the coefficient loga\log a equals 11 only when a=ea=e is one explanation of why ee is chosen as the base.

Exercise 9.1Easy

Let f(x)=xf(x)=\sqrt{x}.

(1) Find the derivative for x>0x > 0 from the definition (the limit of the difference quotient).

(2) Show that ff is not right-differentiable at x=0x=0; that is, show that limh+0f(h)f(0)h\lim_{h\to+0}\frac{f(h)-f(0)}{h} does not exist as a finite value.

Solution

(1) Fix x>0x > 0 and take h|h| small enough that x+h>0x + h > 0. For h0h \ne 0, rationalizing the numerator gives

x+hxh=(x+hx)(x+h+x)h(x+h+x)=(x+h)xh(x+h+x)=1x+h+x\frac{\sqrt{x+h}-\sqrt{x}}{h} = \frac{(\sqrt{x+h}-\sqrt{x})(\sqrt{x+h}+\sqrt{x})}{h(\sqrt{x+h}+\sqrt{x})} = \frac{(x+h)-x}{h(\sqrt{x+h}+\sqrt{x})} = \frac{1}{\sqrt{x+h}+\sqrt{x}}

(since x>0x > 0, the denominator is positive and we have not divided by 00). As  \sqrt{\ } is continuous on (0,)(0,\infty), we have x+hx\sqrt{x+h}\to\sqrt{x} as h0h \to 0, so by the limit law for quotients

f(x)=12x.f'(x) = \frac{1}{2\sqrt{x}} .

This amounts to verifying Example 8.2 (b) directly, without Proposition 8.1.

(2) For h>0h > 0 we have h0h=1h\frac{\sqrt{h}-0}{h} = \frac{1}{\sqrt{h}}. Given any M>0M > 0, the inequality 0<h<1/M20 < h < 1/M^2 implies 1h>M\frac{1}{\sqrt h} > M, so this difference quotient diverges to ++\infty as h+0h \to +0 and has no finite limit. Hence ff is not (right-)differentiable at 00. The tangent to the graph at the origin is vertical.

Exercise 9.2Standard

For real numbers a,ba, b define

f(x)={x2+ax+b(x1)3x(x>1)f(x) = \begin{cases} x^2 + ax + b & (x \le 1) \\ 3x & (x > 1) \end{cases}

Find all a,ba, b for which ff is differentiable at x=1x=1.

Solution

Necessary condition (continuity). By Theorem 3.4, differentiability at x=1x=1 requires continuity there. We have f(1)=1+a+bf(1) = 1+a+b, while the right-hand limit is limx1+03x=3\lim_{x\to1+0}3x = 3, so

1+a+b=31 + a + b = 3

that is, b=2ab = 2-a is forced. We call this condition (C) below.

Computing the one-sided difference quotients. Under (C) we have f(1)=3f(1)=3. For h>0h > 0,

f(1+h)f(1)h=3(1+h)3h=3hh=3\frac{f(1+h)-f(1)}{h} = \frac{3(1+h)-3}{h} = \frac{3h}{h} = 3

so the right-hand limit is 33. For h<0h < 0 (with h|h| small) we have 1+h11+h \le 1, so

f(1+h)f(1)h=(1+h)2+a(1+h)+b3h=(1+2h+h2)+a+ah+b3h.\frac{f(1+h)-f(1)}{h} = \frac{(1+h)^2 + a(1+h) + b - 3}{h} = \frac{(1 + 2h + h^2) + a + ah + b - 3}{h} .

By (C) we have 1+a+b3=01 + a + b - 3 = 0, so the numerator is 2h+h2+ah2h + h^2 + ah; dividing by hh gives 2+h+a2 + h + a, which converges to 2+a2+a as h0h \to -0.

Conclusion. Differentiability is the condition that the two one-sided limits agree, so 2+a=32 + a = 3, that is, a=1a = 1; and (C) then gives b=1b = 1. In this case f(1)=3f'(1)=3. Conversely, for these values of a,ba,b the computation above confirms that both one-sided limits equal 33, so a=b=1a=b=1 is the required answer.

Exercise 9.3Standard

For x>0x > 0 let

y=(x2+1)3x(x+2)5.y = \frac{(x^2+1)^3 \sqrt{x}}{(x+2)^5} .

Find yy' by logarithmic differentiation, that is, by taking logarithms of both sides and then differentiating. Indicate explicitly where the chain rule is used.

Solution

For x>0x > 0 we have y>0y > 0, so logy\log y is defined, and by the properties of the logarithm

logy=3log(x2+1)+12logx5log(x+2).\log y = 3\log(x^2+1) + \frac{1}{2}\log x - 5\log(x+2) .

Differentiate the left-hand side as a function of xx. It is the composite of uloguu \mapsto \log u with xy(x)x \mapsto y(x), so by Theorem 7.2 and Example 8.2 (a) we get ddxlogy(x)=y(x)y(x)\frac{d}{dx}\log y(x) = \frac{y'(x)}{y(x)}. Each term on the right is likewise a composite, with ddxlog(x2+1)=2xx2+1\frac{d}{dx}\log(x^2+1) = \frac{2x}{x^2+1}, ddxlogx=1x\frac{d}{dx}\log x = \frac1x and ddxlog(x+2)=1x+2\frac{d}{dx}\log(x+2) = \frac{1}{x+2}. Collecting these by linearity Theorem 6.1 (1),

yy=6xx2+1+12x5x+2.\frac{y'}{y} = \frac{6x}{x^2+1} + \frac{1}{2x} - \frac{5}{x+2} .

Therefore

y=(x2+1)3x(x+2)5(6xx2+1+12x5x+2).y' = \frac{(x^2+1)^3\sqrt{x}}{(x+2)^5}\left(\frac{6x}{x^2+1} + \frac{1}{2x} - \frac{5}{x+2}\right) .

Using the product and quotient rules directly leads to the same answer, but for expressions mixing products, quotients and powers, logarithmic differentiation takes considerably less work.

Exercise 9.4Hard

Prove by induction on nn that if f,gf, g are nn times differentiable on an open interval II, then so is the product fgfg, and

(fg)(n)=k=0n(nk)f(k)g(nk)(fg)^{(n)} = \sum_{k=0}^{n} \binom{n}{k} f^{(k)} g^{(n-k)}

(the Leibniz formula).

Solution

For the fine points of induction, see the principle of mathematical induction(Theorem 3.2)[Techniques of Proof] in Techniques of proof: induction and proof by contradiction.

The case n=1n=1. By Theorem 6.1 (2) we have (fg)=fg+fg(fg)' = f'g + fg', and the right-hand side agrees with (10)f(0)g(1)+(11)f(1)g(0)\binom{1}{0}f^{(0)}g^{(1)} + \binom{1}{1}f^{(1)}g^{(0)} (since (10)=(11)=1\binom10 = \binom11 = 1 and f(0)=ff^{(0)}=f).

Assuming the case nn, proving the case n+1n+1. Let f,gf, g be n+1n+1 times differentiable. By the induction hypothesis,

(fg)(n)=k=0n(nk)f(k)g(nk)(fg)^{(n)} = \sum_{k=0}^{n}\binom{n}{k} f^{(k)}g^{(n-k)}

and each f(k),g(nk)f^{(k)}, g^{(n-k)} on the right is differentiable once more. Differentiating both sides and using linearity Theorem 6.1 (1) and the product rule Theorem 6.1 (2),

(fg)(n+1)=k=0n(nk)(f(k+1)g(nk)+f(k)g(nk+1))=k=0n(nk)f(k+1)g(nk)+k=0n(nk)f(k)g(n+1k).(fg)^{(n+1)} = \sum_{k=0}^{n}\binom{n}{k}\Bigl( f^{(k+1)}g^{(n-k)} + f^{(k)}g^{(n-k+1)} \Bigr) = \sum_{k=0}^{n}\binom{n}{k} f^{(k+1)}g^{(n-k)} + \sum_{k=0}^{n}\binom{n}{k} f^{(k)}g^{(n+1-k)} .

Substituting j=k+1j = k+1 in the first sum turns it into j=1n+1(nj1)f(j)g(n+1j)\sum_{j=1}^{n+1}\binom{n}{j-1}f^{(j)}g^{(n+1-j)}, and rewriting the index of the second sum as jj gives j=0n(nj)f(j)g(n+1j)\sum_{j=0}^{n}\binom{n}{j}f^{(j)}g^{(n+1-j)}. Separating off the term j=0j=0 (which occurs only in the second sum) and the term j=n+1j=n+1 (which occurs only in the first) and collecting the part with 1jn1 \le j \le n,

(fg)(n+1)=f(0)g(n+1)+j=1n((nj1)+(nj))f(j)g(n+1j)+f(n+1)g(0).(fg)^{(n+1)} = f^{(0)}g^{(n+1)} + \sum_{j=1}^{n}\left(\binom{n}{j-1}+\binom{n}{j}\right) f^{(j)}g^{(n+1-j)} + f^{(n+1)}g^{(0)} .

Using Pascal’s rule (nj1)+(nj)=(n+1j)\binom{n}{j-1}+\binom{n}{j} = \binom{n+1}{j} and noting that (n+10)=(n+1n+1)=1\binom{n+1}{0} = \binom{n+1}{n+1} = 1, the two separated terms fit exactly into the sum as the terms j=0j=0 and j=n+1j=n+1. Hence

(fg)(n+1)=j=0n+1(n+1j)f(j)g(n+1j)(fg)^{(n+1)} = \sum_{j=0}^{n+1}\binom{n+1}{j} f^{(j)}g^{(n+1-j)}

which is the case n+1n+1. By induction the formula holds for every positive integer nn.

That this has exactly the same shape as the binomial theorem (x+y)n=k(nk)xkynk(x+y)^n = \sum_k \binom nk x^k y^{n-k} is no coincidence. Both come from the same structure: an operation on two objects is repeated nn times, and one counts which of the two is chosen at each repetition.

  • Sugiura Mitsuo, Kaiseki Nyūmon I (Introduction to Analysis I), University of Tokyo Press, 1980 (in Japanese) — Chapter II, “Differentiation”. A standard textbook thoroughgoing in its use of ε\varepsilon-δ\delta; the development in this article broadly follows its plan.
  • Takagi Teiji, Kaiseki Gairon (A Course of Analysis), revised 3rd ed., Iwanami Shoten, 1983 (in Japanese) — Chapter 2, “Differentiation”. A classic, careful in its account of the relation between the derivative and the tangent line.
  • W. Rudin, Principles of Mathematical Analysis, 3rd ed., McGraw-Hill, 1976 — Chapter 5, “Differentiation”. The proof of the chain rule uses the same auxiliary function as the one given here.
  • M. Spivak, Calculus, 4th ed., Publish or Perish, 2008 — Chapters 9–10. The motivating discussion leading up to the definition of the derivative is treated in great detail.
  • G. Berkeley, The Analyst, 1734 — the original critique of infinitesimals; the primary source for the historical remarks in §1.

The notation dydx\frac{dy}{dx} looks like the ratio of two quantities dydy and dxdx. This appearance helps with computation, but it is also a source of confusion for beginners. Let us set down the accurate position at this stage.

First, ddx\frac{d}{dx} is a single symbol denoting the operator “differentiate with respect to xx”, and dydx\frac{dy}{dx} is the result of applying that operator to yy. We are not splitting it into a numerator and a denominator and giving each a meaning of its own. Accordingly, the reason dydx=dydududx\frac{dy}{dx} = \frac{dy}{du}\frac{du}{dx} looks like cancellation is that the statement of Theorem 7.2 happens to have that shape. Cancellation is not a proof.

Second, there is nonetheless a reason why the notation can be trusted. By Theorem 4.1, differentiability means that Δy=f(a)Δx+o(Δx)\Delta y = f'(a)\Delta x + o(\Delta x). If we agree to read dxdx as “the small increment in xx itself” and dydy as “the increment in yy predicted by the linear approximation, namely f(a)dxf'(a)\,dx”, then dy=f(a)dxdy = f'(a)\,dx acquires meaning as a definition, and dividing both sides by dxdx does give dydx=f(a)\frac{dy}{dx}=f'(a). Under this reading, the cancellation in the chain rule is likewise justified as the composition of linear approximations. Generalizing this standpoint leads to the theory of differential forms, which comes into its own in multivariable integration (change of variables and Jacobians).

Third, d2ydx2\frac{d^2y}{dx^2} has nothing whatever to do with (dydx)2\left(\frac{dy}{dx}\right)^2. It merely expresses, in the notation of a squared operator, the act of applying ddx\frac{d}{dx} twice. This one piece of notation is not to be read as a fraction.

The toolkit of differentiation is now complete. In the next chapter we pass to The mean value theorem and Taylor’s theorem, which extracts global behavior of a function from the pointwise information carried by the derivative.

Report an error in this article ・Operated by: Mugen Giken LLCPricingTermsLegal notice

© 2026 夢現技研合同会社 ・Feeding the text to an LLM is welcome. Code samples are MIT licensed.