Technopedia

The technologist’s encyclopedia

Differentiation

Differentiation measures the instantaneous rate of change of a function and, through the mean value theorem and Taylor expansion, turns local slope information into global control and polynomial approximation. It is the engine behind optimization, sensitivity analysis, and the modeling of change in physics and engineering. This page covers the derivative, the mean value theorem, Taylor expansion, and the inverse and implicit function theorems.

Authoritative sources

The derivative

Definition. If ff is defined on a neighborhood of aa, the derivative f′(a)f'(a) is

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

when the limit exists. ff is differentiable at aa if this limit exists.

Details

From slope to derivative

The difference quotient f(a+h)−f(a)h\frac{f(a+h) - f(a)}{h} is the slope of the secant line through (a,f(a))(a, f(a)) and (a+h,f(a+h))(a+h, f(a+h)). As h→0h \to 0, the secant line rotates toward the tangent line, and its slope tends to the derivative. So the derivative is the slope of the tangent line — the instantaneous rate of change.

Worked example

Compute f′(a)f'(a) for f(x)=x2f(x) = x^2.

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

So f′(a)=2af'(a) = 2a.

Differentiability implies continuity

If ff is differentiable at aa, then ff is continuous at aa. Proof: f(a+h)−f(a)=h⋅f(a+h)−f(a)hf(a+h) - f(a) = h \cdot \frac{f(a+h)-f(a)}{h}, and the right side tends to 0⋅f′(a)=00 \cdot f'(a) = 0. The converse fails: f(x)=∣x∣f(x) = |x| is continuous at 00 but not differentiable there (the left and right difference quotients tend to −1-1 and 11).

Example problem

Problem. Show that f(x)=∣x∣f(x) = |x| is not differentiable at x=0x = 0.

Solution

The right-hand difference quotient is ∣h∣−0h=1\frac{|h| - 0}{h} = 1 for h>0h > 0, and the left-hand quotient is ∣h∣h=−1\frac{|h|}{h} = -1 for h<0h < 0. The two one-sided limits differ, so the limit defining f′(0)f'(0) does not exist. ∎

The mean value theorem

Theorem (MVT). If ff is continuous on [a,b][a, b] and differentiable on (a,b)(a, b), then there exists c∈(a,b)c \in (a, b) such that

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

Details

Why it matters

The MVT says that somewhere in the interval the instantaneous rate equals the average rate. It is the bridge between local (derivative) and global (values at endpoints) information.

Consequence (monotonicity). If f′(x)≥0f'(x) \geq 0 for all x∈(a,b)x \in (a, b), then ff is increasing on [a,b][a, b]. Proof: for x1<x2x_1 < x_2, the MVT gives f(x2)−f(x1)=f′(c)(x2−x1)≥0f(x_2) - f(x_1) = f'(c)(x_2 - x_1) \geq 0.

Consequence (boundedness). If f′(x)=0f'(x) = 0 everywhere on an interval, then ff is constant there.

Proof sketch

Apply Rolle’s theorem to g(x)=f(x)−f(b)−f(a)b−a(x−a)g(x) = f(x) - \frac{f(b)-f(a)}{b-a}(x - a), which satisfies g(a)=g(b)g(a) = g(b). Rolle’s theorem (itself a consequence of the extremum theorem and Fermat’s theorem) gives g′(c)=0g'(c) = 0, i.e. the MVT.

Example problem

Problem. Use the MVT to show that ∣sin⁡x−sin⁡y∣≤∣x−y∣| \sin x - \sin y | \leq |x - y| for all real x,yx, y.

Solution

By the MVT applied to sin⁡\sin on the interval between xx and yy, there is cc between them with sin⁡x−sin⁡y=cos⁡c⋅(x−y)\sin x - \sin y = \cos c \cdot (x - y). Since ∣cos⁡c∣≤1|\cos c| \leq 1, the result follows. ∎

Taylor expansion

Theorem (Taylor’s theorem). If ff is n+1n+1 times differentiable near aa, then for xx near aa there is ξ\xi between aa and xx such that

f(x)=∑k=0nf(k)(a)k!(x−a)k+f(n+1)(ξ)(n+1)!(x−a)n+1.f(x) = \sum_{k=0}^{n} \frac{f^{(k)}(a)}{k!}(x-a)^k + \frac{f^{(n+1)}(\xi)}{(n+1)!}(x-a)^{n+1}.

Details

The idea

Taylor’s theorem approximates ff near aa by a polynomial whose coefficients are the derivatives at aa. The remainder term measures the error and shows the approximation improves as nn grows (when the derivatives stay bounded).

Worked example: exe^x

For f(x)=exf(x) = e^x, every derivative is exe^x, so f(k)(0)=1f^{(k)}(0) = 1. Taylor’s theorem at a=0a = 0 gives

ex=∑k=0nxkk!+eξ(n+1)!xn+1,e^x = \sum_{k=0}^{n} \frac{x^k}{k!} + \frac{e^{\xi}}{(n+1)!} x^{n+1},

and since eξe^{\xi} is bounded on bounded intervals, the series ∑xk/k!\sum x^k/k! converges to exe^x for all xx.

Example problem

Problem. Find the second-order Taylor polynomial of f(x)=ln⁡(1+x)f(x) = \ln(1+x) at x=0x = 0, and bound the error for ∣x∣≤1/2|x| \leq 1/2.

Solution

f(0)=0f(0) = 0, f′(x)=1/(1+x)f'(x) = 1/(1+x) so f′(0)=1f'(0) = 1, f′′(x)=−1/(1+x)2f''(x) = -1/(1+x)^2 so f′′(0)=−1f''(0) = -1. The polynomial is P2(x)=x−x2/2P_2(x) = x - x^2/2. The remainder is R2(x)=f′′′(ξ)x3/3!R_2(x) = f'''(\xi) x^3 / 3! with f′′′(x)=2/(1+x)3f'''(x) = 2/(1+x)^3. For ∣x∣≤1/2|x| \leq 1/2, ∣f′′′(ξ)∣≤2/(1/2)3=16|f'''(\xi)| \leq 2/(1/2)^3 = 16, so ∣R2(x)∣≤16∣x∣3/6≤16⋅(1/8)/6=1/3|R_2(x)| \leq 16 |x|^3 / 6 \leq 16 \cdot (1/8)/6 = 1/3. ∎

Inverse and implicit function theorems

Theorem (inverse function theorem). If ff is differentiable at aa and f′(a)≠0f'(a) \neq 0, then ff is locally invertible near aa, and the inverse is differentiable with

(f−1)′(f(a))=1f′(a).(f^{-1})'(f(a)) = \frac{1}{f'(a)}.

Theorem (implicit function theorem). If F(a,b)=0F(a, b) = 0 and Fy(a,b)≠0F_y(a, b) \neq 0, then near (a,b)(a, b) the equation F(x,y)=0F(x, y) = 0 defines yy as a differentiable function of xx, with

y′(x)=−FxFy.y'(x) = -\frac{F_x}{F_y}.

Details

Why the non-vanishing derivative matters

The condition f′(a)≠0f'(a) \neq 0 guarantees that ff is locally monotone (by the MVT, the derivative keeps its sign), hence one-to-one, hence invertible. The implicit function theorem is the multivariable generalization: a non-zero partial derivative lets you “solve for” one variable in terms of the others. See Multivariable analysis for the full statement.

Worked example: implicit differentiation

The unit circle x2+y2=1x^2 + y^2 = 1 defines y=1−x2y = \sqrt{1 - x^2} near (0,1)(0, 1). Here F(x,y)=x2+y2−1F(x, y) = x^2 + y^2 - 1, Fx=2xF_x = 2x, Fy=2yF_y = 2y. At (0,1)(0, 1), Fy=2≠0F_y = 2 \neq 0, so the theorem applies and y′=−Fx/Fy=−x/y=0y' = -F_x/F_y = -x/y = 0 at (0,1)(0, 1) — the tangent is horizontal at the top of the circle.

Example problem

Problem. The curve x3+y3−3xy=0x^3 + y^3 - 3xy = 0 (the folium of Descartes) passes through (1,1)(1, 1). Find the slope of the tangent there.

Solution

Let F(x,y)=x3+y3−3xyF(x, y) = x^3 + y^3 - 3xy. Then Fx=3x2−3yF_x = 3x^2 - 3y, Fy=3y2−3xF_y = 3y^2 - 3x. At (1,1)(1, 1), Fy=3−3=0F_y = 3 - 3 = 0, so the implicit function theorem does not apply directly (the tangent is vertical). Using Fx=3−3=0F_x = 3 - 3 = 0 as well, both partials vanish; differentiating implicitly, (3x2−3y)+(3y2−3x)y′=0(3x^2 - 3y) + (3y^2 - 3x) y' = 0, at (1,1)(1,1) gives 0+0⋅y′=00 + 0 \cdot y' = 0, indeterminate. A direct check of the curve near (1,1)(1,1) shows the tangent line is x+y=2x + y = 2 (slope −1-1), found by factoring the lowest-degree terms. ∎

Quiz

Example problem

Problem. Let ff be differentiable on R\mathbb{R} with f′(x)=2xf'(x) = 2x for all xx and f(0)=0f(0) = 0.

(a) Use the MVT to show that f(x)=x2f(x) = x^2 for all xx.

(b) Verify directly that f(x)=x2f(x) = x^2 satisfies the conditions.

Solution

(a) Let g(x)=f(x)−x2g(x) = f(x) - x^2. Then g′(x)=f′(x)−2x=0g'(x) = f'(x) - 2x = 0 for all xx. By the MVT, for any a<ba < b, g(b)−g(a)=g′(c)(b−a)=0g(b) - g(a) = g'(c)(b - a) = 0, so gg is constant. Since g(0)=f(0)−0=0g(0) = f(0) - 0 = 0, the constant is 00, hence f(x)=x2f(x) = x^2.

(b) (x2)′=2x(x^2)' = 2x and 02=00^2 = 0, so both conditions hold. ∎