Hypothesis Toggle Plotter

An interval theorem (intermediate value, extreme value, mean value / Rolle, mean value for integrals) on a graph whose hypotheses are switches. The learner drags a level line, the interval ends or a tangent point and watches the guaranteed point appear; switching continuity, closed or bounded ends, or differentiability off swaps in a counterexample and the conclusion fails (or survives by luck), with each hypothesis checked live.

Used in: Mathematical Analysis, Single Variable Calculus

Props

PropTypeDefaultDescription
titlestringby mode ("Intermediate values", "Maximum and minimum on an interval", "Tangent parallel to the chord", "Average value of a function")Card title.
modestringmvt when slopeBounds is given, evt when showCandidates is true, else ivtWhich theorem is drawn. ivt: a draggable level N with the band between f(a) and f(b) and the points where f(x) = N. evt: the maximum and minimum on the interval, marked as attained, only approached (open or infinite end, beside a jump) or unbounded. mvt: the chord, a tangent dragged along the graph, and the points c where the tangent is parallel to the chord (Rolle when f(a) = f(b)). average: a draggable level, the area of f above and below it and the rectangle N(b - a), balancing at the average value (mean value theorem for integrals).
fstring"x^3 - x - 1"The function of x (a leading "y =" is ignored). Supports + - * / ^, implicit multiplication, |u|, comparisons (1 or 0), if(cond, a, b), sin cos tan sec csc cot and inverses, sinh cosh tanh, sqrt cbrt exp ln log abs sign floor ceil min max, pi, e. Odd roots of negatives are real (x^(2/3)).
pieces{f: string, when?: string}[]nonePiecewise function instead of f: the first piece whose condition holds gives the value; a piece without when is "otherwise". Conditions are comparisons in x, chained or joined by "and": "x < 1", "0 <= x < 1", "x != 0".
points[number, number][]noneIsolated values [x, y] that replace f at single points (a moved or removable point), drawn as a filled dot with a hollow dot on the curve.
excludenumber[]nonePoints removed from the domain (f undefined there), e.g. [0] for sign(x) on a domain with a gap.
interval[number | string, number | string] | string | {left: [number | string | null, "closed" | "open" | "infinite"], right: [...]}[0, 2]The interval I: [a, b] (closed), or interval notation as a string such as "(0, 1]", "[0, inf)", "(-inf, inf)", or the object form. Ends may be expressions ("pi/2").
togglesstring[]ivt and average: ["continuous"]; evt: ["closed", "bounded", "continuous"]; mvt: ["continuous", "differentiable"]Hypothesis switches shown, from continuous, closed, bounded, differentiable. Each switch shows whether that hypothesis holds right now. Switching continuous off swaps in jumpVariant, differentiable off swaps in cornerVariant, closed off opens the finite ends, bounded off sends the right end to infinity. A switch is greyed out when the example already breaks that hypothesis.
startOffstring[][]Hypotheses switched off at the start (same names as toggles), so the page opens on the counterexample.
jumpVariantstring | {f?, pieces?, points?, exclude?}automaticThe version of f used when continuity is switched off. Without it: ivt a jump at the crossing of the level, evt the extreme point moved off the curve, mvt the end value f(b) moved so no tangent can match the chord, average a step function.
cornerVariantstring | {f?, pieces?, points?, exclude?}automatic (a tent over the chord with a corner)The version of f used when differentiability is switched off (mvt).
levelnumberivt: halfway between f(a) and f(b); average: 30% up the range of fStarting height of the draggable level line (N in ivt and average). In evt mode it adds a draggable level M and marks where f(x) <= M, a closed piece of the domain when f blows up at both ends.
levelRange[number, number]the y rangeRange the level line can be dragged over.
showImageIntervalbooleanfalseivt: draw the set of values taken, f(I), as a bar on the y side and give it in interval notation (gaps where the graph jumps).
showCandidatesbooleanfalseevt: the closed interval method table: the ends and the critical numbers with their values, maximum and minimum marked; open or infinite ends are listed with the limit they approach.
showDerivativeSignbooleanfalseColour the graph on the interval where f' > 0 (rising) and f' < 0 (falling).
slopeBounds[number, number]nonemvt: bounds m <= f'(x) <= M; draws the lines of slopes m and M from (a, f(a)) and checks m(b - a) <= f(b) - f(a) <= M(b - a) (mean value inequality), with the actual range of f' on (a, b).
lockIntervalbooleanfalseFix the ends a and b (no drag handles), e.g. for a physical domain.
xRange[number, number]the interval padded by 15% (infinite ends drawn some way out)Visible x range.
yRange[number, number]fitted to f and its counterexample variantsVisible y range.
presets{label, ...props}[]noneFurther examples in an Example dropdown (counterexamples that break a hypothesis, or contrast cases). A preset that sets f, pieces, points or exclude drops the main example's jumpVariant, cornerVariant, level and yRange; other props are inherited.
presetLabelstring"Main example"Dropdown name of the configuration given by the props themselves.
controlsstring[]all controls shownIds of the hideable controls to show (see the controls registry); core ones always show. Absent = everything. Fitted per page by tooling, not by hand.