Maths & numbers

Numerical derivative workspace

Estimate first and second derivatives and compare sensitivity to the chosen step.

Numerical derivative workspace
Esc to restore

Your inputs

Use explicit * and ^. Supports the same restricted functions as the function plotter; no JavaScript is executed.

Results update as you type. Larger files run when you press Update result.

Your result

Your result will appear here.

More actions

Your inputs stay in this browser. Nothing is uploaded, and nothing is saved unless you choose “Save result”.

A clear answer. Here’s how.

Uses five-point central finite differences at X−2h, X−h, X, X+h and X+2h. Repeats the first-derivative calculation at h/2 and reports the absolute change as a sensitivity diagnostic. Requires finite function values. Very small steps amplify rounding; large steps introduce truncation error. The sensitivity value is not a certified error bound.

See a worked example

Worked example

A fixed demonstration, separate from the values you enter above.

Expression in x
sin(x)
Evaluate at X
1
Central difference step h
0.001

Example result

First derivative estimate
0.540302305868
Second derivative estimate
-0.84147098478
First-derivative step sensitivity
0.000000000000111022302463

Five-point central differences. Step sensitivity compares h and h/2; it is not a certified error bound.