Came across this today, which looks like a bug to me. If I take the Series expansion which includes a numerical $\textrm{sech}^2(x)$ term that does not depend on the parameter, it fails to expand properly:

Series[Sech[100 (0.5 - x)]^2 ϵ, {ϵ, 0, 1}]

(* 0 *)

but the obvious answer should be Sech[100 (0.5 - x)]^2 ϵ + O[ϵ^2]. The machine precision is the issue here, if I use 1/2 instead it works fine.

Can anyone confirm if this is a bug.

  • $\begingroup$ Same with 11.2 on Win 7. $\endgroup$ – b.gates.you.know.what Oct 17 '17 at 9:55
  • $\begingroup$ Thanks @b.gatessucks. I have tested it myself on 9.0, 11.1 on Windows 7. $\endgroup$ – KraZug Oct 17 '17 at 10:11
  • $\begingroup$ Same with 11.2 @ win 10. Though, if you add Series[Sech[100 (N[1/2, 1] - x)]^2 ϵ, {ϵ, 0, 1}] it expands properly. $\endgroup$ – ercegovac Oct 17 '17 at 10:15
  • $\begingroup$ Also if you decrease 100 down to ~60 or so it suddenly works fine. $\endgroup$ – KraZug Oct 17 '17 at 10:16
  • $\begingroup$ It is due to this: In[1]:= PossibleZeroQ[Sech[100 (0.5 - x)]^2] Out[1]= True I would surmise this comes about from internals of zero testing doing some expansion and being unable to tell the machine arithmetic results fro zero. Does not happen when .5 is replaced with 1/2 or with a bignum approximate value e.g. 0.5`10 so this is an interaction between machine arithmetic and symbolic computation. I should note that this in and of itself is not regarded as a bug, at least not by me. $\endgroup$ – Daniel Lichtblau Oct 18 '17 at 23:21

Your Answer

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

Browse other questions tagged or ask your own question.