Difference between revisions of "Coefficients Command"

From GeoGebra Manual
Jump to: navigation, search
m (Reverted edits by Birgit Lachner (talk) to last revision by Spanish1)
Line 5: Line 5:
 
:{{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[ <Conic> ]
 
;Coefficients[ <Conic> ]
:For conics in standard form <math>a\cdot x^2 + b\cdot y^2 + c + d\cdot x\cdot y + e\cdot x + f\cdot y = 0</math> returns list <math>\{a, b, c, d, e, f\}</math>.
+
:It returns list <math>\{a, b, c, d, e, f\}</math> for conics in standard form:<br><hr>
 
+
:<center><small><math>a\cdot x^2 + b\cdot y^2 + c + d\cdot x\cdot y + e\cdot x + f\cdot y = 0</math></small></center><hr>
  
 
:{{hint|1=For a line in implicit form <math>l: ax + by + c = 0</math> it is possible to obtain the coefficients using the syntax <math>x(l), y(l), z(l)</math>.
 
:{{hint|1=For a line in implicit form <math>l: ax + by + c = 0</math> it is possible to obtain the coefficients using the syntax <math>x(l), y(l), z(l)</math>.
Line 13: Line 13:
 
:::<code>y(''l'')</code> returns 2 and  
 
:::<code>y(''l'')</code> returns 2 and  
 
:::<code>z(''l'')</code> returns -2.}} }}  
 
:::<code>z(''l'')</code> returns -2.}} }}  
 
  
 
==CAS Syntax==
 
==CAS Syntax==

Revision as of 21:19, 17 November 2012



Coefficients[ <Polynomial> ]
Yields the list of all coefficients of the 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> ]
It returns list \{a, b, c, d, e, f\} for conics in standard form:

a\cdot x^2 + b\cdot y^2 + c + d\cdot x\cdot y + e\cdot x + f\cdot y = 0

Note Hint: For a line in implicit form l: ax + by + c = 0 it is possible to obtain the coefficients using the syntax x(l), y(l), z(l).
Example: Given l: 3x + 2y - 2 = 0:
x(l) returns 3,
y(l) returns 2 and
z(l) returns -2.


CAS Syntax

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