Bug introduced in 5.0 or earlier and fixed in 11.1.1
Define variable z
with the following assumptions
$Assumptions = 0 < z < 1
I put in the following two codes in Mathematica
t1 = Simplify[Series[ArcTanh[(1 - Sqrt[z])^2], {z, 0, 3}]]
t2 = Simplify[Series[ArcTanh[(1 - Sqrt[z])^2] // TrigToExp, {z, 0, 3}]]
The codes are identical to each other except for the extra TrigToExp
. Yet, the outputs are completely different
$$t_1 = -\frac{\log (z)}{4}-\frac{\sqrt{z}}{4}+\frac{z}{16}+\frac{5 z^{3/2}}{48}+\frac{z^2}{16}+\frac{z^{5/2}}{40}+O\left(z^{7/2}\right) ~~~~~~~~~~~~~~~\\ t_2 = -\frac{\log (z)}{4}-\frac{\sqrt{z}}{4}+\frac{z}{16}+\frac{5 z^{3/2}}{48}+\frac{9 z^2}{128}+\frac{9 z^{5/2}}{320}+\frac{z^3}{768}+O\left(z^{7/2}\right) $$
Why are the two results different and which result should I trust?
Series[... {z,0,7}]
you will see that the two Series will diverge only for the higher order terms. The first expression withoutTrigToExp
seems to converge faster to the correct values. $\endgroup$TrigToExp
'ed) version. Looking into it. $\endgroup$