a representation for roots of equations
RootOf(expr, x, c)
RootOf(expr, x, a..b)
RootOf(expr, x, index=i)
RootOf(expr, x, label=e)
algebraic expression or equation
(optional) variable name
(optional) number; specify a root selector
(optional) complex numbers; specify a bounding box
(optional) index where i is an integer
(optional) label where e is anything: a name, an expression, a list, or an integer
The function RootOf is a placeholder for representing all the roots of an equation in one variable. In particular, it is the standard representation for Maple algebraic numbers, algebraic functions (see evala), and finite fields GFpk,p⁢prime,k>1 (see mod).
Maple automatically generates RootOfs to express the solutions to polynomial equations and systems of equations (see solve), eigenvalues of matrices (see LinearAlgebra[Eigenvalues]), and rational function integrals (see int). Maple can apply diff, series, evalf, and simplify to RootOf expressions.
If x is not specified, then expr must be either a univariate expression or an expression in _Z. In this case, the RootOf represents the roots of expr with respect to its single variable or _Z, respectively. If the first argument is not an equation, then the equation expr=0 is assumed.
The RootOf function checks the validity of its arguments and solves it for polynomials of degree one. The RootOf is expressed in a single-argument canonical form, obtained by making the argument primitive and expressing the RootOf in terms of the global variable _Z.
The alias function is often used with RootOfs to obtain a more compact notation.
Notes: (1) Maple allows nested RootOfs, but an alias cannot be defined in terms of another alias. (2) The function alias is an interactive tool and should not be used in a Maple procedure.
If expr is an irreducible polynomial over a field F, then alpha = RootOf(expr) represents an algebraic extension field K over F of degree degree⁡expr,x where elements of K are represented as polynomials in alpha.
Evaluation in the context of evala uses the RootOf notation for the representation of algebraic numbers and algebraic functions.
Evaluation in the context of the mod operator uses the RootOf notation for the representation of finite fields. The elements of the finite field GF⁡pk are represented as polynomials in RootOf(expr) where expr is an irreducible polynomial of degree k mod p, that is, an algebraic extension over the integers mod⁢p.
RootOfs are not restricted to algebraic extensions. They can be used to represent the solutions of transcendental equations, for example RootOf(cos(x)=x, x).
The third (optional) argument is a root selector. Selectors are meant to specify a particular root of an equation or a subset of the roots. They can also be used for working with several (not necessarily specified) roots of the same polynomial. The RootOf function supports the following selectors:
A numerical approximation c; if the polynomial is univariate with rational coefficients, the c will select among all the roots of the polynomial the closest one to c. If the approximation is ambiguous, an error will be raised by evalf or convert.
A bounding box defined by two complex numbers a and b. The numbers should be given in the order of the lower-left corner of the box to the upper-right corner of the box (or left and right endpoints, in the case of a real interval), otherwise, an error will be raised. Moreover, if there is no root contained in the range, an error will be raised.
An index i, using the syntax index=i where i is an integer. The RootOf represents the i-th root of the equation in an order described in the help page RootOf/indexed. This option should be used only when the roots of the equation can be numbered. See RootOf/indexed.
A label e, using the syntax label=e. Essentially, labels are meant to distinguish several unspecified roots of the same equation. If the root is an algebraic number, an index selector should be used instead.
When a selector is present, especially when expr is a univariate polynomial with rational coefficients, the user should choose a selector specific enough to encode only one number to avoid errors in later computation such as evalf or evala.
If r is a RootOf of a polynomial, the allvalues command returns a sequence of formulae (in terms of radicals) for the roots. The convert/radical command returns a formula for the root selected (the principal root if none is selected).
Find the values of all roots.
Some functions use only the principal root.
Factor x4−x2+1 over ℚ and over ℚ⁡a=ℚz/z4−z2+1.
r1 ≔ RootOf⁡x3−2,x,1.26
Error, (in `evalf/RootOf`) there are ambiguous values encoded in RootOf(_Z^2-_Z-1,1/2)
r2 ≔ RootOf⁡x3−2,x,−0.7−1.1⁢I..−0.6−1.0⁢I
Error, (in RootOf) there is no root of _Z^2-_Z-1 in 2 .. 3
Define an alias for the principal root.
Define an alias for the real root.
Functions and Nested RootOfs:
f ≔ ∂∂x⁢β+β2x−1
r ≔ RootOf⁡y⁢ⅇy−x,y
f ≔ RootOf⁡cos⁡x−z,x
r1 ≔ RootOf⁡x2−2
r2 ≔ RootOf⁡y2−r1−1,y
The RootOf command was updated in Maple 18.
Using the RootOf Function
Download Help Document
What kind of issue would you like to report? (Optional)