Mean Value Theorem
Mean Value Theorem:
Let be continuous on and differentiable on . Then there exists a such that
How to use the applet
- Drag the points (green) and (red) along the -axis to change the interval .
- The points and are marked on the graph.
- The red line is the secant through and . Its slope is .
- The point (purple) is computed so that equals this secant slope.
- The purple line is drawn parallel to the secant through , visualizing that the tangent slope at matches the secant slope.
- As you move and , the secant slope changes, and the applet updates accordingly.
- The theorem guarantees that at least one such point exists (for functions continuous on and differentiable on ); in this example the applet displays one solution.
Loading graph…
- Hold Shift + scroll to zoom
- Hold Shift + drag to move
- Points shaped like <> act as sliders
Description
Reference: Lecture Notes Calculus 1 ( May22,2022 ) Figure6.6 and Theorem6.10 page 104
To demonstrate the theorem i have selected a simple function with derivative .
const f = (x: number) => 0.2 * x * x * x - 0.5 * x * x + 2;
// const fPrime = (x: number) => 0.6 * x * x - x;
Points and can be adjusted. The secant is just a line passing though and . To construct i solved the equation:
Giving .
Solving with the quadratric formula: .
If the discriminant is negative or does not lie on the interval i return NaN (not a number).
function findC(): number {
const a = pointA.X();
const b = pointB.X();
const fa = f(a);
const fb = f(b);
const secantSlope = (fb - fa) / (b - a);
const discriminant = 1 + 4 * 0.6 * secantSlope;
if (discriminant < 0) {
return NaN;
}
const cPos = (1 + Math.sqrt(discriminant)) / (2 * 0.6);
const cNeg = (1 - Math.sqrt(discriminant)) / (2 * 0.6);
const minAB = Math.min(a, b);
const maxAB = Math.max(a, b);
if (cPos >= minAB && cPos <= maxAB) {
return cPos;
} else if (cNeg >= minAB && cNeg <= maxAB) {
return cNeg;
} else {
return NaN;
}
}
Finally the tangent line (best approximation of ) has to be parallel to the secant.
board.create('parallel', [secant, pointC],...)