Difference between revisions of "SolveCubic Command"
From GeoGebra Manual
m |
(change example, add Solve(), CSolve() examples) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|function}} | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|function}} | ||
==CAS Syntax== | ==CAS Syntax== | ||
− | ;SolveCubic | + | ;SolveCubic( <Cubic Polynomial> ) |
:Solves a given [[w:Cubic_function|cubic polynomial]] and returns a list of all solutions. | :Solves a given [[w:Cubic_function|cubic polynomial]] and returns a list of all solutions. | ||
− | :{{example| 1=<div><code><nowiki>SolveCubic | + | :{{example| 1=<div><code><nowiki>SolveCubic(x³ - 1)</nowiki></code> yields { 1, <math> \frac{1}{2} (\sqrt{3} i -1) </math> , <math> \frac{1}{2} (\sqrt{3} (-i) -1) </math> } .</div>}} |
− | {{note| 1=<div> | + | {{note| 1=<div>Often the answers are very cumbersome, e.g. <code><nowiki>SolveCubic(x³ + x² + x + 2)</nowiki></code> in which case <code>Solve(x³ + x² + x + 2)</code> or <code>CSolve(x³ + x² + x + 2)</code> may work better for you.</div>}} |
Latest revision as of 12:07, 27 November 2018
CAS Syntax
- SolveCubic( <Cubic Polynomial> )
- Solves a given cubic polynomial and returns a list of all solutions.
- Example:
SolveCubic(x³ - 1)
yields { 1, \frac{1}{2} (\sqrt{3} i -1) , \frac{1}{2} (\sqrt{3} (-i) -1) } .
Note:
Often the answers are very cumbersome, e.g.
SolveCubic(x³ + x² + x + 2)
in which case Solve(x³ + x² + x + 2)
or CSolve(x³ + x² + x + 2)
may work better for you.