NRoots
✖
NRoots
yields a disjunction of equations which represent numerical approximations to the roots of a polynomial equation.
Details and Options

- NRoots gives several identical equations when roots with multiplicity greater than one occur.
- NRoots has the following options:
-
MaxIterations Automatic maximum number of iterations to use Method Automatic method to use PrecisionGoal Automatic the precision sought StepMonitor None expression to evaluate at each step - Possible settings for the Method option include: "Aberth", "CompanionMatrix", and "JenkinsTraub".
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Scope (1)Survey of the scope of standard use cases
Find the numerical roots of a polynomial with only real roots:

https://wolfram.com/xid/0y8ouw-onbzkb

Find the numerical roots of a polynomial with real and complex roots:

https://wolfram.com/xid/0y8ouw-q5dai3

Find the numerical roots of a polynomial with multiple roots:

https://wolfram.com/xid/0y8ouw-jpyfa0

Options (5)Common values & functionality for each option
Method (3)
Use the "Aberth" method, which simultaneously approximates all the roots of a univariate polynomial and converges cubically in general (but linearly at multiple zeros):

https://wolfram.com/xid/0y8ouw-t4j3sf

Use the "CompanionMatrix" method:

https://wolfram.com/xid/0y8ouw-pmry9v

Use the "JenkinsTraub" method, which is a standard fast iterative globally convergent root-finding algorithm for polynomials:

https://wolfram.com/xid/0y8ouw-l4x1ty

PrecisionGoal (1)
Specifying PrecisionGoal can improve the precision of the roots returned:

https://wolfram.com/xid/0y8ouw-eml8tk

https://wolfram.com/xid/0y8ouw-g1zd03


https://wolfram.com/xid/0y8ouw-bgdz9x


https://wolfram.com/xid/0y8ouw-lvcnjl

Compare with the digits from an exact computation:

https://wolfram.com/xid/0y8ouw-gujuiw

StepMonitor (1)
Monitor the root-finding steps:

https://wolfram.com/xid/0y8ouw-1v9578

Using a different Method gives different convergence:

https://wolfram.com/xid/0y8ouw-yjjrcw

Applications (1)Sample problems that can be solved with this function
Visualize the asymptotic rate of growth of the terms in the "look and say sequence," which is given by the positive real root of the following polynomial:

https://wolfram.com/xid/0y8ouw-3o84j

https://wolfram.com/xid/0y8ouw-eud12p

Visualize the roots in the complex plane, highlighting the unique positive one:

https://wolfram.com/xid/0y8ouw-hk9w7s

Properties & Relations (7)Properties of the function, and connections to other functions
Return numerical roots using NRoots:

https://wolfram.com/xid/0y8ouw-ubw2w2


https://wolfram.com/xid/0y8ouw-m9cfut

Compare with the numericization of roots returned by Roots:

https://wolfram.com/xid/0y8ouw-s6a8yo


https://wolfram.com/xid/0y8ouw-8s9j58

Compare with the numerical roots returned by NSolve:

https://wolfram.com/xid/0y8ouw-60o0y2

Compare with the numericization of roots returned by Solve:

https://wolfram.com/xid/0y8ouw-ewn1ta


https://wolfram.com/xid/0y8ouw-6fvmod

Compare with the numericization of roots returned by Reduce:

https://wolfram.com/xid/0y8ouw-vpevxv


https://wolfram.com/xid/0y8ouw-ma5z6l

Compare with a single numerical root returned by FindRoot:

https://wolfram.com/xid/0y8ouw-oq9zhd

Compare with the numericization of a single root returned by FindInstance:

https://wolfram.com/xid/0y8ouw-0rnoej


https://wolfram.com/xid/0y8ouw-72dtkx

Possible Issues (3)Common pitfalls and unexpected behavior
NRoots returns unevaluated when called on a non-polynomial equation:

https://wolfram.com/xid/0y8ouw-y46bcc


NRoots can return small imaginary parts for polynomials with real roots:

https://wolfram.com/xid/0y8ouw-jzeyv5

https://wolfram.com/xid/0y8ouw-o4wnk0

Use Chop to remove them:

https://wolfram.com/xid/0y8ouw-8enk90

Increasing MaxIterations does not necessarily give more accurate results:

https://wolfram.com/xid/0y8ouw-ypsy74


https://wolfram.com/xid/0y8ouw-3djfi9


https://wolfram.com/xid/0y8ouw-pampxo

In such cases, increasing the PrecisionGoal can sometimes give more precise results:

https://wolfram.com/xid/0y8ouw-op33s7

Wolfram Research (1988), NRoots, Wolfram Language function, https://reference.wolfram.com/language/ref/NRoots.html (updated 2007).
Text
Wolfram Research (1988), NRoots, Wolfram Language function, https://reference.wolfram.com/language/ref/NRoots.html (updated 2007).
Wolfram Research (1988), NRoots, Wolfram Language function, https://reference.wolfram.com/language/ref/NRoots.html (updated 2007).
CMS
Wolfram Language. 1988. "NRoots." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/NRoots.html.
Wolfram Language. 1988. "NRoots." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/NRoots.html.
APA
Wolfram Language. (1988). NRoots. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NRoots.html
Wolfram Language. (1988). NRoots. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NRoots.html
BibTeX
@misc{reference.wolfram_2025_nroots, author="Wolfram Research", title="{NRoots}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/NRoots.html}", note=[Accessed: 29-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_nroots, organization={Wolfram Research}, title={NRoots}, year={2007}, url={https://reference.wolfram.com/language/ref/NRoots.html}, note=[Accessed: 29-March-2025
]}