mtaylor - Maple Help

mtaylor

multivariate Taylor series expansion

 Calling Sequence mtaylor(f, v, options) mtaylor(f, v, n, options) mtaylor(f, v, n, w, options)

Parameters

 f - algebraic expression v - list or set of names or equations n - (optional) non-negative integer w - (optional) list of positive integers options - (optional) literal keyword returnorder

Description

 • The mtaylor function computes a truncated multivariate Taylor series expansion of the input expression f, with respect to the variables v, to order n, using the variable weights w.
 • The variables v can be a list or set of names or equations. If ${v}_{i}$ is an equation, then the left-hand side of ${v}_{i}$ is the variable, and the right-hand side is the point of expansion.  If ${v}_{i}$ is a name, then ${v}_{i}=0$ is assumed as the point of expansion.
 • If the third argument n is present then it specifies the truncation order'' of the series. The concept of truncation order'' used is total degree'' in the variables. If n is not present, the truncation order used is the value of the global variable Order, which is 6 by default.
 • If the fourth argument w is present it specifies the variable weights to be used (by default all 1).  A weight of 2 will halve the order in the corresponding variable to which the series is computed.
 • If the optional keyword returnorder is specified, then an expression sequence of two elements will be returned. The first element is the multivariate Taylor series expansion, and the second element indicates the (weighted) order (i.e., the weighted total degree) of the error term(s) of the expansion. E.g., if $v=\left[x,y\right]$ and the second return value is 4, then the error terms for the multivariate series are $\mathrm{O}\left({x}^{4}\right),\mathrm{O}\left({x}^{3}y\right),\mathrm{O}\left({x}^{2}{y}^{2}\right),\mathrm{O}\left(x{y}^{3}\right),\mathrm{O}\left({x}^{4}\right)$. As in the univariate series case, the actual order of the error term(s) may differ from the requested order n.
 • Note:  mtaylor restricts its domain to pure'' Taylor series, those series with non-negative powers in the variables.

Examples

 > $\mathrm{mtaylor}\left(\mathrm{exp}\left({x}^{2}+{y}^{2}\right),\left[x,y\right],8\right)$
 ${1}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}\frac{{1}}{{2}}{}{{x}}^{{4}}{+}{{x}}^{{2}}{}{{y}}^{{2}}{+}\frac{{1}}{{2}}{}{{y}}^{{4}}{+}\frac{{1}}{{6}}{}{{x}}^{{6}}{+}\frac{{1}}{{2}}{}{{y}}^{{2}}{}{{x}}^{{4}}{+}\frac{{1}}{{2}}{}{{y}}^{{4}}{}{{x}}^{{2}}{+}\frac{{1}}{{6}}{}{{y}}^{{6}}$ (1)
 > $\mathrm{mtaylor}\left(\mathrm{sqrt}\left(1+{x}^{2}+{y}^{2}\right),\left[x,y\right],8\right)$
 ${1}{+}\frac{{1}}{{2}}{}{{x}}^{{2}}{+}\frac{{1}}{{2}}{}{{y}}^{{2}}{-}\frac{{1}}{{8}}{}{{x}}^{{4}}{-}\frac{{1}}{{4}}{}{{x}}^{{2}}{}{{y}}^{{2}}{-}\frac{{1}}{{8}}{}{{y}}^{{4}}{+}\frac{{1}}{{16}}{}{{x}}^{{6}}{+}\frac{{3}}{{16}}{}{{y}}^{{2}}{}{{x}}^{{4}}{+}\frac{{3}}{{16}}{}{{y}}^{{4}}{}{{x}}^{{2}}{+}\frac{{1}}{{16}}{}{{y}}^{{6}}$ (2)
 > $\mathrm{mtaylor}\left(\mathrm{sin}\left({x}^{2}+{y}^{2}\right),\left[x,y\right],\mathrm{returnorder}\right)$
 ${{x}}^{{2}}{+}{{y}}^{{2}}{,}{6}$ (3)
 > $\mathrm{mtaylor}\left(\mathrm{sin}\left({x}^{2}+{y}^{2}\right),\left[x,y\right],8\right)$
 ${{x}}^{{2}}{+}{{y}}^{{2}}{-}\frac{{1}}{{6}}{}{{x}}^{{6}}{-}\frac{{1}}{{2}}{}{{y}}^{{2}}{}{{x}}^{{4}}{-}\frac{{1}}{{2}}{}{{y}}^{{4}}{}{{x}}^{{2}}{-}\frac{{1}}{{6}}{}{{y}}^{{6}}$ (4)
 > $\mathrm{mtaylor}\left(\mathrm{sin}\left({x}^{2}+{y}^{2}\right),\left[x,y\right],8,\left[2,1\right]\right)$
 ${{y}}^{{2}}{+}{{x}}^{{2}}{-}\frac{{1}}{{6}}{}{{y}}^{{6}}$ (5)
 > $\mathrm{mtaylor}\left(\mathrm{sin}\left({x}^{2}+{y}^{2}\right),\left[x=1,y\right],3\right)$
 ${\mathrm{sin}}{}\left({1}\right){+}{2}{}{\mathrm{cos}}{}\left({1}\right){}\left({x}{-}{1}\right){-}\left({2}{}{\mathrm{sin}}{}\left({1}\right){-}{\mathrm{cos}}{}\left({1}\right)\right){}{\left({x}{-}{1}\right)}^{{2}}{+}{\mathrm{cos}}{}\left({1}\right){}{{y}}^{{2}}$ (6)
 > $\mathrm{mtaylor}\left(\mathrm{cos}\left({x}^{2}+{y}^{2}\right),\left[x=1,y=2\right],3\right)$
 ${\mathrm{cos}}{}\left({5}\right){-}{2}{}{\mathrm{sin}}{}\left({5}\right){}\left({x}{-}{1}\right){-}{4}{}{\mathrm{sin}}{}\left({5}\right){}\left({y}{-}{2}\right){-}\left({2}{}{\mathrm{cos}}{}\left({5}\right){+}{\mathrm{sin}}{}\left({5}\right)\right){}{\left({x}{-}{1}\right)}^{{2}}{-}{8}{}{\mathrm{cos}}{}\left({5}\right){}\left({y}{-}{2}\right){}\left({x}{-}{1}\right){-}\left({8}{}{\mathrm{cos}}{}\left({5}\right){+}{\mathrm{sin}}{}\left({5}\right)\right){}{\left({y}{-}{2}\right)}^{{2}}$ (7)
 > $\mathrm{evalf}\left(\right)$
 ${-}{9.305580560}{+}{1.917848549}{}{x}{+}{3.835697099}{}{y}{+}{0.3915999037}{}{\left({x}{-}{1.}\right)}^{{2}}{-}{2.269297484}{}\left({y}{-}{2.}\right){}\left({x}{-}{1.}\right){-}{1.310373209}{}{\left({y}{-}{2.}\right)}^{{2}}$ (8)
 > $\mathrm{mtaylor}\left(f\left(x,y\right),\left[x,y\right],3\right)$
 ${f}{}\left({0}{,}{0}\right){+}{{\mathrm{D}}}_{{1}}{}\left({f}\right){}\left({0}{,}{0}\right){}{x}{+}{{\mathrm{D}}}_{{2}}{}\left({f}\right){}\left({0}{,}{0}\right){}{y}{+}\frac{{{\mathrm{D}}}_{{1}{,}{1}}{}\left({f}\right){}\left({0}{,}{0}\right){}{{x}}^{{2}}}{{2}}{+}{{\mathrm{D}}}_{{1}{,}{2}}{}\left({f}\right){}\left({0}{,}{0}\right){}{x}{}{y}{+}\frac{{{\mathrm{D}}}_{{2}{,}{2}}{}\left({f}\right){}\left({0}{,}{0}\right){}{{y}}^{{2}}}{{2}}$ (9)