Asymptotic Behavior of a Function
Asymptotic Behavior of a Function
The method here takes a series at infinity to get a Laurent polynomial, finds the largest exponent, and then finds the corresponding coefficient:
mainTerm[expr_, x_] := Module[{approxpoly, prec = 1, j = 0, expon, coef}, approxpoly = Normal[Series[expr, {x, Infinity, prec}]];
While[approxpoly === 0 && j ≤ 5, j++;
prec = 2 * prec + j;
approxpoly = Normal[Series[expr, {x, Infinity, prec}]];];
approxpoly = PowerExpand@approxpoly;
expon = Exponent[approxpoly, x];
coef = Coefficient[approxpoly, x, expon];
coef * x ^ expon]mainTerm[(x ^ 3 + 1) / (x + 1), x]mainTermAtOrigin[expr_, x_] := mainTerm[expr /. x -> 1 / x, x] /. x -> 1 / xmainTermAtOrigin[(x ^ 2 + 1) / (x + 1) - 1 / x, x]