Equation as Two Graphs

An equation, inequality or claimed identity drawn as the graphs of its two sides. The learner drags x to compare the sides, steps through both-sides operations and watches the crossings (the solutions) stay put or change (extraneous and lost roots), reads where one graph lies below the other, or hunts for a counterexample to a false identity in the difference panel.

Used in: Single Variable Calculus

Props

PropTypeDefaultDescription
titlestringper mode ("An equation as two graphs", "An inequality as two graphs", "Is it an identity?")Title bar text.
modestringfrom the props (identity: identity; inequality, or an equation string with < > <= >=: inequality; else equation)equation: the crossings of the two graphs are the solutions, listed and counted. inequality: the x-intervals where the inequality holds are shaded and written as a solution set. identity: a claimed identity, with the difference panel left - right and a probe to find a counterexample.
equationstring"2^x = x + 2" (bare render)The equation "left = right" in x (and the parameters). Supports + - * / ^, implicit multiplication, |u|, pi, e, sin cos tan sec csc cot, asin acos atan, sinh cosh tanh, sqrt cbrt exp ln log log2 log10, log_b(u) for a numeric base b (log_2(x)), abs sign floor ceil round min max. With < > <= >= instead of = it is read as an inequality.
inequalitystringnoneAn inequality "left < right" (also <=, >, >=, ≤, ≥); selects inequality mode.
identitystringnoneA claimed identity "left = right" (true or false); selects identity mode.
steps(string | {equation: string, label?: string, yRange?: [number, number]})[]noneEquation mode: the equations after each both-sides operation, in order. The learner steps through them; the original crossings stay as dashed guides, and a crossing gained (extraneous) or lost at a step is flagged. Each step's y range is fitted unless it gives yRange.
stepnumber0 (the original equation)Equation mode with steps: the step shown first (1 = after the first both-sides operation).
parameters{name, min, max, initial?, step?, label?}[]noneOne slider per parameter used in the sides (e.g. c in "ln(c*x) = ln(c) + ln(x)").
probenumber | string70% of the way across the viewStarting x of the draggable probe that reads both sides at one input (a string is evaluated, "pi/3"). In equation and inequality modes it snaps onto a nearby crossing.
bracket[number | string, number | string]noneTwo draggable ends a < b: the sign of left - right at each end, the bracket width, a "Halve the bracket" button (bisection) and the Intermediate Value Theorem reading when the sign changes. With a bracket the crossings are not marked or listed (the learner narrows in on one), and the probe does not snap.
showDifferencebooleanfalse (always on in identity mode)Equation and inequality modes: add the panel of left - right below the graphs, whose zeros are the crossings.
shadeDomainsbooleanfalseAdd a strip showing where each side is defined, with both domains written as inequalities (for an identity: the inputs where it actually holds).
xRange[number, number][-5, 5]Visible x range; crossings and solution sets are found inside it.
yRange[number, number]fitted to both sides over the x rangeVisible y range of the original equation (steps are fitted separately).
presets{label, ...props}[]noneOther examples in an "Example" dropdown (e.g. a corrected or a false look-alike version of an identity, or more equations to solve); each overrides the props it names. A preset that sets equation, inequality or identity drops the main example's claim, steps, probe and bracket.
presetLabelstring"Main example"Dropdown name of the configuration given by the props themselves.
controlsstring[]all controls shownRegistry ids of the optional panels and readouts to show (core controls always show). Fitted per node by tooling; absent shows everything.