Coefficient
Usage
• Coefficient[expr, form]给出了多项式expr中form的系数。
• Coefficient[expr, form, n]给出了expr中 form^n 的系数。
Notes
• Coefficient 仅挑选指定特定形式的项。  并不看作  的部分. • form 可以是幂的乘积。 • Coefficient[expr, form, 0]挑选与form不成比例的项。 • 无论expr是否明确以扩展形式给出,Coefficient都是有效的。
Further Examples
Here is one way of getting the coefficient of from the polynomial.
In[1]:=
|
Out[1]=
|
Here is an equivalent way.
In[2]:=
|
Out[2]=
|
This gives the coefficient of x in the polynomial over the integers modulo .
In[3]:=
|
Out[3]=
|
This gives the coefficients of x, x z, y and z in the expression.
In[4]:=
|
Out[4]=
|
You can use variables that are powers.
In[5]:=
|
Out[5]=
|
Such a power does not necessarily have to be an integer.
In[6]:=
|
Out[6]=
|
Coefficient is quite fast for polynomial input. (The time will vary for different machines.)
In[7]:=
|
Out[7]=
|
Even this harder example comes back in reasonable time.
In[8]:=
|
Out[8]=
|
Coefficient can handle some algebraic dependencies.
In[9]:=
|
Out[9]=
|
|