NRoots
NRoots[lhs==rhs,var]
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)
Scope (1)
Options (5)
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):
Use the "CompanionMatrix" method:
Use the "JenkinsTraub" method, which is a standard fast iterative globally convergent root-finding algorithm for polynomials:
PrecisionGoal (1)
Specifying PrecisionGoal can improve the precision of the roots returned:
StepMonitor (1)
Applications (1)
Properties & Relations (7)
Return numerical roots using NRoots:
Compare with the numericization of roots returned by Roots:
Compare with the numerical roots returned by NSolve:
Compare with the numericization of roots returned by Solve:
Compare with the numericization of roots returned by Reduce:
Compare with a single numerical root returned by FindRoot:
Compare with the numericization of a single root returned by FindInstance:
Possible Issues (3)
NRoots returns unevaluated when called on a non-polynomial equation:
NRoots can return small imaginary parts for polynomials with real roots:
Use Chop to remove them:
Increasing MaxIterations does not necessarily give more accurate results:
In such cases, increasing the PrecisionGoal can sometimes give more precise results:
Text
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.
APA
Wolfram Language. (1988). NRoots. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NRoots.html