Linear approximation in this visualization
The linear approximation of a function at a point , also called the tangent line approximation or local linearization, is the tangent line . It exists where is differentiable at . Also written , with for . This page shows it on seven functions: four smooth ones, and three that are not differentiable at 0.
The graph is centred horizontally on the blue point P , with equal scales on both axes. The red step Δx also sets the zoom: the view shrinks with it, stretching as needed to keep P, the tangent's rise and Q in sight. Over the step the tangent line rises by the blue differential , while the curve rises by . The yellow arrow is the error:
A function is differentiable at exactly when there is a finite number with , that is, the error divided by tends to 0 as from both sides; then . The page draws the step to the right only (), so the picture illustrates this rather than proves it; where a tangent exists is read from each function's formula. Because the view shrinks together with , says roughly how far, in view sizes, the curve has strayed from the line at Q, which is why a differentiable curve looks straighter the further you zoom in. If , then for small , so once is small each tenfold zoom makes the error about a hundred times smaller. Where , as for at 0, it shrinks faster still.
What not to misread
- "It looks straight" is a picture, not a proof. A curve can look straight at every zoom you try and still bend at a smaller scale. The verdicts on this page (tangent line or none) come from each function's formula, not from the screen.
- At a corner, as for at 0, the picture is the same V at every zoom. No single line fits, so there is no linear approximation. The one-sided slopes are −1 and 1.
- at 0 does straighten, but into the vertical line . A vertical line has no slope, so there is no approximation of the form . At the cusp of both sides turn straight up.
- The approximation is local. For a fixed step it can be poor: at the line through at 0 gives 2 instead of 2.718.
Where it is used
- Estimates by hand: (the true value is about 2.02485), or for small angles, as in the simple pendulum.
- Newton's method finds a zero of by solving again and again. In measurement, the differential estimates how an error in carries over to .
Controls
- Drag the graph sideways to slide the curve under P (a changes); scroll with the graph focused, or pinch, to zoom (Δx changes). Zoom in makes Δx ten times smaller at each step; Overview shows where the view sits on the whole curve, and a press or a drag in it moves P there.
- Presentation mode opens a full-screen view for projectors (Space zooms, ← → change Δx tenfold, H hides the answers).