mtaylor
multivariate Taylor series expansion
Calling Sequence
Parameters
Description
Examples
mtaylor(f, v, options)
mtaylor(f, v, n, options)
mtaylor(f, v, n, w, options)
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
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 vi is an equation, then the left-hand side of vi is the variable, and the right-hand side is the point of expansion. If vi is a name, then vi=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=x,y and the second return value is 4, then the error terms for the multivariate series are O⁡x4,O⁡x3⁢y,O⁡x2⁢y2,O⁡x⁢y3,O⁡x4. 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.
mtaylor⁡exp⁡x2+y2,x,y,8
1+x2+y2+12⁢x4+x2⁢y2+12⁢y4+16⁢x6+12⁢y2⁢x4+12⁢y4⁢x2+16⁢y6
mtaylor⁡sqrt⁡1+x2+y2,x,y,8
1+12⁢x2+12⁢y2−18⁢x4−14⁢x2⁢y2−18⁢y4+116⁢x6+316⁢y2⁢x4+316⁢y4⁢x2+116⁢y6
mtaylor⁡sin⁡x2+y2,x,y,returnorder
x2+y2,6
mtaylor⁡sin⁡x2+y2,x,y,8
x2+y2−16⁢x6−12⁢y2⁢x4−12⁢y4⁢x2−16⁢y6
mtaylor⁡sin⁡x2+y2,x,y,8,2,1
y2+x2−16⁢y6
mtaylor⁡sin⁡x2+y2,x=1,y,3
sin⁡1+2⁢cos⁡1⁢x−1−2⁢sin⁡1−cos⁡1⁢x−12+cos⁡1⁢y2
mtaylor⁡cos⁡x2+y2,x=1,y=2,3
cos⁡5−2⁢sin⁡5⁢x−1−4⁢sin⁡5⁢y−2−2⁢cos⁡5+sin⁡5⁢x−12−8⁢cos⁡5⁢y−2⁢x−1−8⁢cos⁡5+sin⁡5⁢y−22
evalf⁡
−9.305580560+1.917848549⁢x+3.835697099⁢y+0.3915999037⁢x−1.2−2.269297484⁢y−2.⁢x−1.−1.310373209⁢y−2.2
mtaylor⁡f⁡x,y,x,y,3
f⁡0,0+D1⁡f⁡0,0⁢x+D2⁡f⁡0,0⁢y+D1,1⁡f⁡0,0⁢x22+D1,2⁡f⁡0,0⁢x⁢y+D2,2⁡f⁡0,0⁢y22
See Also
coeftayl
poisson
series
taylor
Download Help Document