Derivatives and local change: the best nearby straight line
Build the derivative from a difference quotient and interpret its sign, units, and local approximation.
On this page
The question for today
What you’ll understand
- Derive the derivative of a quadratic using a limit.
- Interpret derivative units and distinguish slope from function height.
- Use a tangent approximation and identify where it can fail.
Average speed compares two positions over a nonzero interval. Instantaneous velocity asks how position changes locally at one time. Rather than dividing by an interval of zero, calculus studies what average rates approach as the interval shrinks. The same idea measures the sensitivity of a prediction to an input or a loss to a model parameter. A derivative is local information, so knowing it at one point does not describe an entire journey.
Start with a change you can actually divide
For a nonzero input step , subtract the initial output from the final output and divide by the input change. This difference quotient is the slope of a secant line through two graph points. The derivative is its limit as tends to zero, if a finite common limit exists from allowed directions. A small step estimates the derivative; the limiting process defines it.
The units follow directly from this construction. A position in meters differentiated with respect to time in seconds gives meters per second. Differentiating velocity again gives acceleration in meters per second squared. A negative derivative means the output decreases when the input increases locally; it does not mean the output itself is negative. A vehicle can have positive position and negative velocity simultaneously.
Derive a rule instead of memorizing it
For , expand before simplifying. Subtracting leaves , and division by nonzero gives . The final limit is . This example exposes the role of algebra: it removes the apparently problematic denominator while preserving the quotient for every nearby nonzero step, just as with a removable hole.
The tangent slope therefore varies with the input even though the function has one fixed formula. At zero it is zero; at positive inputs it is positive; at negative inputs it is negative. A horizontal tangent is not the same as a constant function. The quadratic changes on either side of zero even though its first-order change vanishes exactly at that point.
A tangent is a local prediction
A differentiable function is approximated near by its value there plus slope times input change. The approximation error, divided by the size of that change, tends to zero. For , the omitted term is exactly the square of the step. This gives a concrete reason to prefer smaller steps when using the tangent for prediction, provided numerical measurement error does not dominate.
Not every continuous function has a derivative. The absolute-value graph has a corner at zero: slopes approach minus one from the left and plus one from the right. A single tangent slope cannot represent both. In machine learning, derivatives guide optimization where the model is differentiable; nonsmooth points require additional conventions or tools. A derivative also describes sensitivity, not a causal effect unless the model supports that interpretation.
Work it through
Predict a nearby square
Use the derivative of f(x) = x² at x = 3 to approximate f(3.1), then compare with the exact value.
At x = 3 the function value is 9 and its derivative is 2 × 3 = 6. The input step to 3.1 is 0.1.
The tangent predicts output change 6 × 0.1 = 0.6, giving an approximate new value of 9.6.
Compute the exact square: 3.1² = 9.61. The difference is 0.01, equal to the omitted step-squared term 0.1².
The local approximation is 9.6, with exact error +0.01 in the true output. It is accurate nearby, not exact.
The living notebook
Explore the model
Interactive lab · function
Compare a quadratic with its tangent
Choose coefficient a and position x for . The lab displays the tangent slope at the selected point. Pause at negative, zero, and positive x and compare slope with height. The derivative is computed analytically; this is not a finite-difference error simulator.
- y at chosen x
- 0.608
- Tangent slope · 2ax
- 1.35
- Signed area · ax³/3
- 0.182
This lab uses only y = ax². Playback traces the curve within the fixed integration interval from 0 to x; it does not estimate numerical error or change the chosen point. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forTangent slope measures local change, which can be zero even when the function is not constant.
Pause & reason
Check your understanding
Your turn
Try it yourself
Let g(x) = 3x². Find g′(2), approximate g(2.05), and compute the exact error of that approximation.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
The constant factor multiplies both the derivative and the quadratic remainder.
Compare with the solution
The derivative is , so . Since g(2) = 12 and h = 0.05, the tangent predicts 12.6. Exact expansion gives an additional , so g(2.05) = 12.6075. The tangent underestimates by 0.0075.
Keep the idea
Take it with you
- A derivative is a limit of finite-step rates, not division by zero.
- Slope has output units per input unit and differs from output height.
- Differentiability supplies a local straight-line model with controlled small-step meaning.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.