WOLFRAM

Root[{f,c}]

represents the exact root of the general equation f[x]0 near x=c.

Root[{{f1,,fn},{c1,,cn}},j]

represents the j^(th) coordinate of the exact root of the system of equations {f1[x1,,xn]0,,fn[x1,,xn]0} near {x1,,xn}={c1,,cn}.

Root[f,k]

represents the exact k^(th) root of the polynomial equation f[x]0.

Root[{f1,f2,},{k1,k2,}]

represents the last coordinate of the exact vector {a1,a2,} such that ai is the ki^(th) root of the polynomial equation fi[a1,,ai-1,x]0.

Details and Options

  • Root is also known as an algebraic number when f is polynomial with integer coefficients or a transcendental number when there is no such polynomial f possible.
  • Root is typically used to represent an exact number and is automatically generated by a variety of algebra, calculus, optimization and geometry functions.
  • Root represents an exact number as a solution to an equation f[x]0 with additional information specifying which of the roots is intended.
  • Root numbers can be used like any other numbers, both in exact and approximate computations.
  • Root numbers are formatted as where approx is a numerical approximation. An approximation to precision p can be computed using N[,p].
  • For most uses, Root objects are automatically generated and can be directly used. For advanced uses, when your code is going to directly generate Root objects, a deeper understanding of the different representations is necessary.
  • There are two distinct mechanisms used to specify which root of an equation is represented, the neighborhood representation Root[{f,c}] and the indexing representation Root[f,k].
  • The root neighborhood representation Root[{f,c}] specifies the equation f[x]0 as well as the neighborhood rectangle centered at c and width and height .
  • The root neighborhood representation for systems Root[{{f1,,fn},{c1,,cn}},j] similarly specifies a system of equations {f1[x1,,xn]0,,fn[x1,,xn]0} and a neighborhood given by the product of rectangles from ci for the different coordinates.
  • The root neighborhood representation Root[{f,c,m}] specifies that f[x]0 has a root of multiplicity m in the neighborhood given by c. However, it may be a cluster of closely spaced roots and by refining the neighborhood c, i.e. higher precision root approximation, they may separate. »
  • The root indexing representation Root[f,k] applies to polynomial functions f only. The indexing of roots takes the real roots first, in increasing order. For polynomials with rational coefficients, the complex conjugate pairs of roots have consecutive indices.
  • The root indexing representation for systems Root[{f1,f2,,fk},{k1,k2,,kn}] applies to triangular systems of polynomial equations only. Given equations f1[x1]0, f2[x1,x2]0, , fn[x1,x2,,xn]0, we recursively define r1 as the k1^(th) root of f1[x1]0, r2 as the k2^(th) root of f2[r1,x2]0 and finally rn as the kn^(th) root of fn[r1,,rn-1,xn]0. The represented root is rn.

Examples

open allclose all

Basic Examples  (4)Summary of the most common use cases

Solution to a quintic:

Out[1]=1

Numerical values:

Out[2]=2

Real solutions to an exp-log equation:

Out[1]=1

Real solution to a system of equations:

Out[1]=1

A solution instance to a system of transcendental equations:

Out[1]=1

Scope  (22)Survey of the scope of standard use cases

Basic Uses  (5)

Some exact values are generated automatically:

Out[1]=1
Out[2]=2
Out[1]=1
Out[3]=3

Evaluate to high precision:

Out[1]=1
Out[2]=2
Out[3]=3

Exact comparisons:

Out[1]=1

Convert radicals to a Root object:

Out[1]=1

Convert a Root object to radicals:

Out[2]=2

Disable the elided formatting of Root:

Out[2]=2

Re-enable the elided formatting:

Out[4]=4

Roots of Univariate Functions  (4)

Real roots of an exp-log function:

Out[1]=1

The Root representation involves a univariate function and an approximation that isolates the root:

Out[2]=2
Out[3]=3

The Root object is an exact numeric expression:

Out[4]=4
Out[5]=5

Roots of an analytic function in a bounded region:

Out[1]=1

A triple root:

Out[1]=1
Out[2]=2

This representation is used for roots of polynomials of degrees that exceed $MaxRootDegree:

Out[1]=1
Out[2]=2
Out[3]=3

The approximation used to represent the root is equal to , but the root is not:

Out[4]=4

Roots of Multivariate Systems  (1)

Find a solution instance to a system of transcendental equations:

Out[1]=1

The roots are exact numeric expressions:

Out[2]=2
Out[3]=3

The Root representation involves a multivariate system and an approximation that isolates the root:

Out[4]=4

Roots of Univariate Polynomials  (10)

Roots of a univariate polynomial with rational coefficients are algebraic numbers:

Out[1]=1
Out[2]=2

The polynomials are automatically reduced:

Out[1]=1

A minimal polynomial is always irreducible and primitive:

Out[2]=2

Use MinimalPolynomial to extract the minimal polynomial:

Out[3]=3

A Root object representing an algebraic number has three arguments:

Out[1]=1

The third argument is 0 (default value) or 1 and indicates the root isolation method to be used:

Out[2]=2

The root isolation method used may affect the ordering of non-real roots:

Out[3]=3
Out[4]=4

Roots of polynomials of degree at 1 and 2 simplify automatically:

Out[1]=1
Out[2]=2

An algebraic combination of algebraic numbers is an algebraic number:

Out[1]=1

Use RootReduce to represent the result as a single Root object:

Out[2]=2

The canonicalization is not done automatically since minimal polynomials can grow rapidly:

Out[3]=3

Complex components of algebraic numbers:

Out[1]=1
Out[2]=2

Root of a polynomial with exact numeric coefficients is an exact numeric object:

Out[1]=1
Out[2]=2
Out[3]=3

Roots of a polynomial with coefficients involving symbolic parameters:

Out[1]=1

Plot the real-valued roots:

Out[2]=2

Find the series with respect to the parameter:

Out[3]=3

Find Puiseux series of a root at a branch point:

Out[1]=1

Roots of a quadratic with symbolic coefficients:

Out[1]=1

When a, b, c and the roots are real, the roots are always ordered by their values:

Out[2]=2

The "standard" formulas for the roots of a quadratic do not guarantee the ordering of roots:

Out[3]=3
Out[4]=4

Roots of Triangular Polynomial Systems  (2)

Real root of a triangular system of equations:

Out[1]=1

The Root representation involves a triangular polynomial system and root indices:

Out[2]=2
Out[3]=3

The Root object is an exact numeric expression:

Out[4]=4
Out[5]=5

Roots of systems of polynomials with rational coefficients have algebraic number coordinates:

Out[6]=6

The degree of the minimal polynomial is generally the product of degrees of the system polynomials:

Out[7]=7

This representation is used for roots of polynomials with algebraic number coefficients:

Out[1]=1
Out[2]=2

Convert the root to the canonical algebraic number representation:

Out[3]=3
Out[4]=4

Options  (1)Common values & functionality for each option

ExactRootIsolation  (1)

Root[f,k] by default isolates the complex roots of a polynomial using validated numerical methods. Setting ExactRootIsolationTrue will make Root use symbolic methods that are usually much slower.

The setting of ExactRootIsolation is reflected in the third argument of a Root object:

Root isolation is performed the first time the numerical value of the root is needed:

Out[3]=3

The symbolic complex root isolation method is usually slower than the validated numeric one:

Out[4]=4

The root isolation method may affect the ordering of nonreal roots:

Out[5]=5

Applications  (19)Sample problems that can be solved with this function

Solve polynomial equations of any degree in closed form in terms of Root:

Out[1]=1

Solve the characteristic equation of a Hilbert matrix:

Out[1]=1
Out[2]=2

Using Eigenvalues:

Out[3]=3

Find the minimum of a parameterized polynomial:

Out[1]=1

Solve a constant coefficient differential equation of any degree:

Out[1]=1

Solve a constant coefficient difference equation of any degree:

Out[1]=1

Find a solution of a triangular system of equations:

Out[1]=1

Represent the solution in the Root[f,k] form:

Out[2]=2

Here, the Root[f,k] representation would involve a polynomial of degree 1000000:

Out[3]=3

Compute an approximate value of the solution:

Out[4]=4

Resolve a piecewise function:

Out[1]=1
Out[2]=2

Solve univariate exp-log equations and inequalities over the reals:

Out[1]=1
Out[2]=2

Solve univariate elementary function equations over bounded intervals and regions:

Out[1]=1
Out[2]=2

Solve univariate analytic equations over bounded intervals and regions:

Out[1]=1
Out[2]=2

Find real roots of high-degree sparse polynomials and algebraic functions:

Out[1]=1
Out[2]=2

Solve univariate transcendental optimization problems:

Out[1]=1
Out[2]=2

Integrate a piecewise function with an exp-log inequality condition:

Out[1]=1

Evaluate the hard hexagon entropy constant:

Out[1]=1

Solve Kepler's equation:

Out[1]=1

Compute the Laplace limit constant:

Out[1]=1
Out[2]=2

Plot a root as a function of a parameter:

Out[1]=1

Solve a convex optimization problem:

Out[1]=1

Find a solution instance of a system of transcendental equations and inequalities:

Out[1]=1

Properties & Relations  (11)Properties of the function, and connections to other functions

Root objects represent exact numbers:

Out[1]=1

Compute approximations to arbitrary precision:

Out[2]=2
Out[3]=3
Out[4]=4

Use MinimalPolynomial to find minimal polynomials of algebraic numbers:

Out[1]=1
Out[2]=2
Out[3]=3
Out[4]=4

Use ToRadicals to attempt to convert a Root object to an arithmetic combination of radicals:

Out[1]=1

All roots of polynomials of degree not exceeding 4 are representable in radicals:

Out[2]=2

Use RootReduce to canonicalize algebraic numbers, including from operations:

Out[1]=1
Out[2]=2
Out[3]=3
Out[4]=4

From a triangular system:

Out[5]=5
Out[6]=6

Use AlgebraicNumber for computations within a fixed simple extension of the rationals:

Out[1]=1

Rational operations on AlgebraicNumber objects produce AlgebraicNumber objects:

Out[2]=2

Use ToNumberField to express given algebraic numbers as elements of the same simple extension:

Out[3]=3
Out[4]=4
Out[5]=5

Perform computations within the common simple extension or rationals:

Out[6]=6

RootSum represents the sum of values of a function over roots of a polynomial:

Out[1]=1

Use Normal to represent the sum using explicit roots:

Out[2]=2

For rational functions, the sum can be computed without finding the roots:

Out[3]=3

Simplify combinations of Root objects:

Out[1]=1
Out[2]=2

Solve an equation for a parameter in a Root object:

Out[1]=1

Use ImplicitD to compute derivatives of implicit solutions of equations:

Out[1]=1
Out[2]=2

Compare with the result obtained by computing the derivative of directly:

Out[3]=3

Compute series expansions of implicit solutions to equations:

Out[1]=1
Out[2]=2

Use AsymptoticSolve to find series expansions of all roots:

Out[3]=3

Use RootApproximant to generate Root objects that approximate given numbers:

Out[1]=1
Out[2]=2

Possible Issues  (5)Common pitfalls and unexpected behavior

Series at branch points may not be valid in all directions:

Out[1]=1

Canonicalization is only possible for parameterfree roots:

Out[1]=1

Parameterized roots can have complicated branch cuts in the complex parameter plane:

Out[1]=1

A non-polynomial Root object may represent a cluster of distinct roots:

Out[2]=2

Numerical computation with a higher precision yields an approximation of one of the roots:

Out[3]=3

The choice of root stays the same for subsequent computations:

Out[4]=4

A larger setting for $MaxExtraPrecision can be needed for roots with noninteger coefficients:

Out[1]=1
Out[2]=2

Neat Examples  (1)Surprising or curious use cases

A high power of a Pisot number that is nearly an integer:

Out[1]=1
Out[2]=2
Wolfram Research (1996), Root, Wolfram Language function, https://reference.wolfram.com/language/ref/Root.html (updated 2021).
Wolfram Research (1996), Root, Wolfram Language function, https://reference.wolfram.com/language/ref/Root.html (updated 2021).

Text

Wolfram Research (1996), Root, Wolfram Language function, https://reference.wolfram.com/language/ref/Root.html (updated 2021).

Wolfram Research (1996), Root, Wolfram Language function, https://reference.wolfram.com/language/ref/Root.html (updated 2021).

CMS

Wolfram Language. 1996. "Root." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/Root.html.

Wolfram Language. 1996. "Root." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/Root.html.

APA

Wolfram Language. (1996). Root. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Root.html

Wolfram Language. (1996). Root. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Root.html

BibTeX

@misc{reference.wolfram_2025_root, author="Wolfram Research", title="{Root}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/Root.html}", note=[Accessed: 08-July-2025 ]}

@misc{reference.wolfram_2025_root, author="Wolfram Research", title="{Root}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/Root.html}", note=[Accessed: 08-July-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_root, organization={Wolfram Research}, title={Root}, year={2021}, url={https://reference.wolfram.com/language/ref/Root.html}, note=[Accessed: 08-July-2025 ]}

@online{reference.wolfram_2025_root, organization={Wolfram Research}, title={Root}, year={2021}, url={https://reference.wolfram.com/language/ref/Root.html}, note=[Accessed: 08-July-2025 ]}