Linear Approximation and Differentials
How to use a tangent line to estimate hard values, measure the error, and read dx and dy as working quantities.
Key takeaways
- Near x = a, the tangent line L(x) = f(a) + f′(a)(x − a) is the best straight-line stand-in for a differentiable function f.
- The differential dy = f′(x) dx estimates the true change Δy = f(x + dx) − f(x), and the gap shrinks faster than dx does.
- The second derivative controls the error: a curve that bends upward lies above its tangent lines, and one that bends downward lies below them.
- Relative errors often follow simple rules, such as a cube's volume having about three times the relative error of its side.
Linear approximation replaces a complicated function with its tangent line near a point where you already know the answer. If f is differentiable at a, then for x close to a you have f(x) ≈ f(a) + f′(a)(x − a). Differentials are a compact way of writing the same idea: a small change dx in the input produces an estimated change dy = f′(x) dx in the output.
The method turns hard arithmetic into easy arithmetic. It also tells you how sensitive a result is to a small mistake in its inputs, which matters whenever a number comes from a measurement.
The tangent line as a stand-in
The derivative f′(a) is the slope of the graph at the point where x = a. The line through that point with that slope is the tangent line, and its equation is called the linearization of f at a:
L(x) = f(a) + f′(a)·(x − a) Zoom in on the graph of a differentiable function and it looks straighter and straighter, until you can hardly tell it from this line. That visual fact is the whole basis of the method.
To use it, you need a base point a with two properties. It should be close to the input you care about, and f(a) and f′(a) should be easy to compute. Choosing a well is most of the skill.
A square root and a cube root by hand
Suppose you want √4.1. Take f(x) = √x and a = 4, since √4 = 2. The derivative is f′(x) = 1/(2√x), so f′(4) = 1/4.
√4.1 ≈ 2 + (1/4)·(0.1) (value + slope × step)
= 2.025 A calculator gives about 2.024846. The estimate is high by roughly 0.00015, from one multiplication and one addition.
Now try the cube root of 8.12. Here f(x) = x^(1/3), a = 8 and f(8) = 2. The derivative is (1/3)x^(−2/3), which equals 1/12 at x = 8. The step is 0.12, so the estimate is 2 + 0.12/12 = 2.01. The true value is about 2.00995.
In both cases the estimate came out slightly too big. That is no accident, and the reason appears below.
Why the tangent line beats other lines
Many lines pass through the point (a, f(a)). What makes the tangent special is how fast its error disappears.
Pick any line through that point with slope m. Its error at a + h is f(a + h) − f(a) − mh. Divide by h and let h shrink, and the result approaches f′(a) − m. If m differs from f′(a), the error is roughly proportional to h: halve the step and you only halve the miss.
If m equals f′(a), the error divided by h still goes to zero. The error is small even compared with the step itself, and for a twice differentiable function it behaves like h². Halve the step and the miss drops to about a quarter.
You can see this with √x at 4. The flat line y = 2, which uses only the value, misses √4.1 by about 0.025. A line of slope 0.3 through (4, 2) predicts 2.03 and misses by about 0.005. The tangent, with slope 0.25, misses by about 0.00015.
This property can even serve as the definition of differentiability: f is differentiable at a exactly when some line through the point has an error that vanishes faster than the step. That version carries over to functions of several variables, where the line becomes a plane or its higher-dimensional counterpart.
Standard approximations near zero
Linearizing a few common functions at 0 gives shortcuts that show up all over science and engineering. Angles are in radians.
| Function | Approximation near 0 | Example | True value (approx.) |
|---|---|---|---|
| sin x | x | sin 0.1 ≈ 0.1 | 0.099833 |
| eˣ | 1 + x | e^0.05 ≈ 1.05 | 1.051271 |
| ln(1 + x) | x | ln 1.02 ≈ 0.02 | 0.019803 |
| (1 + x)ᵏ | 1 + kx | 1.01⁵ ≈ 1.05 | 1.051010 |
The last row is the most versatile. With k = 1/2 it estimates square roots, with k = −1 it gives 1/(1 + x) ≈ 1 − x, and it works for any real exponent k as long as x is small. Physicists use sin θ ≈ θ to turn the pendulum equation into one that can be solved with sines and cosines.
"Small" is relative to the accuracy you need. At x = 0.1, the sine approximation is off by under 0.2 percent. At x = 1, it says sin 1 ≈ 1, while the real value is about 0.84.
What differentials are
Write y = f(x). Let dx be a change in x, of any size you like. The differential dy is defined by dy = f′(x) dx. It is the change in height along the tangent line.
The actual change along the curve is written Δy = f(x + dx) − f(x). The two are close when dx is small, but they are not the same thing.
Take y = x² at x = 3 with dx = 0.1.
dy = 2x·dx = 2·3·0.1 = 0.6
Δy = 3.1² − 3² = 9.61 − 9 = 0.61 The difference, 0.01, is exactly (dx)². For this function, Δy = 2x dx + (dx)². The first term is the differential and the second is the part the tangent line misses. Cut dx to 0.01 and the miss drops to 0.0001: ten times less input, a hundred times less error.
How wrong can the estimate be?
The error depends on how quickly the slope changes, which is what the second derivative measures. If f″ exists between a and x and its absolute value never exceeds M there, then:
|f(x) − L(x)| ≤ (M/2)·(x − a)² For √x on the interval from 4 to 4.1, the second derivative is −1/(4x^(3/2)). Its size is largest at x = 4, where it equals 1/32. The bound is (1/64)·(0.1)² ≈ 0.000156, and the actual error was about 0.000154.
The sign of f″ tells you the direction. If f″ < 0 on the interval, the graph is concave down, the tangent line sits above it, and your estimate is an overestimate. Both roots above are concave down for positive x. If f″ > 0, as with eˣ or x², the tangent line gives an underestimate.
To do better than a line, add a squared term, then a cubed term, and so on. That path leads to Taylor series, where linear approximation is the first step.
Tracking measurement error
Say you measure the radius of a ball as 10 cm, with a possible error of 0.05 cm. How uncertain is the computed volume V = (4/3)πr³?
dV = 4πr²·dr (differentiate V)
= 4π·100·0.05 (r = 10, dr = 0.05)
= 20π ≈ 62.8 cm³ The volume itself is about 4,189 cm³. Dividing gives a relative error, meaning the error as a fraction of the value, of about 0.015 or 1.5 percent. The radius had a relative error of 0.5 percent.
The factor of three comes straight from the exponent: dV/V = 3 dr/r. In general, if y is a constant times xⁿ, then dy/y = n dx/x. Squaring a quantity roughly doubles its relative error, and taking a square root roughly halves it. The article on absolute and relative error says more about the distinction.
With several inputs, each contributes its own term through partial derivatives. For a rectangle of sides a and b, the change in area is approximately b·da + a·db.
Working backward from a tolerance
Differentials also answer the reverse question: how carefully must you measure to keep a result within bounds?
Say you need the volume of a cube to within about 3 percent, and you will compute it from a measured side s. Since V = s³, you have dV/V = 3 ds/s. Requiring |dV/V| ≤ 0.03 gives |ds/s| ≤ 0.01, so the side needs to be right to about 1 percent. For a side near 20 cm, that is about 2 mm.
The same reasoning applies to a period of a simple pendulum swinging through small angles, T = 2π√(L/g). Because T depends on the square root of the length L, dT/T = (1/2) dL/L. A string that is 1 percent too long makes the period about 0.5 percent too long.
These are first-order estimates. For tolerances of a few percent they are usually excellent. For a 50 percent uncertainty, compute the function at both extremes instead of trusting a straight line.
Mistakes to watch for
A few errors account for most wrong answers.
- Evaluating the slope at the wrong point. Use f′(a) at the base point, not f′(x) at the target.
- Using degrees in trigonometry. The rule that the derivative of sine is cosine holds in radians. To estimate sin 31°, write the step as π/180 radians.
- Losing the sign of dx. For √3.9 with a = 4, the step is −0.1 and the estimate is 1.975.
- Choosing a distant base point. Estimating √9 from a = 4 gives 3.25, an error of more than 8 percent.
- Treating ≈ as =. The tangent line is a model of the curve, valid locally.
The method also fails where there is no derivative. The function |x| has a corner at 0, and no single line imitates both sides.
Where the idea goes next
Linearization is the engine inside Newton's method, which solves f(x) = 0 by repeatedly solving L(x) = 0 instead. It drives Euler's method for differential equations, which follows a short tangent segment, recomputes the slope and repeats.
The notation dx and dy also reappears inside integrals. When you change variables, you convert dx into a multiple of du using exactly the rule dy = f′(x) dx. A differential is therefore a habit worth getting comfortable with early: it carries units, scales sensibly, and records how one quantity responds to another.
Whenever a curved relationship is too awkward to handle directly, asking what it looks like up close is a reasonable first move.