Function Family Explorer
The learner moves named parameter sliders (or drags a point the curve must pass through) and watches one member of a family of curves change against a ghosted parent f, comparison curves and other members. Options add a dropdown of parent functions, a reflection in y = x, a draggable tangent with its slope, a derivative panel, a shaded interval with its integral, one-sided limit rows, live readouts, implicit equations, stacked panels and example presets.
Used in: Single Variable Calculus, Ring Theory
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | "Function family explorer" ("Family of curves" for implicit, "Linked families" for panels) | Title bar text. |
| family | string | "y = a*f(x - h) + k" | The family: an expression in x (or `variable`) and the parameters, e.g. "y = b^x", "y = x^3 - 2*x^2 + x + C", "y = a*f(b*x)". A leading "y =", "v =" or "F(x) =" names the left side. f(...) calls the parent function. Functions: sin cos tan sec csc cot arcsin arccos arctan sinh cosh tanh asinh acosh atanh sqrt cbrt exp ln log log10 log2 abs sign floor ceil round min max if(cond, a, b); |u| bars; implicit multiplication. With implicit: true, an equation in x and y such as "x^3 + y^3 = 3*a*x*y". Names that are not parameters become sliders (-5 to 5, starting at 1). |
| familyLabel | string | the family formula | Legend label of the current member ($...$ TeX). |
| parent | string | string[] | none ("y = x^2" when the family calls f) | The function f, drawn ghosted (dashed gray). A list gives a dropdown so the learner can apply the same transformation to several functions (e.g. even and non-even examples). |
| parameters | {name, min?, max?, initial?, step?, values?: number[], exclude?: number[], label?, description?}[] | a, h, k for the default family; otherwise sliders for the family's free names | One slider per parameter. `values` makes a slider that steps through a list (e.g. compounding n = 1, 2, 4, 12, 365). `exclude` lists values at which the family is not drawn, with a note (e.g. base b = 1). |
| variable | string | "x" ("t" when the family uses t and not x) | Name of the independent variable. |
| compare | string | (string | {expr, label?})[] | none | Comparison curves drawn dashed in their own colours, with legend entries. They may use the parameters and f, e.g. the two product-to-sum terms, the parabola approximating a catenary, or y = ln(x)/ln(a). An equation that is not "y = ..." (e.g. "x + y + a = 0") is drawn as an implicit curve. |
| members | number[] | none | Values of the first slider parameter at which other members of the family are drawn faintly (e.g. C = -2, -1, 0, 1, 2 for a general antiderivative). |
| anchorPoint | [number, number] | [number, number][] | none | Draggable point(s) the curve must pass through. The parameter named in `solveFor` (default: the first slider parameter) is solved from each point and read out instead of having a slider (an initial condition y(x0) = y0). |
| solveFor | string | string[] | the first parameter(s) | Parameter solved from each anchor point, in order. |
| markPoint | [number | string, number | string] | [number | string, number | string][] | none | Fixed point(s) marked with their coordinates, e.g. (0, 1) every exponential passes through. Coordinates may be parameter expressions ("3*a/2"). |
| showTangentsAt | number | string | none | x where a tangent line is drawn on the current member (and on every member in `members`); the point of tangency can be dragged along the curve and its slope is read out. |
| showDerivative | boolean | false | Add a panel with the derivative of the current member (computed numerically). |
| derivative | string | none | Closed form of the derivative (in x and the parameters) for the derivative panel, e.g. the rate whose antiderivatives the family lists. Implies the panel. |
| readAt | number | none | x at which the current member's value is marked and read out (a prediction such as p(100) or Q(5)). |
| shadeInterval | [number | string, number | string] | none | Interval [a, b] shaded under the current member, with the integral of the member over it read out. |
| limitAt | number | string | none | x = a (may be a parameter expression) where the one-sided behaviour of the current member is read out: a value, +∞ or −∞. |
| limitSide | string | "both" | Which one-sided limits limitAt reads out. |
| showInverse | boolean | absent (no switch) | Adds the switch "Reflect in y = x" that draws the reflection of the curve (the graph of the inverse) and the line y = x; true starts with it on. |
| showDifference | boolean | false | Row with the difference between the family and the first compare curve over the view: "constant 0.693" when the two differ by a constant. |
| readouts | {label, value}[] | none | Live readout rows: `value` is an expression in the parameters, which may call F(x) (the current member) and f(x) (the parent), e.g. {"label": "$k = \\ln a$", "value": "ln(a)"} or {"label": "$F(3) - F(1)$", "value": "F(3) - F(1)"}. |
| vlines | (number | string)[] | none | Dashed vertical guides; positions may be parameter expressions ("T", "2*T"). |
| hlines | (number | string)[] | none | Dashed horizontal guides; positions may be parameter expressions. |
| xRange | [number, number] | [-5, 5] | Visible x range. |
| yRange | [number, number] | from the starting curve (and parent) | Visible y range; fixed while the sliders move. |
| xLabel | string | "$x$" | x-axis title ($...$ TeX). |
| yLabel | string | the left side of the family | y-axis title ($...$ TeX). |
| equalAspect | boolean | false | Same scale on both axes (for curves where shape matters, e.g. a folium or a reflection in y = x). |
| implicit | boolean | false | The family is an equation in x and y, drawn as a curve (contour); tangents, derivative, shading and anchor points are not available. |
| panels | object[] | none | Stacked panels sharing the x axis; each item takes the view props above (family, parameters, anchorPoint, compare, yLabel, title, ...), e.g. velocity then position from acceleration. |
| presets | {label, ...props}[] | none | Other examples offered in an "Example" dropdown; each overrides the props it names. |
| presetLabel | string | "Main example" | Dropdown name of the configuration given by the props themselves. |
| controls | string[] | all controls shown | Registry ids of the optional toggles, readouts and panels to show (core controls always show). Fitted per node by tooling; absent shows everything. |
PreviousNext