📐 Derivative Visualizer
Drag the point to any position on the curve and slide h → 0 to watch the secant line converge to the tangent. See f(x) and f′(x) updated in real time for 8 classic functions.
Limit Definition of the Derivative
The derivative of f at x₀ is the limit of the secant slope as the second point x₀ + h approaches x₀:
f′(x₀) = limh→0 [f(x₀+h) − f(x₀)] / h
The cyan line is the secant — it connects (x₀, f(x₀)) and (x₀+h, f(x₀+h)). As h → 0 it converges to the tangent line. The red dot marks your chosen x₀.
Analytic Derivatives
d/dx sin(x) = cos(x)
d/dx cos(x) = −sin(x)
d/dx x² = 2x
d/dx x³ = 3x²
d/dx eˣ = eˣ
d/dx ln(x) = 1/x
d/dx √x = 1/(2√x)
d/dx |x| = x/|x| (x≠0)
Drag the red dot directly on the canvas or use the x₀ slider. Non-differentiable points (like the cusp in |x| at x=0) show where the limit fails to exist.