Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sagetrac-mvngu mannequin opened this issue Mar 23, 2010 · 6 comments
Closed

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

sagetrac-mvngu mannequin opened this issue Mar 23, 2010 · 6 comments

Comments

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Mar 23, 2010

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!!!

Component: symbolics

Issue created by migration from https://trac.sagemath.org/ticket/8582

@sagetrac-mvngu sagetrac-mvngu mannequin added this to the sage-4.6.1 milestone Mar 23, 2010
@sagetrac-mvngu sagetrac-mvngu mannequin assigned burcin Mar 23, 2010
@kcrisman
Copy link
Member

comment:1

This seems to be fixed in Maxima 5.21.1 or so:


(%i2) load(simplify_sum);
(%o2) /Users/.../maxima/share/contrib/solve_rec/simplif\
y_sum.mac
(%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
                                 +%i*(psi[0](-%i)+%gamma)/2
                                 +%i*(psi[0](1-%i)+%gamma)/2

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

@kcrisman
Copy link
Member

comment:2

This should hopefully be resolved by #8731.

@sagetrac-mvngu
Copy link
Mannequin Author

sagetrac-mvngu mannequin commented Dec 6, 2010

comment:3

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);
"/dev/shm/mvngu/sage-4.6.1.alpha3/local/share/maxima/5.22.1/share/contrib/solve_rec/simplify_sum.mac"
maxima: display2d:false;
false
maxima: 
maxima: simplify_sum(sum(1/(1+k^2),k,-inf,inf));
-%i*(psi[0](%i+1)+%gamma)/2-%i*(psi[0](%i)+%gamma)/2+%i*(psi[0](-%i)+%gamma)/2+%i*(psi[0](1-%i)+%gamma)/2

So I'm closing this ticket as fixed.

@sagetrac-mvngu sagetrac-mvngu mannequin closed this as completed Dec 6, 2010
@kcrisman
Copy link
Member

kcrisman commented Dec 6, 2010

comment:4

Is that doctested in the patches for #10187?

@sagetrac-mvngu
Copy link
Mannequin Author

sagetrac-mvngu mannequin commented Dec 6, 2010

comment:5

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.

@sagetrac-mvngu
Copy link
Mannequin Author

sagetrac-mvngu mannequin commented Dec 6, 2010

comment:6

See #10434 for a follow-up documentation ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants