Region Area Explorer
Areas built from strips and compared. Between curves the learner slides a strip (vertical or horizontal) and reads which curves its ends lie on and where the region must be split; substitution shows two linked panels where each strip of width dx becomes one of width g'(x) dx with the same area; parts shows the areas under and beside a curve filling the difference of two corner rectangles; a parametric mode colours the area under a traced curve by sign.
Used in: Mathematical Analysis, Single Variable Calculus
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | by mode ("Area of a region", "Two linked areas", "Two areas and a rectangle", "Area under a parametric curve") | Title bar text. |
| mode | string | "substitution" when inner is given, "parts" when curve is given, else "between" | between: a region bounded by curves; substitution: linked x and u panels; parts: areas under and beside a curve; parametric: signed area under a parametric curve (chosen only explicitly). |
| note | string | none | Caption under the readouts ($...$ TeX). |
| curves | (string | {curve, inverse?, label?})[] | y = 2x and y = x^2 | between: boundary curves "y = f(x)" or "x = g(y)" (a bare expression means y = ...). Without an interval the shaded region is what the curves enclose (any mix of x- and y-curves). `inverse` gives the curve solved for the other variable, one formula per branch (e.g. ["y = sqrt(x)", "y = -sqrt(x)"] for x = y^2); it is only used to write a strip's end as a formula in the other orientation. Formulas may use parameter names. |
| interval | [number | string, number | string] | none (between: the enclosed region; substitution: [0, 1]; parts: the curve's tmin..tmax) | between: limits a <= x <= b; with one or two curves in x the region is between them (one curve: between it and the x-axis). substitution: the x limits. parts / parametric: [start, initial end] of the parameter (x for an explicit curve). Entries may be expressions in the parameters ("pi/3", "b", "e"). |
| breaks | (number | string)[] | none | between: x values that cut the region into pieces, each shaded in turn and read out with its own area (additivity, e.g. [2, 4] on [1, 8]). |
| draggableLimits | boolean | false | between / substitution: the limits a and b get handles on the x-axis. |
| limitRange | [number | string, number | string] | the view (parts: from the start to tmax) | Range the dragged limits (between, substitution) or the end parameter (parts, parametric) may move in. |
| strips | string | "none" ("vertical" in the bare demo) | between: a draggable representative strip with the curves its ends lie on, the pieces where an end's formula switches (dashed lines) and the setup per piece; "both" adds a Vertical / Horizontal switch. |
| markIntersections | boolean | false | between: mark where the curves meet (computed numerically) and list the points. |
| showSigned | boolean | false | between (with an interval): also read out the net value of the integral of f - g, which cancels where the curves swap, next to the area. |
| decomposition | string | "none" | between: "sector-triangle" splits the area under y = sqrt(r^2 - x^2) on [0, b] into a circular sector and a right triangle (trigonometric substitution), with both areas read out. |
| integrand | string | f(g(x)) g'(x), computed | substitution: the integrand in x, e.g. "y = 2*x*cos(x^2)". It is checked against f(g(x)) g'(x) and a mismatch is reported. |
| inner | string | none ("u = x^2" in the default example) | substitution: the inner function "u = g(x)"; giving it selects the substitution mode. |
| outer | string | none | substitution: the integrand in u, f(u), so that integrand = f(g(x)) g'(x), e.g. "cos(u)", "y = -exp(u)/2" or "(1/2)/(1 + u^2)". |
| n | integer | 8 | substitution: starting number of strips (slider 2 to 40). |
| showInner | boolean | false | substitution: add a small panel graphing u = g(x) with the highlighted strip carried to the u axis. |
| curve | string | "param2d:x=exp(t),y=2*t+1,tmin=0,tmax=1.5" in the bare parts demo | parts / parametric: "y = f(x)" (the parameter is x) or "param2d:x=X(t),y=Y(t),tmin=..,tmax=.."; giving it selects the parts mode. |
| inverse | string | none | parts with an explicit curve: the curve solved for x (e.g. "x = exp(y)"), used to write the area beside the curve as an integral in y. |
| u | string | "y" | parts: the factor u = y(t) shown in the integration by parts line (e.g. "2*t + 1"). |
| v | string | "x" | parts: the factor v = x(t) shown in the integration by parts line (e.g. "exp(t)"). |
| exact | number | string | none | Verified exact value of the main area (between: total area; substitution: the common net area; parts / parametric: the area under the curve), shown while nothing has been dragged; a computed value that disagrees is flagged. |
| xRange | [number, number] | from the region | Visible x range (substitution: of the x panel). |
| yRange | [number, number] | from the region | Visible y range (substitution: shared by both panels). |
| uRange | [number, number] | from g on [a, b] | substitution: visible range of the u panel. |
| equalAspect | boolean | false | Same scale on both axes (circles, cycloids). |
| parameters | {name, min, max, initial?, step?, label?}[] | [] | Sliders for names used in the formulas and limits (e.g. the stretch a in u = a*x and the end b). |
| presets | {label, ...props}[] | none | Other examples offered in an "Example" dropdown; each overrides the props it names (it may change the mode); a null value unsets a prop of the main example (e.g. "exact": null). |
| presetLabel | string | "Main example" | Dropdown name of the configuration given by the props themselves. |
| controls | string[] | all controls shown | Registry ids of the optional readouts, toggles and panels to show (core controls always show). Fitted per node by tooling; absent shows everything. |
PreviousNext