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
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | per mode ("An equation as two graphs", "An inequality as two graphs", "Is it an identity?") | Title bar text. |
| mode | string | from 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. |
| equation | string | "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. |
| inequality | string | none | An inequality "left < right" (also <=, >, >=, ≤, ≥); selects inequality mode. |
| identity | string | none | A claimed identity "left = right" (true or false); selects identity mode. |
| steps | (string | {equation: string, label?: string, yRange?: [number, number]})[] | none | Equation 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. |
| step | number | 0 (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?}[] | none | One slider per parameter used in the sides (e.g. c in "ln(c*x) = ln(c) + ln(x)"). |
| probe | number | string | 70% of the way across the view | Starting 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] | none | Two 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. |
| showDifference | boolean | false (always on in identity mode) | Equation and inequality modes: add the panel of left - right below the graphs, whose zeros are the crossings. |
| shadeDomains | boolean | false | Add 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 range | Visible y range of the original equation (steps are fitted separately). |
| presets | {label, ...props}[] | none | Other 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. |
| presetLabel | string | "Main example" | Dropdown name of the configuration given by the props themselves. |
| controls | string[] | all controls shown | Registry ids of the optional panels and readouts to show (core controls always show). Fitted per node by tooling; absent shows everything. |
PreviousNext