The Order Term Function and the Environment Variable Order - Maple Programming Help

The Order Term Function and the Environment Variable Order

Description

 • The environment variable Order represents the order, or working precision, of series calculations performed by Maple.  It does not necessarily represent the order of the error term, or the number of terms, in the series output.  In the given example, note that the order of the series expansion of $\frac{{ⅇ}^{x}}{x}$ is only 7 rather than 8, since the series expansion of ${ⅇ}^{x}$ is divided by x, thereby reducing the degree by 1.
 • The default value of Order is 6.
 • The order term function O, denotes the "rest" of the series, beyond the order specified by the Order variable.
 • Because Order is an environment variable, any assignments to it inside a procedure body are undone upon exit from a procedure.

Examples

 > $\mathrm{Order}$
 ${6}$ (1)
 > $\mathrm{series}\left(\mathrm{cos}\left(x\right),x=0\right)$
 ${1}{-}\frac{{1}}{{2}}{}{{x}}^{{2}}{+}\frac{{1}}{{24}}{}{{x}}^{{4}}{+}{O}{}\left({{x}}^{{6}}\right)$ (2)
 > $\mathrm{Order}≔8$
 ${\mathrm{Order}}{≔}{8}$ (3)
 > $\mathrm{series}\left({ⅇ}^{x},x=0\right)$
 ${1}{+}{x}{+}\frac{{1}}{{2}}{}{{x}}^{{2}}{+}\frac{{1}}{{6}}{}{{x}}^{{3}}{+}\frac{{1}}{{24}}{}{{x}}^{{4}}{+}\frac{{1}}{{120}}{}{{x}}^{{5}}{+}\frac{{1}}{{720}}{}{{x}}^{{6}}{+}\frac{{1}}{{5040}}{}{{x}}^{{7}}{+}{O}{}\left({{x}}^{{8}}\right)$ (4)
 > $\mathrm{series}\left(\frac{{ⅇ}^{x}}{x},x=0\right)$
 ${{x}}^{{-1}}{+}{1}{+}\frac{{1}}{{2}}{}{x}{+}\frac{{1}}{{6}}{}{{x}}^{{2}}{+}\frac{{1}}{{24}}{}{{x}}^{{3}}{+}\frac{{1}}{{120}}{}{{x}}^{{4}}{+}\frac{{1}}{{720}}{}{{x}}^{{5}}{+}\frac{{1}}{{5040}}{}{{x}}^{{6}}{+}{O}{}\left({{x}}^{{7}}\right)$ (5)

Cancellation may lead to a smaller number of terms than expected.

 > $\mathrm{series}\left(\frac{1}{{ⅇ}^{x}-1-x},x=0\right)$
 ${2}{}{{x}}^{{-2}}{-}\frac{{2}}{{3}}{}{{x}}^{{-1}}{+}\frac{{1}}{{18}}{+}\frac{{1}}{{270}}{}{x}{-}\frac{{1}}{{3240}}{}{{x}}^{{2}}{-}\frac{{1}}{{13608}}{}{{x}}^{{3}}{+}{O}{}\left({{x}}^{{4}}\right)$ (6)