Skip to main content
2 of 5
add screen image
bbgodfrey
  • 62.1k
  • 18
  • 92
  • 160

This seemingly simple problem indeed produces unexpected results:

ser1 = Series[test // Factor, {x, 1, -1}]
(* -(1/(x - 1)) + SeriesData[x, 1, {}, -1, 0, 1] *)
ser2 = Series[test, {x, 1, -1}]
(* SeriesData[x, 1, {1 + ((1 - x)^(-1))^Rational[1, 2] + (1 - x)^(-1)}, 0, 2, 1] *)

Note that ser1 is a series of order -1, as requested, whereas ser2 is a series of order +1. Compare

ser3 = Series[test // Factor, {x, 1, 1}] 
(* SeriesData[x, 1, {-1, 1 + ((1 - x)^(-1))^Rational[1, 2]}, -1, 2, 1] *)

which is mathematically the same as ser2, although its Mathematica internal representation is different. So one question is, why does Mathematica return series of different orders for ostensibly the same problem.

It also is worth noting that

ser2 - ser1
(* 1/(x - 1) + SeriesData[x, 1, {}, -1, 0, 1] *)

because Mathematica discards higher order terms, until both expressions are of the same order, as it should.

In all, the Series results are mathematically correct, except insofar as Mathematica returns more terms than it should for ser2. Whether this is a bug may be a matter of opinion.

Addendum: It may be helpful to see the expressions as they actually appear on the screen:

enter image description here

bbgodfrey
  • 62.1k
  • 18
  • 92
  • 160