When performing a Series expansion at infinity, Mathematica sometimes retains some exponential terms which for large expressions are making it impossible to understand the actual behaviour of a function in a given limit. As an example, consider the function $$f(x)=x-\text{erf}(x).$$ Clearly one has $\lim_{x\rightarrow\infty}\left[f(x)-x\right]=-1$, so that for large $x$, one can say that $$f(x)\approx x-1.$$

Now I would like to obtain such a result using Mathematica. Is there a specific way to do that?

One could think of using

Series[x-Erf[x],{x,∞,1}] // Normal//Expand

but would obtain the result $$\frac{e^{-x^2}}{\sqrt{\pi } x}+x-1$$ Here clearly it is easy to realise the term $\frac{e^{-x^2}}{\sqrt{\pi } x}$ can be ignored for large $x$. However this might not be the case when considering a more complicated function with dozen of terms like this. Is anyone aware of a way to retain only the significant part of the expression or alternatively another way to obtain the behaviour of the function for large $x$?


1 Answer 1


You can actually program what your mind does when it sees that answer with infinitesimal terms present:

  • Take series
  • Extract terms
  • Take limit for every term around series expansion point
  • Delete terms that give 0 limit
  • Put remaining terms back together

Define it:

retainer[f_,l_, n_]:=

Your test function



retainer[f, ∞, 1]

-1 + x


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.