Difference between revisions of "Polynomial Command"

From GeoGebra Manual
Jump to: navigation, search
(command syntax: changed [ ] into ( ))
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|function}}
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|function}}
;Polynomial[ <Function> ]
+
;Polynomial( <Function> )
 
:Yields the expanded polynomial function.
 
:Yields the expanded polynomial function.
:{{Example|1=<code>Polynomial[(x - 3)^2]</code> yields ''x<sup>2</sup> - 6x + 9''. }}
+
:{{Example|1=<code>Polynomial((x - 3)^2)</code> yields ''x<sup>2</sup> - 6x + 9''. }}
;Polynomial[ &lt;List of Points> ]
+
;Polynomial( &lt;List of Points> )
 
:Creates the interpolation polynomial of degree ''n-1'' through the given ''n'' points.
 
:Creates the interpolation polynomial of degree ''n-1'' through the given ''n'' points.
:{{Example|1=<code>Polynomial[{(1, 1), (2, 3), (3, 6)}]</code> yields ''0.5 x<sup>2</sup> + 0.5 x''. }}
+
:{{Example|1=<code>Polynomial({(1, 1), (2, 3), (3, 6)})</code> yields ''0.5 x<sup>2</sup> + 0.5 x''. }}
  
 
==CAS Syntax==
 
==CAS Syntax==
;Polynomial[ <Function> ]
+
;Polynomial( <Function> )
 
:Expands the function and writes it as a polynomial in x (grouping the coefficients).  
 
:Expands the function and writes it as a polynomial in x (grouping the coefficients).  
:{{Example|1=<code>Polynomial[(x - 3)^2 + (a + x)^2]</code> yields ''2 x<sup>2</sup> + (2a - 6) x + a<sup>2</sup> + 9''. }}
+
:{{Example|1=<code>Polynomial((x - 3)^2 + (a + x)^2)</code> yields ''2 x<sup>2</sup> + (2a - 6) x + a<sup>2</sup> + 9''. }}
;Polynomial[ <Function>, <Variable> ]
+
;Polynomial( <Function>, <Variable> )
 
:Expands the function and writes it as a polynomial in the variable (grouping the coefficients).  
 
:Expands the function and writes it as a polynomial in the variable (grouping the coefficients).  
:{{Example|1=<code>Polynomial[(x - 3)^2 + (a + x)^2, a]</code> yields ''a<sup>2</sup> + 2 x a + 2 x<sup>2</sup> - 6 x + 9''. }}
+
:{{Example|1=<code>Polynomial((x - 3)^2 + (a + x)^2, a)</code> yields ''a<sup>2</sup> + 2 x a + 2 x<sup>2</sup> - 6 x + 9''. }}

Revision as of 08:44, 9 October 2017


Polynomial( <Function> )
Yields the expanded polynomial function.
Example: Polynomial((x - 3)^2) yields x2 - 6x + 9.
Polynomial( <List of Points> )
Creates the interpolation polynomial of degree n-1 through the given n points.
Example: Polynomial({(1, 1), (2, 3), (3, 6)}) yields 0.5 x2 + 0.5 x.


CAS Syntax

Polynomial( <Function> )
Expands the function and writes it as a polynomial in x (grouping the coefficients).
Example: Polynomial((x - 3)^2 + (a + x)^2) yields 2 x2 + (2a - 6) x + a2 + 9.
Polynomial( <Function>, <Variable> )
Expands the function and writes it as a polynomial in the variable (grouping the coefficients).
Example: Polynomial((x - 3)^2 + (a + x)^2, a) yields a2 + 2 x a + 2 x2 - 6 x + 9.
© 2024 International GeoGebra Institute