Series Approximation Explorer

The learner raises the degree n of a Taylor polynomial (or the last index N of a power series' partial sum) and watches the approximation hug the function near the centre and peel away outside the interval of convergence. Options add a draggable centre, a draggable point x0 with the actual error, the Lagrange error bound (as a readout, a band and the point z of the Lagrange form), error panels against the degree or across x, a tolerance, the radius and endpoints of convergence, term-by-term derivative or integral panels, a shaded integral and example presets.

Used in: Mathematical Analysis, Single Variable Calculus

Props

PropTypeDefaultDescription
titlestring"Taylor polynomial approximation" ("Partial sums of a series" with series or coefficients)Card title.
notestringnoneOne short sentence under the formula lines ($...$ TeX allowed).
fstring"y = sin(x)" (Taylor view); none with seriesThe function, an expression in x and the parameters (a leading "y =" is ignored). Without series/coefficients the component computes its Taylor polynomials exactly (automatic differentiation, up to degree 60). With series/coefficients it is the sum drawn under the partial sums. Supports + - * / ^, implicit multiplication, |u|, sin cos tan sec csc cot, arcsin arccos arctan, sinh cosh tanh and inverses, exp ln log10 log2 sqrt cbrt, abs, factorial(n), choose(n, k), if(cond, a, b), pi, e, plus erf(x) and the complete elliptic integral K(k) (pointwise only: K cannot be expanded, give series).
seriesstringnoneGeneral term of a series in n and x (and the parameters), e.g. "(-1)^n*x^(2*n+1)/(2*n+1)" or "(2*x)^n"; switches to the partial-sum view S_N(x) = sum of the terms from n = startIndex to N. Write factorial(n), not n!.
coefficientsstringnoneCoefficient a_n of a power series sum a_n (x - center)^n, an expression in n (e.g. "1/factorial(n)", "(-1)^n"); an alternative to series.
startIndexinteger0First index n0 of series / coefficients (1 for terms such as (-1)^(n+1) x^n / n).
centernumber0Expansion point c: the Taylor centre, or the centre of the power series in coefficients mode.
centerNamestring"c"Letter used for the centre in labels (e.g. "a").
approxNamestring"T" (Taylor) or "S" (series)Letter of the approximation in labels: T_n(x), p_n(x), P_n(x) or S_N(x).
draggableCenterbooleanfalseTaylor view: the centre is a handle on the curve that the learner drags; the polynomial is recomputed (R and endpoints hide once it moves).
Ninteger3 (Taylor) / startIndex + 3 (series)Starting degree n (Taylor) or last index N (series) on the slider.
NRange[integer, integer][0, max(15, N)] (Taylor) / [startIndex, max(30, N)] (series)Range of the degree / index slider (capped at 60).
parameters{name, min?, max?, initial?, step?, label?, description?}[][]Named parameters with sliders, usable in f, series, coefficients, R, interval, bound and M (e.g. the exponent r of the binomial series).
xRange[number, number]c +- 1.6R when R is finite, else c +- 6Visible x range.
yRange[number, number]from f (or the starting partial sum)Visible y range; fixed while the sliders move.
showLowerOrdersbooleanfalseStarts with the 'Show lower degrees' switch on: the previous approximations (up to 8) are drawn faintly.
Rnumber | stringnoneThe verified radius of convergence: shades |x - c| < R as the convergence interval, with dashed lines at c +- R and the radius sentence. "inf" for every x, 0 for the centre only; a string may use the parameters.
interval[number | string, number | string] | [number | string, number | string][]c +- RThe convergence set when it is not c +- R (or for a series that is not a power series), e.g. [-0.5, 0.5] for the sum of (2x)^n, or [["-inf", -1], [1, "inf"]]. Ends may be parameter expressions.
endpoints{[x: string]: string}noneVerified behaviour at the ends of the interval, keyed by the x value (or "left" / "right"), e.g. {"-1": "diverges", "1": "converges"}: filled dot = converges, hollow = diverges, with a sentence.
xnumbernoneEvaluation point x0: a draggable vertical line with f(x0), the approximation there and the actual error |f(x0) - T_n(x0)| (drawn as a red segment).
errorPanelstring"none"order: a panel of the error at x0 against the degree n (log scale), with the bound's values; x: a panel of |f(x) - T_n(x)| across the view (log scale), with the bound curve and the tolerance.
boundstringnoneTaylor view: "lagrange" computes the Lagrange bound max|f^(n+1)| / (n+1)! * |x - c|^(n+1), maximising |f^(n+1)| between c and x numerically; or an expression in n, x, c (and the parameters) for an author's bound, e.g. "e^abs(x)*abs(x)^(n+1)/factorial(n+1)".
Mnumber | stringnoneTaylor view: a constant (or an expression in n) bounding |f^(n+1)| between c and x; the bound is then M |x - c|^(n+1) / (n+1)! (e.g. 1 for sin and cos). Wins over bound.
showRemainderBandbooleanfalseTaylor view: shades T_n(x) +- the bound across the view, a band that must contain f (bound "lagrange" unless bound or M is given).
showLagrangePointbooleanfalseTaylor view with x: marks the point z between c and x0 where f^(n+1)(z)/(n+1)! (x0 - c)^(n+1) equals the actual error, and reads it out.
tolerancenumbernoneA tolerance: line on the error panels and sentences giving the smallest degree whose error (and bound) at x0 is within it, and the x interval around c where the bound (or error) of the current degree is within it.
termwisestring"none"derivative or integral: a second panel with the approximation differentiated (or integrated from c) term by term against f' (or the integral of f from c).
termwiseSeriesstringcomputedSeries view: the general term of the differentiated / integrated series (in n and x), used for its partial sums; otherwise they are computed numerically.
termwiseSumstringcomputedClosed form of the differentiated / integrated sum (e.g. "y = ln(1+x)"); otherwise f' or the integral of f from c is computed numerically.
termwiseEndpoints{[x: string]: string}noneEndpoint behaviour of the differentiated / integrated series, as endpoints (e.g. {"1": "converges"} where the original diverges).
shadeIntegral[number, number]noneShades the area under the approximation over [a, b] and reads out its integral next to the integral of f.
presets{label, ...any of the view props}[]noneOther examples offered in an "Example" dropdown; each overrides the props it names. A preset that sets f, series or coefficients starts a new function: it drops the base's series (or f), R, interval, endpoints, termwiseSeries, termwiseSum and termwiseEndpoints unless it sets them itself.
presetLabelstring"Main example"Dropdown name of the configuration given by the props themselves.
controlsstring[]all controls shownRegistry ids of the optional readouts and panels to show (core controls always show). Fitted per node by tooling; absent shows everything.