Math Applets

Rolle’s Theorem

Rolle's Theorem:

Let f:[a,b]Rf : [a,b] \to \mathbb{R} be continuous on [a,b][a,b] and differentiable on (a,b)(a,b). If f(a)=f(b)f(a) = f(b) then there exists at least one ξ(a,b)\xi \in (a,b) such that f(ξ)=0.f'(\xi) = 0.


How to use the applet

  • Drag the green point aa along the xx-axis to choose the left endpoint.
  • The red point bb is computed automatically so that f(a)=f(b)f(a)=f(b) (here b=ab=-a), so the main hypothesis of Rolle’s theorem is always satisfied.
  • The dashed vertical segments indicate the values f(a)f(a) and f(b)f(b).
  • The purple points ξ\xi mark the critical points of the chosen function f(x)=x42x2f(x)=x^4-2x^2, and a purple tangent is drawn there when ξ(a,b)\xi\in(a,b).
  • As you move aa, the interval (a,b)(a,b) changes.
  • Whenever at least one of the marked points ξ\xi lies strictly between aa and bb, the tangent at that point is horizontal, illustrating f(ξ)=0f'(\xi)=0.
  • For this function, the critical points are ξ{1,0,1}\xi\in\{-1,0,1\} (since f(x)=4x(x21)f'(x)=4x(x^2-1)), and the applet shows exactly which of them fall inside (a,b)(a,b).

Loading graph…
  • Hold Shift + scroll to zoom
  • Hold Shift + drag to move
  • Points shaped like <> act as sliders

Description

Link to code.

Reference: Lecture Notes Calculus 1 ( May22,2022 ) Theorem6.9 page 104

The applet is an attempt to visualize the Rolle’s theorem interactively. The student drag points aa and bb, to change the interval.

When the theorem conditions are met (f(a)=f(b)f(a) = f(b)):

const eps = 0.1;

function rolleConditionHolds() {
    return Math.abs(f(pointA.X()) - f(pointB.X())) < eps;
}

The student can see horizontal tangent lines for each critical point ξ\xi inside the interval. Using a symmetric function helps the student create this condition.

Morover the chosen function is simple to deal with for calculting its critical points.

Indeed f(x)=x42x2f(x) = x^4 - 2x^2 with f(x)=4x34x=4x(x21)f'(x)=4x^3 - 4x = 4x(x^2 -1). Therefore f(x)=0f'(x)=0 for x=1,1x= 1, -1 and x=0x=0.

const xis = [-1, 0, 1];

xis.forEach((xi) => {

    const pointXiX = createPoint(
        board,
        [xi, 0],
        {
            name: `ξ`,
            visible: () => xiVisible(xi),
        },
        COLORS.purple
    );

    const pointXi = createPoint(
        board,
        [xi, f(xi)],
        {
            name: "f(ξ)",
            visible: () => xiVisible(xi),
        },
        COLORS.purple
    );
...