Rolles Theorem and the Mean Value Theorem
Author: Jamie Mulholland

Rolle's Theorem

Mean Value Theorem

Ax = Point(xAxis)
Bx = Point(xAxis)
xinterval = Segment(Ax, Bx)
f(x) = -2.0 * (0.1 * (x - 11.397460937499998) - 0.54)^(3.0) - 2.0 * (0.1 * (x - 11.397460937499998) - 2.54)^(2.0) + 0.1 * (x - 9.397460937499998) - 7.54 + 33.455390625
C = Point(xinterval)
a: x(C)
P: (a, f(a))
ft = Tangent(P, f)
T = Slope(ft)
A: (x(Ax), f(x(Ax)))
aSegment = Segment(A, Ax)
B: (x(Bx), f(x(Bx)))
bSegment = Segment(B, Bx)
T2: "Tangent slope = " + T
Px: (a, 0.0)
pSegment = Segment(P, Px)
h(x) = f(x) - ((f(35.0) - f(5.0)) / 30.0 * (x - 5.0) + f(5.0))
ht = Tangent((a, h(a)), h)
hs = Slope(ht)
Q: (a, h(a))
T3: "Tangent Slope = " + hs
qSegment = Segment(Px, Q)
toggle = 0 (slider from 0 to 1, step 1)
secant = Line(A, B)
T1: "Secant Slope = " + (Slope[secant])