Mathematics · Simulator 041
Pick a function and drag a point along its curve. A secant line joins it to a second point h away. Shrink h and the secant turns into the tangent: its slope becomes the derivative. Watch the derivative graph build up underneath.
The slope of the secant through (x, f(x)) and (x + h, f(x + h)) is the difference quotient
[f(x + h) − f(x)] / h
As h → 0 this approaches the derivative f′(x), the slope of the tangent line and the instantaneous rate of change. The simulator shows both, with the exact derivative from the standard rules (power, chain, trigonometric and exponential derivatives).
The lower graph plots f′(x). Where f has a peak or valley, f′ crosses zero. Where f is steepest, f′ is extreme. The secant error shrinks roughly in proportion to h, which you can check in the readout.
Very small h (below about 10⁻⁸) gives rounding error in floating-point arithmetic, so the minimum h is limited.
For f(x) = x³, at which x values is the tangent line parallel to y = 3x?
Need f′(x) = 3x² = 3, so x = ±1. Drag the point to x = 1 and x = −1 and check that the slope reads 3.