Table of Contents
För närvarande kan Genius hantera polynom i en variabel utskrivna som vektorer, och utföra några grundläggande operationer med dessa. Det finns planer för att utöka detta stöd vidare.
Currently polynomials in one variable are just horizontal vectors with value only nodes. The power of the term is the position in the vector, with the first position being 0. So,
[1,2,3]
translates to a polynomial of
1 + 2*x + 3*x^2
You can add, subtract and multiply polynomials using the
AddPoly
,
SubtractPoly
, and
MultiplyPoly
functions respectively.
You can print a polynomial using the
PolyToString
function.
For example,
PolyToString([1,2,3],"y")
gives
3*y^2 + 2*y + 1
You can also get a function representation of the polynomial so that you can
evaluate it. This is done by using
PolyToFunction
,
which
returns an anonymous function.
f = PolyToFunction([0,1,1])
f(2)
Det är också möjligt att hitta rötter för polynom av grad 1 till 4 med funktionen PolynomialRoots
, som anropar lämplig formelfunktion. Polynom av högre grad måste konverteras till funktioner och lösas numeriskt med en funktion som FindRootBisection
, FindRootFalsePosition
, FindRootMullersMethod
eller FindRootSecant
.
Se the section called “Polynom” i funktionslistan för resten av funktionerna som arbetar på polynom.