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  (3)

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:

Find five exact roots of a transcendental equation:

Scope  (6)

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:

Find five roots of a polynomial of a high degree:

Find three roots of an unrestricted complex transcendental equation:

Find three out of a trillion roots of a polynomial system:

Find five solutions of a transcendental system:

Possible Issues  (1)

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

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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