detailed information - Maple Help

taylor

Taylor series expansion

 Calling Sequence taylor(expression, x=a, n) taylor(expression, x, n)

Parameters

 expression - expression x - name; independent variable a - realcons; expansion point n - (optional) non-negative integer; expansion order

Basic Information

 • This help page contains complete information about the taylor command. For basic information on the taylor command, see the taylor help page.

Description

 • The taylor command computes the order n Taylor series expansion of expression, with respect to the variable x, about the point a.
 If you do not specify the expansion point, a, the Taylor expansion at 0 is returned. This is known as the Maclaurin expansion.
 If you do not specify the optional argument n, the order of the Taylor expansion returned is the value of the Order environment variable.
 • The taylor command is a restriction of the more general series command.  For a complete explanation of the parameters, see series.
 • If the result of the series command applied to the specified arguments is a Taylor series, then this result is returned; otherwise, an error is returned.
 • To convert a Taylor series to a polynomial, use the convert/polynom command. For more information, see the convert/polynom help page.

Examples

 > $\mathrm{taylor}\left(\mathrm{exp}\left(x\right),x=0,4\right)$
 ${1}{+}{x}{+}\frac{{1}}{{2}}{}{{x}}^{{2}}{+}\frac{{1}}{{6}}{}{{x}}^{{3}}{+}{O}{}\left({{x}}^{{4}}\right)$ (1)
 > $\mathrm{taylor}\left(\frac{1}{x},x=1,3\right)$
 ${1}{-}\left({x}{-}{1}\right){+}{\left({x}{-}{1}\right)}^{{2}}{+}{O}{}\left({\left({x}{-}{1}\right)}^{{3}}\right)$ (2)
 > $\mathrm{taylor}\left(\mathrm{cos}\left(x\right),x=\mathrm{\pi }\right)$
 ${-1}{+}\frac{{1}}{{2}}{}{\left({x}{-}{\mathrm{\pi }}\right)}^{{2}}{-}\frac{{1}}{{24}}{}{\left({x}{-}{\mathrm{\pi }}\right)}^{{4}}{+}{O}{}\left({\left({x}{-}{\mathrm{\pi }}\right)}^{{6}}\right)$ (3)
 > $\mathrm{taylor}\left(\mathrm{tan}\left(x\right),x,8\right)$
 ${x}{+}\frac{{1}}{{3}}{}{{x}}^{{3}}{+}\frac{{2}}{{15}}{}{{x}}^{{5}}{+}\frac{{17}}{{315}}{}{{x}}^{{7}}{+}{O}{}\left({{x}}^{{9}}\right)$ (4)

If the expansion point is not specified, the Taylor expansion at 0 is returned.

 > $\mathrm{taylor}\left(\mathrm{ln}\left(1-x\right),x\right)$
 ${-}{x}{-}\frac{{1}}{{2}}{}{{x}}^{{2}}{-}\frac{{1}}{{3}}{}{{x}}^{{3}}{-}\frac{{1}}{{4}}{}{{x}}^{{4}}{-}\frac{{1}}{{5}}{}{{x}}^{{5}}{+}{O}{}\left({{x}}^{{6}}\right)$ (5)
 > $\mathrm{taylor}\left(\mathrm{ln}\left(1-x\right),x=0\right)$
 ${-}{x}{-}\frac{{1}}{{2}}{}{{x}}^{{2}}{-}\frac{{1}}{{3}}{}{{x}}^{{3}}{-}\frac{{1}}{{4}}{}{{x}}^{{4}}{-}\frac{{1}}{{5}}{}{{x}}^{{5}}{+}{O}{}\left({{x}}^{{6}}\right)$ (6)
 > $\mathrm{taylor}\left(\mathrm{ln}\left(1-x\right),x=2\right)$
 ${I}{}{\mathrm{csgn}}{}\left({I}{}\left({x}{-}{1}\right)\right){}{\mathrm{\pi }}{+}\left({x}{-}{2}\right){-}\frac{{1}}{{2}}{}{\left({x}{-}{2}\right)}^{{2}}{+}\frac{{1}}{{3}}{}{\left({x}{-}{2}\right)}^{{3}}{-}\frac{{1}}{{4}}{}{\left({x}{-}{2}\right)}^{{4}}{+}\frac{{1}}{{5}}{}{\left({x}{-}{2}\right)}^{{5}}{+}{O}{}\left({\left({x}{-}{2}\right)}^{{6}}\right)$ (7)
 > $\mathrm{taylor}\left(\frac{1}{x}+y+{x}^{3},x=0\right)$
 > $\mathrm{series}\left(\frac{1}{x}+y+{x}^{3},x=0\right)$
 ${{x}}^{{-1}}{+}{y}{+}{{x}}^{{3}}$ (8)
 > $\mathrm{mtaylor}\left(\frac{1}{x}+y+{x}^{3},\left[x=1,y\right]\right)$
 ${-}{\left({x}{-}{1}\right)}^{{5}}{+}{\left({x}{-}{1}\right)}^{{4}}{+}{4}{}{\left({x}{-}{1}\right)}^{{2}}{+}{2}{}{x}{+}{y}$ (9)

By default, the Order environment variable is set to 6. If you do not specify the expansion order, this value is used as the expansion order.

 > $\mathrm{taylor}\left(\mathrm{cosh}\left(x\right),x=0\right)$
 ${1}{+}\frac{{1}}{{2}}{}{{x}}^{{2}}{+}\frac{{1}}{{24}}{}{{x}}^{{4}}{+}{O}{}\left({{x}}^{{6}}\right)$ (10)
 > $\mathrm{Order}≔10$
 ${\mathrm{Order}}{≔}{10}$ (11)
 > $\mathrm{int}\left(\mathrm{exp}\left({x}^{3}\right),x\right)$
 ${-}\frac{{\left({-1}\right)}^{{2}}{{3}}}{}\left(\frac{{2}{}{x}{}{\left({-1}\right)}^{{1}}{{3}}}{}{\mathrm{\pi }}{}\sqrt{{3}}}{{3}{}{\mathrm{\Gamma }}{}\left(\frac{{2}}{{3}}\right){}{\left({-}{{x}}^{{3}}\right)}^{{1}}{{3}}}}{-}\frac{{x}{}{\left({-1}\right)}^{{1}}{{3}}}{}{\mathrm{\Gamma }}{}\left(\frac{{1}}{{3}}{,}{-}{{x}}^{{3}}\right)}{{\left({-}{{x}}^{{3}}\right)}^{{1}}{{3}}}}\right)}{{3}}$ (12)
 > $\mathrm{taylor}\left(,x=0\right)$
 ${x}{+}\frac{{1}}{{4}}{}{{x}}^{{4}}{+}\frac{{1}}{{14}}{}{{x}}^{{7}}{+}{O}{}\left({{x}}^{{10}}\right)$ (13)
 > $\mathrm{convert}\left(,\mathrm{polynom}\right)$
 ${x}{+}\frac{{1}}{{4}}{}{{x}}^{{4}}{+}\frac{{1}}{{14}}{}{{x}}^{{7}}$ (14)