---
title: Linear Approximations and Differentials
module: Derivatives
moduleNumber: 2
lessonNumber: 4
order: 204
summary: >
  A differentiable curve looks like its tangent line under enough
  magnification, so the tangent is a usable stand-in for the function near the
  point of contact. The linear approximation and its linearization, written in
  the language of differentials dy and dx, estimate both function values and
  the measurement error propagated into a computed quantity.
topics: [Derivatives]
sources:
  - book: Stewart
    ref: "Ch. 2 — Derivatives; §2.9 Linear Approximations and Differentials"
draft: false
---

Zoom in on a point of a
[differentiable](/calculus/derivatives/the-derivative-and-rates-of-change)
curve and the graph flattens until it is indistinguishable from its tangent
line. A value $f(x)$ that is hard to compute can therefore be replaced, for $x$
near a convenient point $a$, by the value of the tangent line, a linear
expression. Written in the language of **differentials**, the same tangent-line
estimate measures both a function value and the error that a measurement error
propagates into a computed quantity.

## The linear approximation

Near $(a, f(a))$ the tangent line stays close to the curve. Its equation is
$y = f(a) + f'(a)(x - a)$, and using it in place of $f$ gives the
**linear approximation**.

> **Definition (Linearization).** The **linearization** of $f$ at $a$ is the
> linear function
> $$
> L(x) = f(a) + f'(a)(x - a).
> $$
> The approximation $f(x) \approx L(x)$, valid for $x$ near $a$, is the
> **linear** (or **tangent-line**) **approximation** of $f$ at $a$.

$$
% caption: The linearization L(x) is the tangent at (a, f(a)); near a it hugs
% the curve, so f(x) is well approximated by L(x) = f(a) + f'(a)(x - a).
\begin{tikzpicture}[>=stealth, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\draw[black,->] (-0.2,0) -- (5.1,0) node[right]{$x$};
\draw[black,->] (0,-0.2) -- (0,3.4) node[above]{$y$};
\draw[black, thick, domain=0.1:4.7, samples=90, variable=\x] plot ({\x},{sqrt(\x+1)});
\draw[acc, very thick, domain=0.3:4.5, variable=\x] plot ({\x},{1.7320 + 0.2887*(\x-2)});
\draw[black, dashed] (2,0) -- (2,1.7320);
\fill[black] (2,1.7320) circle (1.7pt) node[anchor=south east]{$(a,\,f(a))$};
\node[black, anchor=north] at (2,-0.04) {$a$};
\node[black, anchor=west] at (4.6,2.66) {$y=f(x)$};
\node[acc, anchor=west] at (4.5,1.98) {$y=L(x)$};
\end{tikzpicture}
$$

**Example.** Approximate $\sqrt{3.98}$ and $\sqrt{4.05}$ using
$f(x) = \sqrt{x + 3}$ at $a = 1$. Here $f(1) = 2$ and
$f'(x) = \tfrac{1}{2}(x+3)^{-1/2}$, so $f'(1) = \tfrac{1}{4}$. The linearization
is

$$
L(x) = 2 + \tfrac{1}{4}(x - 1) = \frac{7}{4} + \frac{x}{4},
\qquad\text{so}\qquad
\sqrt{x + 3} \approx \frac{7}{4} + \frac{x}{4}\ \ (x \text{ near } 1).
$$

Then $\sqrt{3.98} = \sqrt{0.98 + 3} \approx \tfrac{7}{4} + \tfrac{0.98}{4}
= 1.995$ and $\sqrt{4.05} \approx \tfrac{7}{4} + \tfrac{1.05}{4} = 2.0125$. Both
overestimate, because the square-root graph is concave down and lies below its
tangent. The advantage over a calculator is that the approximation is a formula
valid across a whole interval, not a single evaluation.

The approximation degrades as $x$ moves away from $a$.

| $x$ | argument | $L(x)$ | actual value |
| --- | --- | --- | --- |
| $\sqrt{3.9}$ | $0.9$ | $1.975$ | $1.97484\ldots$ |
| $\sqrt{3.98}$ | $0.98$ | $1.995$ | $1.99499\ldots$ |
| $\sqrt{4}$ | $1$ | $2$ | $2.00000\ldots$ |
| $\sqrt{4.05}$ | $1.05$ | $2.0125$ | $2.01246\ldots$ |
| $\sqrt{5}$ | $2$ | $2.25$ | $2.23607\ldots$ |
| $\sqrt{6}$ | $3$ | $2.5$ | $2.44949\ldots$ |

Close to $a = 1$ the estimate is accurate to several decimals; by $x = 3$ it is
off in the first. How wide an interval is acceptable depends on the tolerance:
requiring $|\sqrt{x+3} - L(x)| < 0.5$ holds on roughly $-2.6 < x < 8.6$, while
tightening to $0.1$ shrinks the interval to about $-1.1 < x < 3.9$.

> **Worked example.** Estimate $\sqrt[3]{65}$ by linearizing $f(x) = x^{1/3}$ at
> $a = 64$, the nearest perfect cube. Here $f(64) = 4$ and
> $f'(x) = \tfrac{1}{3}x^{-2/3}$, so $f'(64) = \tfrac{1}{3\cdot 16} = \tfrac{1}{48}$.
> The linearization is
> $$
> L(x) = 4 + \tfrac{1}{48}(x - 64),
> \qquad\text{so}\qquad
> \sqrt[3]{65} \approx L(65) = 4 + \tfrac{1}{48} \approx 4.0208.
> $$
> The true value is $4.02073\ldots$, so the linear estimate is correct to four
> decimals. Because $x^{1/3}$ is concave down here, $L$ again overestimates
> slightly.

The base point $a$ need not be $0$; it need only be a value where $f$ and $f'$
are easy to evaluate and close to the target.

> **Worked example.** Estimate $\tan 46^\circ$ by linearizing $f(x) = \tan x$ at
> $a = \tfrac{\pi}{4}$, where $f = 1$ and $f'(x) = \sec^2 x$ gives $f'(\pi/4) =
> 2$. One degree is $\pi/180$ radians, so with $x = \tfrac{\pi}{4} +
> \tfrac{\pi}{180}$,
> $$
> \tan 46^\circ \approx 1 + 2\cdot\frac{\pi}{180}
>  = 1 + \frac{\pi}{90} \approx 1.0349.
> $$
> The calculator value is $1.0355$, so the linear estimate is within $0.0006$.
> The error grows with the square of the step: the accuracy of a linearization
> at $a$ falls off in proportion to $|x - a|^2$ and to the size of $f''$ near
> $a$, which is why a small step and a mildly curved function give a sharp
> estimate.

### Small-angle approximations in physics

Linear approximations let a physicist replace an awkward function with its
tangent line inside a derivation. The linearization of $\sin x$ at $a = 0$ is
$L(x) = x$, since $\sin 0 = 0$ and the slope there is $\cos 0 = 1$. Likewise
$\cos x$ linearizes to $1$ at $0$. For $x$ near zero,

$$
\sin x \approx x,
\qquad
\cos x \approx 1,
\qquad
\tan x \approx x.
$$

$$
% caption: Small-angle approximation. Near x = 0 the line y = x is tangent to
% y = sin x; they agree to within about 2 percent out to roughly 0.35 radians.
\begin{tikzpicture}[>=stealth, font=\footnotesize, scale=1.3]
\definecolor{acc}{HTML}{4A6FA5}
\draw[black,->] (-1.7,0) -- (1.7,0) node[right]{$x$};
\draw[black,->] (0,-1.45) -- (0,1.5) node[above]{$y$};
\draw[acc, very thick, domain=-1.32:1.32, variable=\x] plot ({\x},{\x});
\draw[black, thick, domain=-1.55:1.55, samples=90, variable=\x] plot ({\x},{sin(\x r)});
\node[acc, anchor=south east] at (1.3,1.32) {$y=x$};
\node[black, anchor=north west] at (1.34,0.9) {$y=\sin x$};
\end{tikzpicture}
$$

The pendulum period is derived by replacing $\sin\theta$ with $\theta$ in the
equation of motion, valid because the swing angle is small; the two agree to
within about $2\%$ out to roughly $20^\circ$. Paraxial (Gaussian) optics rests on
the same two substitutions, which turn the lens equations linear and make lens
design tractable.

## Differentials

The same idea, written with **differentials**, separates the change predicted by
the tangent line from the true change in the function.

> **Definition (Differential).** For $y = f(x)$, the differential $\d x$ is an
> independent variable that may take any value. The differential $\d y$ is then
> defined by
> $$
> \d y = f'(x)\,\d x.
> $$

Here $\d y$ depends on both $x$ and $\d x$. Dividing (when $\d x \ne 0$) recovers
$\d y/\d x = f'(x)$, and now the left side is a genuine ratio of the two
differentials, not merely a symbol for the derivative.

The geometry distinguishes $\d y$ from the actual change. Let
$P = (x, f(x))$ and $Q = (x + \Delta x, f(x + \Delta x))$, and set
$\d x = \Delta x$. Along the run $\d x$, the tangent line rises by
$\d y = f'(x)\,\d x$, reaching a point $R$, while the curve rises by the true
increment $\Delta y = f(x + \Delta x) - f(x)$, reaching $Q$. So $\d y$ is the
change in the linearization and $\Delta y$ is the change in the function.

$$
% caption: Differentials against the true change. Over a run dx the tangent
% rises by dy = f'(x) dx to R, while the curve rises by the actual change to Q;
% their gap shrinks faster than dx.
\begin{tikzpicture}[>=stealth, font=\footnotesize, scale=1.25]
\definecolor{acc}{HTML}{4A6FA5}
\draw[black, thick, domain=0.3:3.15, samples=80, variable=\x] plot ({\x},{0.35*\x*\x+0.4});
\coordinate (P) at (1,0.75);
\coordinate (Q) at (2.6,2.766);
\coordinate (R) at (2.6,1.87);
\draw[acc, very thick] (0.6,0.47) -- (3.0,2.15);
\draw[black, dashed] (P) -- (2.6,0.75);
\node[black!70, anchor=north] at (1.75,0.72) {$dx$};
\draw[<->, acc] (2.72,0.75) -- (2.72,1.87);
\node[acc, anchor=west] at (2.76,1.30) {$dy$};
\draw[<->, black!70] (2.45,0.75) -- (2.45,2.766);
\node[black!70, anchor=east] at (2.28,2.5) {actual};
\fill[black] (P) circle (1.4pt) node[anchor=east]{$P$};
\fill[black] (Q) circle (1.4pt) node[anchor=south east]{$Q$};
\fill[acc] (R) circle (1.4pt) node[anchor=north west]{$R$};
\end{tikzpicture}
$$

**Example.** Compare $\Delta y$ and $\d y$ for $y = x^3 + x^2 - 2x + 1$ as $x$ moves
from $2$. The differential is $\d y = (3x^2 + 2x - 2)\,\d x$, and at $x = 2$ this is
$\d y = 14\,\d x$.

| Step $\d x = \Delta x$ | $\Delta y$ (exact) | $\d y = 14\,\d x$ |
| --- | --- | --- |
| $0.05$ | $0.717625$ | $0.7$ |
| $0.01$ | $0.140701$ | $0.14$ |

The approximation $\Delta y \approx \d y$ improves as $\d x$ shrinks, and $\d y$ is far
easier to compute. For complicated $f$, computing $\Delta y$ exactly may be
impossible, and the differential is the only practical estimate. In this
notation the linear approximation reads $f(a + \d x) \approx f(a) + \d y$.

## Estimating propagated error

Differentials estimate how a small error in a measured input propagates into a
computed output. If a quantity $y = f(x)$ is computed from a measured $x$ whose
error is $\d x$, the resulting error in $y$ is approximately $\d y = f'(x)\,\d x$.

**Example.** A sphere's radius is measured as $r = 21$ cm with possible error at
most $\d r = 0.05$ cm. The volume $V = \tfrac{4}{3}\pi r^3$ has differential

$$
\d V = 4\pi r^2\,\d r = 4\pi(21)^2(0.05) \approx 277\ \text{cm}^3.
$$

The factor $4\pi r^2$ is the surface area, so $\d V$ is the volume of a thin shell
of thickness $\d r$ wrapped around the sphere: surface area times thickness.

$$
% caption: Error propagation. A radius error dr thickens the sphere by a shell
% of volume 4 pi r^2 dr, the surface area times the thickness.
\begin{tikzpicture}[>=stealth, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\fill[acc!10] (0,0) circle (1.8);
\draw[acc, thick] (0,0) circle (1.8);
\draw[black, thick, dashed] (0,0) circle (2.05);
\draw[->, black!70] (0,0) -- (35:1.8);
\node[black!70] at (16:1.05) {$r$};
\draw[<->, black] (35:1.82) -- (35:2.03);
\node[black, anchor=west] at (35:2.3) {$dr$};
\fill[black] (0,0) circle (1.4pt);
\node[acc, anchor=north] at (0,-2.35) {outer shell of thickness $dr$};
\end{tikzpicture}
$$

An absolute error of $277$ cm³ sounds large, but the **relative error** is more
informative. Dividing by the volume,

$$
\frac{\d V}{V} = \frac{4\pi r^2\,\d r}{\tfrac{4}{3}\pi r^3} = 3\,\frac{\d r}{r},
$$

so the relative error in the volume is about three times the relative error in
the radius. Here $\d r/r = 0.05/21 \approx 0.0024$ gives a volume relative error of
about $0.007$, i.e. $0.24\%$ in the radius becomes $0.7\%$ in the volume. The
same reasoning shows a power law $y = k x^n$ multiplies relative error by $|n|$.

> **Worked example (blood flux).** Poiseuille's law models the volume flux
> through an artery as $F = kR^4$, proportional to the fourth power of the
> radius $R$. Dividing the differential $\d F = 4kR^3\,\d R$ by $F = kR^4$,
> $$
> \frac{\d F}{F} = 4\,\frac{\d R}{R}.
> $$
> A relative change of $5\%$ in the radius produces about $4(5\%) = 20\%$ in the
> flux. A slight constriction of an artery cuts flow sharply; a small dose of a
> vasodilator raises it just as sharply.

## Beyond the tangent line

The linearization is the best **first-degree** approximation: $L$ matches $f$ in
value and first derivative at $a$. A closer fit uses a parabola
$P(x) = f(a) + f'(a)(x - a) + \tfrac{1}{2}f''(a)(x - a)^2$ matching value, slope,
and concavity. Continuing to match higher derivatives produces the
[Taylor polynomials](/calculus/sequences-and-series/taylor-and-maclaurin-series),
whose limit represents the whole function as an infinite series. The tangent
line is the degree-one member of that family, and the error it leaves is what
the higher-degree terms correct.
