The function Series requires that the expansion order is an integer, i.e. for the input


it will give the warning

Series::serlim: "Series order specification 1/3 is not a machine-sized integer."

and return the Series unevaluated.

It seems to me that this is a well defined and easily solvable problem though. In fact, we can write our own series function as follows,

mySeries[expr_, {x_, x0_, n_?IntegerQ}] := Series[expr, {x, x0, n}]
mySeries[expr_, {x_, x0_, n_}] :=  Quiet[
Series[ expr /. x -> x^Denominator[n], {x, x0, Numerator[n]}] /. 
 SeriesData[y_, y0_, list_, nmin_, nmax_, nfrac_] :> 
SeriesData[y, y0, list, nmin, nmax, Denominator[n] nfrac], SeriesData::sdatc]




SeriesData[x, 0, {1, 1}, 3, 6, 12]

(This is x^(1/4)+x^(1/3)+O(x^(1/2))), as expected.

Why is this not the standard behaviour of Series, is there something subtle I'm missing, or is this a bug?

Also note that SeriesCoefficient works perfectly fine with rational powers.

  • $\begingroup$ It's a limitation. Series might give a result with fractional powers but I believe it does not like to see them in the input spec. $\endgroup$ – Daniel Lichtblau Dec 9 '15 at 22:14
  • $\begingroup$ I see, but is there any reason for this limitation? It seems unnecessary to me. $\endgroup$ – Jansen Dec 9 '15 at 22:38
  • $\begingroup$ same with Maple: series(x^(1/4)+x^(1/3)+x^(1/2), x=0,1/3 ); gives Error, invalid input: series expects its 3rd argument, n, to be of type {infinity, nonnegint}, but received 1/3 $\endgroup$ – Nasser Jan 9 '16 at 9:44

In general your way may be right, but in the example like yours one can do an easy trick. Let us first replace:

  expr = x^(1/4) + x^(1/3) + x^(1/2) /. x -> z^12 // Simplify[#, z > 0] &

(*  z^3 (1 + z + z^3)  *)

Then apply Series:

expr2 = Series[expr, {z, 0, 4}] // Normal

(*  z^3 + z^4  *)

Then replace back:

    expr2 /. z -> x^(1/12) // Simplify[#, x > 0] &

(*  x^(1/4) + x^(1/3)   *)

Have fun!

| improve this answer | |
  • $\begingroup$ Hi Alexei, yes indeed, that's precisely what mySeries above does, except that it keeps it as a SeriesData object to make the output identical to that of Series. $\endgroup$ – Jansen Dec 10 '15 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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