Is there a simple and efficient way to compute the vanishing order of a power series, i.e. the degree of its smallest nonzero coefficient?
It seems like this is a basic operation that should be built-in. (Exponent[] computes the largest coefficient.)
Ideally, this would be simple, readable, and work if called on a polynomial instead of a power series.
The best I've come up with so far is
(1+FirstPosition[CoefficientList[#, x], Except[0], 1, 1, Heads -> False])&
Which isn't great. An alternative, which seems ill-advised, is to force conversion to a power series and reach into the SeriesData representation.
(With[{ser = # + O[x]^20}, ser[[4]]/ser[[6]]]) &
Is there a better approach?
Asymptotic[Cos[x]/Sin[2 x]^3, x -> 0]– Carl Woll Nov 16 '21 at 16:34Exponent[poly,x,Min]– Daniel Lichtblau Nov 16 '21 at 17:05Seriesand apparently this is what the poster wishes to avoid. – Daniel Lichtblau Nov 16 '21 at 17:08