coeftayl
coefficient of (multivariate) expression
Calling Sequence
Parameters
Description
Examples
coeftayl(expr, eqn, k)
expr
-
arbitrary expression
eqn
equation of the form x=α where x is a name (univariate case) or list (multivariate case)
k
non-negative integer (univariate case) or a list of non-negative integers (multivariate case)
This function computes a coefficient in the (multivariate) Taylor series representation of expr without forming the series (it uses differentiation and substitution). Often, expr is a polynomial.
The one-variable and several-variable cases are distinguished by the types of the input parameters.
UNIVARIATE CASE: x is a name and k a non-negative integer.
In this case, the value returned is the coefficient of x−αk in the Taylor series expansion of expr about x=α. This is equivalent to executing coefftaylorexpr,x=α,k+1,x−α,k but it is more efficient (because only a single term is computed).
MULTIVARIATE CASE: x is a nonempty list x1,…,xv of indeterminates appearing in expr and α is a list α1,…,αv specifying the point of expansion with respect to the given indeterminates; k is a list k1,…,kv of non-negative integers corresponding to elements in x and α.
In this case, the value returned is the coefficient of the term specified by the monomial
x1−α1k1…xv−αvkv
in the multivariate Taylor series expansion of expr about the point x=α. If k is the list of zeros then the value returned is the value resulting from substituting x=α into expr.
p≔2x2+3y3−5
p≔3y3+2x2−5
coeftaylp,x=0,2
2
coeftaylp,x=1,1
4
taylorp,x=1
3y3−3+4x−1+2x−12
q≔3ax+12+sinax2y−y2x+x−a
coeftaylq,x=−1,2
sinay+3a
coeftaylq,x=−1,1
−2sinay−y2+1
taylorq,x=−1
sinay+y2−1−a+−2sinay−y2+1x+1+sinay+3ax+12
coeftaylq,x,y=0,0,0,0
2a
coeftaylq,x,y=0,0,2,1
sina
mtaylorq,x,y
2a+6a+1x+3ax2+sinax2y−y2x
coeftaylq,x,y=0,1,1,1
−2
coeftaylq,x,y=0,1,2,1
mtaylorq,x=0,y=1
2a+6ax+sina+3ax2−2y−1x+sinax2y−1−y−12x
See Also
coeff
coeffs
mtaylor
taylor
Download Help Document