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

PropTypeDefaultDescription
titlestringby mode ("Terms of a sequence", "Terms and partial sums", ...)Card title.
notestringnoneOne short sentence under the formula line ($...$ TeX allowed).
termsstring"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.
termsTexstringprinted from termsTeX for a_n in the formula line when the automatic printing is not what the page uses.
startIndexinteger1First 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.
Ninteger10Starting 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).
logNbooleantrue when NRange spans 1000x or moreLogarithmic index slider and n axis (dots are thinned to about 400).
showPartialSumsbooleanfalse (true in the bare demo)Adds the panel of partial sums S_N against N and the S_N readout.
sumnumber | stringnoneThe 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.
partialSumCurvestringnoneA 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.
partialSumCurveLabelstring"closed form"Legend label of partialSumCurve ($...$ TeX allowed).
termCurvestringnoneA continuous function f(x) whose values at x = n are the terms (x or n as the variable), drawn dashed through the dots.
termCurveLabelstring"$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?}noneA 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.
boundsstring"none"Lines at the max and/or min of the shown terms with their values: both, upper or lower.
showMonotonebooleanfalseColours each step between consecutive terms (green up, red down) and says from which n on the shown terms increase or decrease.
showTailBoundsbooleanfalseStep curves of the tail supremum and infimum sup/inf of a_k over k >= n (over the computed range) with their values at N.
limsupnumbernoneWith showTailBounds: the verified lim sup, drawn dashed.
liminfnumbernoneWith showTailBounds: the verified lim inf, drawn dashed.
comparestringnoneA 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.
compareTexstringprinted from compareTeX for b_n in the formula line.
compareLabelstring"$b_n$"Legend label of the comparison terms.
compareRelationstringnoneWith compare: checks a_n <= b_n (below) or a_n >= b_n (above) over the shown range and says where it fails.
statisticstring"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.
statisticLimitnumber | "infinity"noneThe verified limit of the statistic, drawn dashed, with the test's verdict.
statisticCurvestringnoneThe simplified statistic as an expression in n (e.g. "5/(n+1)"), drawn dashed over the computed dots.
statisticCurveLabelstring"simplified"Legend label of statisticCurve.
sumCeilingnumbernoneWith partial sums: a level c and the sentence giving the first N with S_N > c (bounded partial sums).
absolutestring"off"Absolute values: toggle (a switch adds |a_n| and the partial sums of |a_n|), on (always shown) or off.
showPartsbooleanfalseWith partial sums: the running sums of the positive terms only and of the negative terms only.
viewstring"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.
showErrorBoundbooleanfalseShades 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)|.
rearrangeTargetnumber | "infinity"noneRearrangement 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}noneRearrangement mode: repeat p positive terms then q negative terms (with rearrangeTarget too, a switch chooses the rule).
rearrangeRulestring"target"With both rearrangeTarget and rearrangePattern: which rule the switch starts on (target or pattern).
presets{label, note?, ...any of the series props}[]noneExample 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.
controlsstring[]all controls shownIds of the hideable controls to show (see the controls registry); core ones always show. Absent = everything. Fitted per page by tooling, not by hand.