Mathematica 9 is now available
 Documentation / Mathematica / Built-in Functions / New in Version 3.0 / Algebraic Computation  /
Coefficient

  • Coefficient[ expr , form ] gives the coefficient of form in the polynomial expr.
  • Coefficient[ expr , form , n ] gives the coefficient of form ^ n in expr.
  • Coefficient picks only terms that contain the particular form specified. is not considered part of .
  • form can be a product of powers.
  • Coefficient[ expr , form , 0] picks out terms that are not proportional to form.
  • Coefficient works whether or not expr is explicitly given in expanded form.
  • See the Mathematica book: Section 1.4.6Section 3.3.2.
  • See also: Exponent, SeriesCoefficient.

    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]=



    Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
    THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
    SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.