Student[NumericalAnalysis] - Maple Programming Help

Home : Support : Online Help : Education : Student Package : Numerical Analysis : Computation : Student/NumericalAnalysis/TaylorPolynomial

Student[NumericalAnalysis]

 TaylorPolynomial
 compute a Taylor polynomial approximation

 Calling Sequence TaylorPolynomial(f, x, opts) TaylorPolynomial(f, x = x0, opts)

Parameters

 f - algebraic; expression in the variable x x - name; the name of the independent variable in f x0 - realcons; the point about which the series is expanded opts - (optional) equation(s) of the form keyword = value where keyword is one of digits, errorboundvar, order; the options for computing the Taylor polynomial

Options

 • digits = posint
 A positive integer; the environment variable Digits will be set to this integer during the execution of this procedure. By default, digits = 10.
 • errorboundvar = name, algebraic
 The name to assign to the independent variable in the error term.  An error term for the taylor approximation is returned if the errorboundvar option is specified. Additionally, if the errorboundvar option and the extrapolate option are specified, the error bound is given for the extrapolated point as well.
 • extrapolate = realcons, list(realcons)
 A point or list of points to be extrapolated. If this option is specified, the approximate value(s) of the taylor polynomial at the specified point(s), the exact value(s) of f at the specified point(s), and the error bound(s) are returned after the taylor polynomial.
 • order = posint, posint..posint, list(posint)
 The order of the Taylor polynomial. If the order is specified as a range or list, the Taylor polynomial for each order in the range or list will be computed. By default, order = 6.

Description

 • The TaylorPolynomial command computes the taylor series expansion of f about x0 and converts it into a polynomial.
 • If x0 is not specified, then the Taylor expansion is calculated about the point x=0.
 • The possible return values of the TaylorPolynomial command are:
 – P
 P is the n-th order Taylor polynomial of f calculated about x = x0
 – [P, R]
 P is the n-th order Taylor polynomial of f calculated about x = x0 and R is the remainder term, such that P+R=f. This output is returned when the errorboundvar option is specified and the extrapolate option is not specified.
 – [P, R, B]
 P is the n-th order Taylor polynomial of f calculated about x = x0, R is the remainder term, such that P+R=f and B is a list containing the extrapolated point(s), the value(s) of P at the extrapolated point(s), the value(s) of f at the extrapolated point(s) and the associated error bound(s). This output is returned when both the errorboundvar and the extrapolate options are specified.
 – If order is specified as a list or range the return will be an expression sequence of the output described above, with an expression sequence member for each order.

Examples

 > $\mathrm{with}\left(\mathrm{Student}[\mathrm{NumericalAnalysis}]\right):$
 > $\mathrm{TaylorPolynomial}\left(\mathrm{sin}\left(x\right),x\right)$
 ${x}{-}\frac{{1}}{{6}}{}{{x}}^{{3}}{+}\frac{{1}}{{120}}{}{{x}}^{{5}}$ (1)
 > $\mathrm{TaylorPolynomial}\left(\mathrm{sin}\left(x\right),x,\mathrm{errorboundvar}='\mathrm{ξ}'\right)$
 $\left[{x}{-}\frac{{1}}{{6}}{}{{x}}^{{3}}{+}\frac{{1}}{{120}}{}{{x}}^{{5}}{,}{-}\frac{{1}}{{5040}}{}{\mathrm{cos}}{}\left({\mathrm{ξ}}\right){}{{x}}^{{7}}\right]$ (2)
 > $\mathrm{TaylorPolynomial}\left(\mathrm{sin}\left(x\right),x,\mathrm{errorboundvar}='\mathrm{ξ}',\mathrm{extrapolate}=1.3\right)$
 $\left[{x}{-}\frac{{1}}{{6}}{}{{x}}^{{3}}{+}\frac{{1}}{{120}}{}{{x}}^{{5}}{,}{-}\frac{{1}}{{5040}}{}{\mathrm{cos}}{}\left({\mathrm{ξ}}\right){}{{x}}^{{7}}{,}\left[{1.3}{,}{0.9647744166}{,}{0.9635581854}{,}{0.001245010258}\right]\right]$ (3)
 > $\mathrm{TaylorPolynomial}\left({ⅇ}^{x},x,\mathrm{order}=3\right)$
 ${1}{+}{x}{+}\frac{{1}}{{2}}{}{{x}}^{{2}}{+}\frac{{1}}{{6}}{}{{x}}^{{3}}$ (4)
 > $\mathrm{TaylorPolynomial}\left(\mathrm{ln}\left(x\right),x=2,\mathrm{order}=3,\mathrm{errorboundvar}='\mathrm{ξ}'\right)$
 $\left[{\mathrm{ln}}{}\left({2}\right){+}\frac{{1}}{{2}}{}{x}{-}{1}{-}\frac{{1}}{{8}}{}{\left({x}{-}{2}\right)}^{{2}}{+}\frac{{1}}{{24}}{}{\left({x}{-}{2}\right)}^{{3}}{,}{-}\frac{{1}}{{4}}{}\frac{{\left({x}{-}{2}\right)}^{{4}}}{{{\mathrm{ξ}}}^{{4}}}\right]$ (5)