What Numerical Differentiation Is For
Sometimes you are asked for a derivative even though you are not given an equation that you can differentiate directly. Instead, you may be given a table of values, a graph, or measurements from an experiment. In these situations, you can approximate the derivative numerically.
The key idea is simple: a derivative is an instantaneous rate of change, while a secant slope measures the average rate of change between two nearby points. If those points are sufficiently close, the secant slope can provide a good approximation to the derivative.
As the second point gets closer and closer to the point of interest, the secant slope approaches the tangent slope. Numerical differentiation uses nearby values to estimate that tangent slope.
The Basic Difference Quotient
Suppose you want to approximate . If you know the function values at and , you can use the slope between those two points:
This is a forward difference because the second point is to the right of . It estimates the derivative using the current point and a nearby point to its right.
Forward Difference
The forward difference formula is especially useful when a table gives you the value at and the next value after it:
For a table of values, the most important thing is to use the actual spacing between the -values. Do not automatically divide by 1 unless the -values are actually one unit apart.
A function is given by the table below. Approximate using the forward difference.
| x | 2.0 | 2.1 |
|---|---|---|
| f(x) | 5.20 | 5.73 |
Backward Difference
You can also estimate a derivative using a point immediately to the left of the point of interest. This is called a backward difference.
Notice that this is still just a slope formula. The numerator is the change in the function values, and the denominator is the corresponding change in the input values.
Use the table to approximate with a backward difference.
| x | 3.8 | 4.0 |
|---|---|---|
| f(x) | 7.12 | 7.80 |
Symmetric Difference: Often the Best Approximation
If you have values on both sides of the point where you want the derivative, a symmetric difference can often give a better approximation than using only one side.
Here, the points are equally spaced around . The approximation uses the slope between the two outer points. Because the points are balanced on either side of the target, this method often reduces the bias that can occur when using only a forward or backward difference.
Suppose the following values are known:
| x | 4.9 | 5.0 | 5.1 |
|---|---|---|---|
| f(x) | 20.11 | 20.00 | 20.09 |
Why the Symmetric Difference Works
It helps to connect the numerical formula back to the definition of the derivative. The derivative at is the limit of the difference quotient as the interval becomes arbitrarily small:
A symmetric approximation instead uses a small distance on both sides:
As becomes small, this gives a close estimate of the tangent slope at . On AP Calculus problems, you generally do not need to prove why the approximation works. You need to recognize the appropriate difference quotient and calculate it correctly.
Choosing the Right Formula
- Forward difference: use the point of interest and a nearby point to the right.
- Backward difference: use the point of interest and a nearby point to the left.
- Symmetric difference: use equally spaced points on both sides when they are available.
- Secant slope: whenever you are estimating a derivative from two nearby points, remember that you are approximating the tangent slope with a secant slope.
Using a Graph
Numerical differentiation is not limited to tables. If a graph gives you coordinates of two points near , you can estimate the derivative by finding the slope between them.
For example, if two nearby points on the curve are and , then:
The closer the points are to the target and to each other, the more useful the secant slope is as an approximation to the tangent slope—provided the data are sufficiently accurate.
Using a Table with Unequal Spacing
This is a common place to lose points. The denominator must use the actual difference between the -values.
A table gives and . Approximate the derivative at using the two available points.
Common Mistakes
Always calculate . If the table moves from to , the denominator is , not 1.
If the problem asks for the derivative at , make sure your approximation is centered on or directly connected to that point. For a symmetric difference, the two points must be equally spaced around the target.
A difference quotient based on two distinct points is a secant slope, so it is an approximation unless the problem gives additional information. The derivative itself is the limiting instantaneous rate of change.
Keep several decimal places during intermediate calculations and round only at the end. Small rounding errors can become noticeable when the denominator is small.
Practice Problems
A function satisfies and . Approximate using a forward difference.
Show answer
A function satisfies and . Approximate using a backward difference.
Show answer
Given , , and , approximate using a symmetric difference.
Show answer
Why does the slope between two points close to provide an approximation to ?
Show answer
Test yourself: AP Calculus practice exams
Ready to check what you know? Work an AP-style practice exam, then open the full solutions.
Want all 1,114 practice problems?
This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.
Get the Calc Pass App
Scan to download and practice on the go, with instant scoring.
Vol. 1: 1,114 Questions
The complete practice question bank, organized by AB & BC topic.
View on Amazon