How to use this calculator
Estimate the first derivative at x using three equally spaced function samples to the right of the point.
- Enter f(x), f(x+h), f(x+2h), Step h. Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
How Three-point forward derivative calculator works
Estimate the first derivative at x using three equally spaced function samples to the right of the point.
Inputs and units
- f(x): f(x) is the value at the evaluation point.
- f(x+h): f(x+h) is one step ahead.
- f(x+2h): f(x+2h) is two steps ahead.
- Step h: h is a nonzero signed spacing.
Formula and method
f′(x)≈[-3f(x)+4f(x+h)−f(x+2h)]/(2h), with second-order truncation error for a sufficiently smooth function.
Worked example
For f(x)=x³ at x=1 and h=0.5, values 1, 3.375, and 8 give (−3+13.5−8)/1=2.5; the exact derivative is 3.
Interpreting the result
The estimate has units of function value divided by x. The example’s error is 0.5 because the formula approximates a curved function from a finite step.
Assumptions and limits
h=0 is invalid. The stencil is one-sided and is useful near a left boundary; noise and step size affect accuracy.
Sources and method
- Three-point forward first-derivative and central second-derivative stencils and their truncation orders are derived. UC Berkeley: numerical differentiation
Frequently asked questions
Why is the second sample weighted by four?
The coefficients come from differentiating the quadratic interpolant through the three equally spaced samples.
Is this exact for every quadratic?
Yes, in exact arithmetic; the leading truncation error depends on higher derivatives.
How do I use the Three-point forward derivative calculator?
Enter f(x), f(x+h), f(x+2h), Step h. Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Three-point forward derivative?
For f(x)=x³ at x=1 and h=0.5, values 1, 3.375, and 8 give (−3+13.5−8)/1=2.5; the exact derivative is 3.
What does the Three-point forward derivative calculator calculate?
Estimate the first derivative at x using three equally spaced function samples to the right of the point.