MaxRoots

MaxRoots

is an option for NSolve and related functions that specifies the maximum number of roots that should be returned in the solution for a system of algebraic or transcendental equations.

Details

  • Possible settings include:
  • Automaticautomatically decide how many roots to return
    Infinityreturn all roots
    nreturn at most n roots

Examples

open allclose all

Basic Examples  (2)

Find three roots of a polynomial equation:

With the default Automatic setting, all 100 roots are returned:

Find three roots of a transcendental equation:

With the default Automatic setting, 16 roots are returned:

Scope  (2)

Find two roots of a system of polynomial equations:

With the default Automatic setting, all 21 roots are returned:

Find five roots of a system of transcendental equations:

With the default Automatic setting, 16 roots are returned:

Find 100 roots:

Possible Issues  (1)

The setting of MaxRoots is ignored when solutions depend on symbolic parameters:

Wolfram Research (2023), MaxRoots, Wolfram Language function, https://reference.wolfram.com/language/ref/MaxRoots.html.

Text

Wolfram Research (2023), MaxRoots, Wolfram Language function, https://reference.wolfram.com/language/ref/MaxRoots.html.

CMS

Wolfram Language. 2023. "MaxRoots." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MaxRoots.html.

APA

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

BibTeX

@misc{reference.wolfram_2023_maxroots, author="Wolfram Research", title="{MaxRoots}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/MaxRoots.html}", note=[Accessed: 22-February-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_maxroots, organization={Wolfram Research}, title={MaxRoots}, year={2023}, url={https://reference.wolfram.com/language/ref/MaxRoots.html}, note=[Accessed: 22-February-2024 ]}