MaxRecursion

MaxRecursion
is an option for functions like NIntegrate and Plot that specifies how many recursive subdivisions can be made.

DetailsDetails

  • MaxRecursion->n specifies that up to n levels of recursion should be done.
  • Recursive subdivision is done only in those places where more samples seem to be needed in order to achieve results with a certain level of quality.
  • In d dimensions, each recursive subdivision increases the number of samples taken by a factor that increases roughly exponentially with d.
  • MaxRecursion->Infinity specifies no limit on the number of recursive subdivisions.
  • In cases such as functions with discontinuities or with infinitely rapid oscillations there may be no convergence even after an infinite number of subdivisions.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Get a very high-quality plot of a sharp feature:

In[1]:=
Click for copyable input
Out[1]=

Allow more adaptive recursion to resolve the integral of a rapidly varying function:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 1991
(2.0)
| Updated in 2007
(6.0)