Terms and Partial Sums
The learner drags the index N (and any parameter sliders) and watches the dots a_n and, for a series, the partial sums S_N against n: partial sums level off exactly when the series converges. Options add a known sum, a closed form or bound for S_N, a comparison series, ratio / root statistics, an epsilon band, monotone and bounded readouts, absolute values and one-sign parts, a number-line view of alternating partial sums with the error bracket, and a rearrangement mode that chases a target.
Used in: Mathematical Analysis, Single Variable Calculus
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | by mode ("Terms of a sequence", "Terms and partial sums", ...) | Card title. |
| note | string | none | One short sentence under the formula line ($...$ TeX allowed). |
| terms | string | "1/2^n" | a_n as an expression in n (N and k mean n too) and the parameter names. A leading "a_n =" is ignored. Supports + - * / ^, implicit multiplication, |u|, n! and factorial(n), comparisons (< <= > >= == != give 1 or 0), if(cond, a, b), mod(a, b), choose(n, k), sin cos tan (and inverses), sinh cosh tanh, sqrt cbrt exp ln log (natural) log10 log2 abs sign floor ceil round min max, pi, e. |
| termsTex | string | printed from terms | TeX for a_n in the formula line when the automatic printing is not what the page uses. |
| startIndex | integer | 1 | First index n0 (0 for series such as the sum of r^n from n = 0); S_N adds a_n0 to a_N. |
| parameters | {name, min, max, initial?, step?, label?}[] | [] | Named parameters, each with a slider; usable in terms, compare, sum, the curves and reference lines. n, N and k are reserved. |
| N | integer | 10 | Starting value of the index slider: the plots show n = n0 to N. |
| NRange | [integer, integer] | [n0, max(50, N)] | Range of the index slider (the upper end is capped at 2^20 = 1048576). |
| logN | boolean | true when NRange spans 1000x or more | Logarithmic index slider and n axis (dots are thinned to about 400). |
| showPartialSums | boolean | false (true in the bare demo) | Adds the panel of partial sums S_N against N and the S_N readout. |
| sum | number | string | none | The verified sum S of the series, drawn dashed on the partial-sum panel with the S - S_N readout. A string may use parameters; a value that is not a finite number (e.g. "if(abs(r) < 1, a/(1 - r), 0/0)" for |r| >= 1) hides the line. |
| partialSumCurve | string | none | A closed form or bound for S_N as an expression in n (e.g. "n^2", "1 - 1/(n+1)", "1 + log2(n)/2"), drawn dashed over the partial sums with its value at N. |
| partialSumCurveLabel | string | "closed form" | Legend label of partialSumCurve ($...$ TeX allowed). |
| termCurve | string | none | A continuous function f(x) whose values at x = n are the terms (x or n as the variable), drawn dashed through the dots. |
| termCurveLabel | string | "$f(x)$" | Legend label of termCurve. |
| referenceLines | (number | string | {y, label?, panel?})[] | [] | Horizontal reference lines (a limit, a target). Strings may use parameters. They go on the partial-sum panel when it is shown, else on the term panel; panel ("terms", "sums") overrides. In the number-line view they are vertical. |
| epsilonBand | {L, epsilon, max?} | none | A band L +- epsilon around a limit on the term panel with an epsilon slider (up to max) and the sentence saying from which n on every shown term stays inside. |
| bounds | string | "none" | Lines at the max and/or min of the shown terms with their values: both, upper or lower. |
| showMonotone | boolean | false | Colours each step between consecutive terms (green up, red down) and says from which n on the shown terms increase or decrease. |
| showTailBounds | boolean | false | Step curves of the tail supremum and infimum sup/inf of a_k over k >= n (over the computed range) with their values at N. |
| limsup | number | none | With showTailBounds: the verified lim sup, drawn dashed. |
| liminf | number | none | With showTailBounds: the verified lim inf, drawn dashed. |
| compare | string | none | A comparison series b_n (expression in n and the parameters, e.g. "C/n^p"), drawn hollow on the term panel and, with partial sums, on the partial-sum panel. |
| compareTex | string | printed from compare | TeX for b_n in the formula line. |
| compareLabel | string | "$b_n$" | Legend label of the comparison terms. |
| compareRelation | string | none | With compare: checks a_n <= b_n (below) or a_n >= b_n (above) over the shown range and says where it fails. |
| statistic | string | "none" | Adds a panel of a test statistic against n: ratio |a_(n+1)/a_n|, root |a_n|^(1/n), both, or compare (a_n/b_n, needs compare), with the line at 1. |
| statisticLimit | number | "infinity" | none | The verified limit of the statistic, drawn dashed, with the test's verdict. |
| statisticCurve | string | none | The simplified statistic as an expression in n (e.g. "5/(n+1)"), drawn dashed over the computed dots. |
| statisticCurveLabel | string | "simplified" | Legend label of statisticCurve. |
| sumCeiling | number | none | With partial sums: a level c and the sentence giving the first N with S_N > c (bounded partial sums). |
| absolute | string | "off" | Absolute values: toggle (a switch adds |a_n| and the partial sums of |a_n|), on (always shown) or off. |
| showParts | boolean | false | With partial sums: the running sums of the positive terms only and of the negative terms only. |
| view | string | "dots" | dots: a_n and S_N against n. numberLine: the partial sums S_k on a horizontal value axis, one row per k, zigzagging toward the sum. |
| showErrorBound | boolean | false | Shades the bracket between S_N and S_(N+1) (width |a_(N+1)|) and reads out the next term; with sum, checks |S - S_N| <= |a_(N+1)|. |
| rearrangeTarget | number | "infinity" | none | Rearrangement mode: add unused positive terms while the total is at most the target, negative terms while above, with a target slider; "infinity" passes 1, 2, 3, ... in turn. |
| targetRange | [number, number] | [-3, 3] | Range of the target slider. |
| rearrangePattern | {positive, negative} | none | Rearrangement mode: repeat p positive terms then q negative terms (with rearrangeTarget too, a switch chooses the rule). |
| rearrangeRule | string | "target" | With both rearrangeTarget and rearrangePattern: which rule the switch starts on (target or pattern). |
| presets | {label, note?, ...any of the series props}[] | none | Example dropdown. Each entry overrides the props it sets; one that sets its own terms also drops the base sum, curves, reference lines, compare and statistic limit. Make the first entry match the base props. |
| controls | string[] | all controls shown | Ids of the hideable controls to show (see the controls registry); core ones always show. Absent = everything. Fitted per page by tooling, not by hand. |
PreviousNext