Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#8582 closed defect (fixed)

sum(1/(1+k^2), k, -oo, oo) returns 0

Reported by: mvngu Owned by: burcin
Priority: major Milestone: sage-4.6.1
Component: symbolics Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:


From sage-support:

But I want to make a comment, also from this documentation. It says
sum(1/(1+k^2), k, -oo, oo, algorithm = 'mathematica')     # optional
-- requires mathematica

OK, I understand that sage do not kown how to evaluate
sum(1/(1+k^2), k, -oo, oo)

But it answer     0      , that is wrong!!!

Change History (6)

comment:1 Changed 10 years ago by kcrisman

This seems to be fixed in Maxima 5.21.1 or so:

(%i2) load(simplify_sum);
(%o2) /Users/.../maxima/share/contrib/solve_rec/simplif\
(%i5) display2d:false;

(%o5) false
(%i6) simplify_sum(sum(1/(1+k^2),k,-inf,inf));

(%o6) -%i*(psi[0](%i+1)+%gamma)/2-%i*(psi[0](%i)+%gamma)/2

Which uses the digamma function quite a bit. We don't get the (perhaps) simpler answer pi coth(pi).

comment:2 Changed 10 years ago by kcrisman

This should hopefully be resolved by #8731.

comment:3 Changed 10 years ago by mvngu

  • Resolution set to fixed
  • Status changed from new to closed

This is fixed at ticket #10187 by upgrading to Maxima 5.22.1:

[mvngu@sage sage-4.6.1.alpha3]$ ./sage 
| Sage Version 4.6.1.alpha3, Release Date: 2010-12-05                |
| Type notebook() for the GUI, and license() for information.        |
*                                                                    *
* Warning: this is a prerelease version, and it may be unstable.     *
*                                                                    *
sage: k = var("k") 
sage: sum(1/(1+k^2), k, -oo, oo)
1/2*I*psi(-I) - 1/2*I*psi(I) + 1/2*I*psi(-I + 1) - 1/2*I*psi(I + 1)
sage: %maxima

  --> Switching to Maxima <-- 

maxima: load(simplify_sum);
maxima: display2d:false;
maxima: simplify_sum(sum(1/(1+k^2),k,-inf,inf));

So I'm closing this ticket as fixed.

comment:4 follow-up: Changed 10 years ago by kcrisman

Is that doctested in the patches for #10187?

comment:5 in reply to: ↑ 4 Changed 10 years ago by mvngu

Replying to kcrisman:

Is that doctested in the patches for #10187?

No. But it shouldn't be difficult to write a documentation patch with doctests in the current ticket. The Sage 4.6.1 release cycle is now in feature freeze, but I think documentation patches are OK for merging in the upcoming release candidates.

comment:6 Changed 10 years ago by mvngu

See #10434 for a follow-up documentation ticket.

Note: See TracTickets for help on using tickets.