3
$\begingroup$

Bug introduced in 8.0 or earlier and fixed in 10.0


Why does

Sum[Exp[I z n]/n, {n, Infinity}, GenerateConditions->True]

return

-Log[1-E^(I z)]

even though the sum only converges if $\text{Im}[z] \geq 0$ and $z$ is not an integer multiple of $2 \pi$?

SumConvergence[Exp[I z n]/n, n]

gives the correct answer.

Mathematica 9.0.1 on Mac OS X.

$\endgroup$
  • $\begingroup$ What's the question supposed to be here? $\endgroup$ – J. M. will be back soon Aug 14 '16 at 8:20
  • $\begingroup$ @J.M. It's a bug report; if someone has this issue, wonders why Sum and SumConvergence are giving different results, and searches these key words, they can find out why here. I didn't add the "bugs" tag because only high-ups in the community are supposed to do that, but hopefully someone will. $\endgroup$ – tparker Aug 14 '16 at 8:24
  • $\begingroup$ I know it's supposed to be a bug report; the point is that this is a Q&A site, so at the very least, make it look like a question. :) $\endgroup$ – J. M. will be back soon Aug 14 '16 at 8:27
  • 1
    $\begingroup$ (I know that only high-up members of the community are supposed to add the "bugs" tag, but since Wolfram Inc. personally told me that it was a bug, I've gone ahead and added the tag myself.) $\endgroup$ – tparker Aug 15 '16 at 2:09
  • 1
    $\begingroup$ With version 8.0.4 I get the output shown in the question. Versions 10.4.1 and 11.0.0 produce the correct output on my system (Windows 7 x64). Looks like the bug was indeed fixed in version 10. $\endgroup$ – Alexey Popkov Aug 15 '16 at 6:42
1
$\begingroup$

I filed a bug report with Wolfram about this issue. They e-mailed me upon the release of Mathematica 11.0 and told me that the issue has been fixed in that release.

$\endgroup$
1
$\begingroup$

THIS IS AN EXTENDED COMMENT

Version 10.0 gives the same result as version 11.0

$Version

(*  "10.0 for Mac OS X x86 (64-bit) (December 4, 2014)"  *)

Sum[Exp[I z n]/n, {n, Infinity}, GenerateConditions -> True]

(*  ConditionalExpression[
   -Log[1 - E^(I*z)], 
   E^Im[z] >= 1 && E^(I*z) != 1]  *)

SumConvergence[Exp[I z n]/n, n]

(*  E^Im[z] >= 1 && E^(I*z) != 1  *)

$Version

(*  "11.0.0 for Mac OS X x86 (64-bit) (July 28, 2016)"  *)

Sum[Exp[I z n]/n, {n, Infinity}, GenerateConditions -> True]

(*  ConditionalExpression[
   -Log[1 - E^(I*z)], 
   E^Im[z] >= 1 && E^(I*z) != 1]  *)

SumConvergence[Exp[I z n]/n, n]

(*  E^Im[z] >= 1 && E^(I*z) != 1  *)
$\endgroup$
  • $\begingroup$ Maybe they fixed it in 10.0 then. But 9.0 definitely gave the wrong answer - I filed the bug report in January 2014 and they said they'd fix it in a future version. No idea why they waited until now and then told me they'd fixed it in v11.0. $\endgroup$ – tparker Aug 15 '16 at 3:37
  • 2
    $\begingroup$ @tparker Just a guess: may be they indeed have fixed another Sum-related bug in version 11 and notified everyone who wasn't notified before? A muddle in the bugs database... $\endgroup$ – Alexey Popkov Aug 15 '16 at 6:49

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.