Difference between revisions of "Coefficients Command"
From GeoGebra Manual
Noel Lambert (talk | contribs) |
|||
Line 9: | Line 9: | ||
:{{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>. | ||
− | ::{{example|1= Given <code>l: 3x + 2y - 2 = 0</code> : | + | ::{{example|1= Given <code>l: 3x + 2y - 2 = 0</code>: |
:::<code>x(''l'')</code> returns 3, | :::<code>x(''l'')</code> returns 3, | ||
:::<code>y(''l'')</code> returns 2 and | :::<code>y(''l'')</code> returns 2 and |
Revision as of 06:41, 25 September 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> ]
- 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 returns list \{a, b, c, d, e, f\}.
- 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 andz(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, andCoefficients[a^3 - 3 a^2 + 3 a, x]
yields \{a^3 - 3 a^2 + 3 a\}.