Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Numerical Calculus Package >

NLimit

NLimit[expr, z->z0]
numerically finds the limiting value of expr as z approaches z0.
  • The expression expr must be numeric when its argument z is numeric.
  • NLimit constructs a sequence of values that approach the point z0 and uses extrapolation to find the limit.
  • NLimit is unable to recognize small numbers that should in fact be zero. Chop may be needed to eliminate these spurious residuals.
  • NLimit often fails when the limit has a power law approach to infinity.
  • The following options can be given:
WorkingPrecisionMachinePrecisionprecision to use in internal computations
DirectionAutomaticvector giving the direction of approach
Scale1initial step size in the sequence of steps
Terms7number of terms used to evaluate the limit
MethodEulerSumthe method used to evaluate the result
WynnDegree1degree used in Wynn's epsilon algorithm
  • The option Direction->d specifies that the approach vector to a finite limit point z0 is given by the complex number d. The default setting Direction->Automatic is equivalent to Direction->-1, and computes the limit as z approaches z0 from larger values.
  • NLimit approaches infinite limit points on a ray from the origin.
  • The option Scale specifies the initial step in the constructed sequence.
  • For finite limit points x0, the initial step is a distance Scale away from x0. For infinite limit points, the initial step is a distance Scale away from the origin.
  • The accuracy of the result is generally improved by increasing the number of terms, although increased WorkingPrecision will also usually be necessary.
  • Possible settings for Method include:
EulerSumconverts sequence to a sum and uses EulerSum
SequenceLimituses SequenceLimit on constructed sequence
  • The option WynnDegree specifies the number of iterations of Wynn's epsilon algorithm to be used by SequenceLimit. In general, there must be at least 2 (n+1) terms for n iterations.
Find the limit at zero:
Find the limit at infinity:
Needs["NumericalCalculus`"]
Find the limit at zero:
In[2]:=
Click for copyable input
Out[2]=
 
Needs["NumericalCalculus`"]
Find the limit at infinity:
In[2]:=
Click for copyable input
Out[2]=
The expression can be manifestly complex:
The limit point can be complex:
Expressions which approach their limiting value exponentially need fewer terms:
Increasing the number of terms can improve accuracy:
Error in numerical approximation:
Use more terms to reduce error:
Use Scale to avoid regions where the expression is undefined:
The function f(x) diverges for f(1), so choose the initial step to avoid this divergence:
Approach 0 along the negative real axis (z* can be input using zEsc co Esc):
Approach 0 along the positive imaginary axis:
Approach 0 from the 3^(rd) quadrant, 225°:
An example where the default method works fairly well:
Using SequenceLimit produces poorer results:
An example where the default method works poorly:
Here, SequenceLimit produces the correct result:
When using Method->SequenceLimit, increasing WynnDegree may improve the accuracy of the limit:
Error with WynnDegree->1:
Error with WynnDegree->3:
Increasing WorkingPrecision alone does not produce a more accurate result:
Error with WorkingPrecision->20:
Error with WorkingPrecision->30:
To improve accuracy, the number of terms needs to be increased:
Find the limit of a numerically defined function:
Limits where parts of the expression have essential singularities:
In this case, the exact limit can be found:
Check:
SequenceLimit can be used directly to compute limits:
Limits whose value approaches infinity are sometimes unable to be computed:
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team