Difference between revisions of "Coefficients Command"
From GeoGebra Manual
(fixed math text which were not displayed, because delimited by { and } that <math> does not recognize anymore) |
m (change l to line) |
||
Line 7: | Line 7: | ||
:Returns the list of the coefficients ''a'', ''b'', ''c'', ''d'', ''e'', ''f'' of a conic 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 the list of the coefficients ''a'', ''b'', ''c'', ''d'', ''e'', ''f'' of a conic 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> | ||
:{{note|1=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''). | :{{note|1=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|1= Given <code> | + | ::{{example|1= Given <code>line: 3x + 2y - 2 = 0</code>: <code>x(line)</code> returns 3, <code>y(line)</code> returns 2, and <code>z(line)</code> returns -2}} }} |
==CAS Syntax== | ==CAS Syntax== | ||
;Coefficients[ <Polynomial> ] | ;Coefficients[ <Polynomial> ] |
Revision as of 21:57, 19 February 2015
- Coefficients[ <Polynomial> ]
- Yields the list of all coefficients a_k,a_{k-1},\ldots,a_1, a_0 of the polynomial a_kx^k+a_{k-1}x^{k-1}+\cdots+a_1x+a_0.
- 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> ]
- Returns the list of the coefficients a, b, c, d, e, f of a conic 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: 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
line: 3x + 2y - 2 = 0
:x(line)
returns 3,y(line)
returns 2, andz(line)
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 aCoefficients[a^3 - 3 a^2 + 3 a, x]
yields {a³ - 3 a² + 3 a}.