# Retaining only the leading terms in a Series expansion at $\infty$

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$?

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_]:=
Plus@@DeleteCases[{#,Limit[#,x->l]}&/@List@@
Expand[Normal[Series[f[x],{x,l,n}]]],{_,0}][[All,1]]


f[x_]:=x-Erf[x]

retainer[f, ∞, 1]