Difference between revisions of "Coefficients Command"

From GeoGebra Manual
Jump to: navigation, search
Line 9: Line 9:
 
In [[CAS View]] only one syntax is allowed:
 
In [[CAS View]] only one syntax is allowed:
 
;Coefficients[ <Polynomial> ]
 
;Coefficients[ <Polynomial> ]
:Yields the list of all coefficients of the given polynomial.
+
:Yields the list of all coefficients of the polynomial in the main variable.
 
:{{example| 1=<div><code><nowiki>Coefficients[x^3 - 3 x^2 + 3 x]</nowiki></code> yields ''{1, -3, 3, 0}'', the list of all coefficients of <math>x^3 - 3 x^2 + 3 x</math>.</div>}}
 
:{{example| 1=<div><code><nowiki>Coefficients[x^3 - 3 x^2 + 3 x]</nowiki></code> yields ''{1, -3, 3, 0}'', the list of all coefficients of <math>x^3 - 3 x^2 + 3 x</math>.</div>}}
 +
;Coefficients[ <Polynomial>, <Variable> ]
 +
:Yields the list of all coefficients of the polynomial in the given variable.
 +
:{{example| 1=<div>
 +
:* <code><nowiki>Coefficients[a^3 - 3 a^2 + 3 a, a]</nowiki></code> yields ''{1, -3, 3, 0}'', the list of all coefficients of <math>a^3 - 3 a^2 + 3 a</math>, and
 +
:* <code><nowiki>Coefficients[a^3 - 3 a^2 + 3 a, x]</nowiki></code> yields <math>\{a^3 - 3 a^2 + 3 a\}</math>.</div>}}

Revision as of 10:56, 11 September 2012



Coefficients[ <Polynomial> ]
Yields the list of all coefficients of the given polynomial.
Example:
Coefficients[x^3 - 3 x^2 + 3 x] yields {1, -3, 3, 0}, the list of all coefficients of x^3 - 3 x^2 + 3 x.
Coefficients[ <Conic> ]
For conic a\cdot x^2 + b\cdot y^2 + c + d\cdot x\cdot y + e\cdot x + f\cdot y = 0 returns list \{a, b, c, d, e, f\}.

CAS Specific Syntax

In CAS View only one syntax is allowed:

Coefficients[ <Polynomial> ]
Yields the list of all coefficients of the polynomial in the main variable.
Example:
Coefficients[x^3 - 3 x^2 + 3 x] yields {1, -3, 3, 0}, the list of all coefficients of x^3 - 3 x^2 + 3 x.
Coefficients[ <Polynomial>, <Variable> ]
Yields the list of all coefficients of the polynomial in the given variable.
Example:
  • Coefficients[a^3 - 3 a^2 + 3 a, a] yields {1, -3, 3, 0}, the list of all coefficients of a^3 - 3 a^2 + 3 a, and
  • Coefficients[a^3 - 3 a^2 + 3 a, x] yields \{a^3 - 3 a^2 + 3 a\}.
© 2024 International GeoGebra Institute