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. It may be helpful to see the expressions as they actually appear on the screen:
Addendum:
Both the original question and the recent addition to it involve series expansions about a branch point, which invites problems. In fact, there is no well defined series about a branch point, unless additional conditions are imposed. On the other hand, adding an extra condition in the form of Assumptions -> x <= 1
to the original problem yields the same result as before.
Now, explicitly consider the new addition to the question:
test = 1/(1 - x) + 1/Sqrt[1 - x] (1/Sqrt[1 - x] + 1) + 1;
ser1 = Series[test // Factor, {x, 1, -1}]
(* SeriesData[x, 1, {-2 - (1 - x)^Rational[1, 2]}, -1, 0, 1] *)
ser2 = Series[test, {x, 1, -1}]
(* -(1/(x - 1)) + SeriesData[x, 1, {}, -1, 0, 1] *)
Again, for clarity this is how this material appears on the screen.
The two results ostensibly are to the same order and, hence, can be compared directly. ser2
is incorrect. Also, Assumptions -> x <= 1
does not help. This appears to be a bug.
Progress Report: Version 11.3 produces the same results as in the addendum