What Is Linear Approximation?
Linear approximation estimates a function's value at a hard point x by using the tangent line at a nearby easy point a. The formula is L(x) = f(a) + f′(a)(x − a), where f(a) is the known function value and f′(a) is the derivative — the slope — at that same point. This linear approximation calculator builds the linearization for any function you enter, evaluates it at your x, and then does the honest thing most textbook exercises skip: it computes the true f(x) as well, and reports the absolute and relative error, so you can see exactly how much the straight-line shortcut costs.
Why Does the Tangent Line Approximate the Curve?
Zoom in far enough on any smooth curve and it looks straight — and the straight line it resembles is the tangent. The derivative f′(a) is defined as the limit of secant slopes, which is precisely the statement that near a, the function changes almost exactly like a line of slope f′(a). The approximation is therefore not a trick but the derivative's definition put to work. Its quality is governed by curvature: the error term is about (1/2)f′′(a)(x − a)^2, so it stays tiny while (x − a) is small and f′′ is moderate, and it degrades quadratically as you move away.
How to Use This Calculator
- Enter the function f(x) — the field starts with sqrt(x).
- Enter the center a: a point close to x where f(a) and f′(a) are easy — 25 is the classic choice near 26 because both come out exact.
- Enter the target x and press Approximate.
- Read the steps: the derivative f′(x), the two evaluations f(a) and f′(a), the tangent line equation, and the substitution that produces L(x).
- Judge the error: the panel shows the actual f(x), the absolute error and the relative error as a percentage.
Worked Example 1: Approximating sqrt(26)
Take f(x) = sqrt(x) and a = 25. Then f(25) = 5 exactly, and f′(x) = 1/(2·sqrt(x)) gives f′(25) = 1/10 = 0.1. The linearization is L(x) = 5 + 0.1(x − 25). At x = 26: L(26) = 5 + 0.1(1) = 5.1. The true sqrt(26) is 5.0990195…, so the estimate is high by roughly 0.001 — about 0.02%. The overshoot is predictable: sqrt is concave down (f′′ < 0), so its tangent line lies above the curve.
Worked Example 2: Approximating (2.1)^3
Take f(x) = x^3 and a = 2, where everything is exact: f(2) = 8 and f′(x) = 3x^2 gives f′(2) = 12. The linearization is L(x) = 8 + 12(x − 2), so L(2.1) = 8 + 12(0.1) = 9.2. The true value is 2.1^3 = 9.261, an error of 0.061 (about 0.66%). Compare the two examples: the distance |x − a| is 1 in the first and 0.1 in the second, yet the second error is larger — because x^3 curves much more strongly (f′′(2) = 12) than sqrt(x) does near 25 (f′′(25) = −0.004). Distance and curvature together decide accuracy, exactly as the error formula says.
Linear Approximation, Differentials and Taylor Series
Three course topics are this one idea in different clothes. Differentials rename the pieces: dx = x − a and dy = f′(a)·dx, so dy is the linear approximation of the change Δy. The Taylor series (degree 1) at a is exactly L(x); higher-degree Taylor polynomials add (x − a)^2, (x − a)^3 terms that bend with the curve and shrink the error — try the Taylor series calculator to see the same sqrt(26) estimate improve term by term. And the derivative itself comes from our derivative calculator, which is also what powers step 1 of every computation on this page.
Three Mistakes to Watch For
First, choosing a far from x when a nearer exact point exists — the error grows with the square of the distance. Second, evaluating the derivative at x instead of at a: the slope must come from the center point, f′(a). Third, trusting the estimate far from a without checking the error — near a vertical tangent or a corner (where f′ blows up or does not exist, like sqrt(x) at 0), linear approximation fails entirely. The critical points calculator shows the related skill of interrogating f′ and f′′ about a function's behaviour.