# Series gives wrong result

Bug introduced in 10.0 or earlier and persisting through 12.3.1

The following code shows that Series gives different results depending on whether one simplifies the expression in the first place. Let's assume all variables real.

f = (4 x^2)/((-a^2 - 4 x^2 + a Sqrt[a^2 + 4 x^2]) (a^2 + 4 x^2 +
a Sqrt[a^2 + 4 x^2]));
Series[Simplify[f], {x, 0, 1}]
(*-(1/a^2)+O[x]^2*)
Series[f, {x, 0, 1}, Assumptions -> a \[Element] Reals]
(*O[x]^2*)

• The command Series[f, {x, 0, 1}, Assumptions -> a \ [Element] Reals] produces -(1/a^2)+O[x]^2. Feb 6, 2020 at 19:21
• I wouldn't blame Series. Compare f /. x -> 0 and Simplify[f] /. x -> 0. Feb 6, 2020 at 20:18
• OK, maybe you should blame Series: Limit[f, x -> 0] and Limit[Simplify[f], x -> 0] both give -1/a^2. Feb 6, 2020 at 20:27
• @user64494 Not working with my V12 MMA. What version are you using? Feb 6, 2020 at 20:43
• With version 11, Series[f, {x, 0, 2}] gives (4 x^2)/(a^2 (-a+Sqrt[a^2]) (a+Sqrt[a^2]))+O[x]^3 which is even more questionable: denominator is zero for any a Feb 7, 2020 at 10:00

There is a simple workaround:

ClearAll[a, x]; f = (4 x^2)/((-a^2 - 4 x^2 +
a Sqrt[a^2 + 4 x^2]) (a^2 + 4 x^2 + a Sqrt[a^2 + 4 x^2]));
Series[f, {x, 0, 1}, Assumptions -> Re[a] > 0]
*-(1/a^2)+O[x]^2 *
Series[f, {x, 0, 1}, Assumptions -> Re[a] < 0]
*-(1/a^2)+O[x]^2 *


The case $$\Re a=0$$ makes a trouble.

• For me (in version 11) Assumptions -> Re[a] != 0 also gives wrong answer Feb 7, 2020 at 10:02
• The same in version 12.0. However, both assumptions Assumptions -> Re[a] > 0 and Assumptions -> Re[a] <0 work separately. Feb 7, 2020 at 13:09

Simplify the expression You like to evolve into the series first: Then reduce by hand the nominator, denominator. The expression in the first argument of Series is than more simply: Nice equivalent for math thinking is using Wolfram Alpha: The Wolfram Alpha solution and my more specific do not make use of Assumptions.