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.
Class 11–12Class 11 Maths: Limits and Derivatives; Class 12 Maths: Application of Derivatives
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.
Slope of f(x) = x³ at x = 2 from first principles. The exact answer from the power rule is f′(x) = 3x², so f′(2) = 12.
h = 0.1: (2.1³ − 2³) / 0.1 = (9.261 − 8) / 0.1 = 12.61.
h = 0.01: (2.01³ − 8) / 0.01 = (8.120601 − 8) / 0.01 ≈ 12.06.
The error falls from 0.61 to 0.06: ten times smaller h, about ten times smaller error, as expected for a forward difference.
Chain rule: for sin(x²), the derivative is cos(x²) × 2x, so at x = 1 the slope is 2 cos 1 ≈ 1.08. In the lab, put x = 1 on x² and shrink h from 1 to 0.01 to see the same pattern.
The instantaneous rate of change of a function: the slope of its tangent line at a point. It is the limit of the secant slope [f(x + h) − f(x)] / h as h shrinks to zero.
A secant joins two points on the curve and gives an average slope. A tangent touches the curve at one point and gives the exact slope there; it is what the secant becomes as the points merge.
At peaks, valleys and flat points of the curve, where the tangent is horizontal. That is why setting f′(x) = 0 finds maximum and minimum values.