Opened 11 years ago
Closed 7 years ago
#9908 closed defect (duplicate)
maxima sum returns hypergeometric function
Reported by: | schilly | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | symbolics | Keywords: | hypergeometric |
Cc: | eviatarbach | Merged in: | |
Authors: | Reviewers: | Karl-Dieter Crisman, Ralf Stephan | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
The parsing of Maxima's output is not good enough to handle this:
var('n') sum(((2*I)^n/(n^3+1)*(1/4)^n), n, 0, infinity)
gives an exception
TypeError: unable to make sense of Maxima expression 'f[4,3]([1,1,-(sqrt(3)*I+1)/2,(sqrt(3)*I-1)/2],[2,-(sqrt(3)*I-1)/2,(sqrt(3)*I+1)/2],I/2)' in Sage
which is - i think - a f_43 hypergeometric function.
Change History (16)
comment:1 Changed 11 years ago by
comment:2 Changed 10 years ago by
This should be
var('x n') f=(-1)^n/((2*n+1)*factorial(2*n+1)) sum(f,n,0,oo)
If I'm not mistaken, this might be related to #2516, in the sense that we should be parsing hypergeometric functions correctly and that would be part of that ticket.
comment:3 Changed 8 years ago by
- Cc eviatarbach added
comment:4 Changed 8 years ago by
This also causes a similar problem in #4102:
sage: f = bessel_J(2, x) sage: f.integrate(x) Traceback (most recent call last): ... TypeError: cannot coerce arguments: no canonical coercion from <type 'list'> to Symbolic Ring
In that case, Maxima is returning hypergeometric([3/2],[5/2,3],-x^2/4)
.
comment:5 Changed 8 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:6 Changed 8 years ago by
See also http://ask.sagemath.org/question/3091 for another example.
comment:7 Changed 7 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:8 Changed 7 years ago by
- Keywords hypergeometric added
comment:9 Changed 7 years ago by
And see this sage-support thread for possibly another example.
comment:10 Changed 7 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:11 follow-up: ↓ 12 Changed 7 years ago by
#2516 has all the examples above in it, with the exception of the ones mentioned in the comments.
- One would want to be able to do
b=var('b') integral(1/(x^b+1),x)
without using W|A; apparently1/(a^b+1)
would yield2F1(1,1/a,1+1/a,-a^x)
. - Apparently
sum(x^(3*k)/factorial(2*k),k,0,oo)
would also be doable with hypergeometrics.
comment:12 in reply to: ↑ 11 ; follow-up: ↓ 13 Changed 7 years ago by
comment:13 in reply to: ↑ 12 ; follow-up: ↓ 14 Changed 7 years ago by
- Reviewers set to Karl-Dieter Crisman, Ralf Stephan
- Status changed from new to needs_review
What I get with #2516 is
sage: integral(1/(x^b+1),x) integrate(1/(x^b + 1), x)
Not really worth keeping open, as even Maxima does this.
sage: sum(x^(3*k)/factorial(2*k),k,0,oo) sqrt(pi)*x^(3/4)*sqrt(1/(pi*x^(3/2)))*cosh(x^(3/2))
Interestingly, this works in vanilla Sage as well. Maybe there weren't any hg functions to begin with there. I assume it was fixed with #16224 - earlier it gave yet another (wrong) answer.
So I nominate to close this ticket.
comment:14 in reply to: ↑ 13 Changed 7 years ago by
- Status changed from needs_review to positive_review
sage: sum(x^(3*k)/factorial(2*k),k,0,oo) sqrt(pi)*x^(3/4)*sqrt(1/(pi*x^(3/2)))*cosh(x^(3/2))Interestingly, this works in vanilla Sage as well. Maybe there weren't any hg functions to begin with there. I assume it was fixed with #16224 - earlier it gave yet another (wrong) answer.
Even more interestingly, this is not as simple as just cosh(x^(3/2))
(which is correct) but I'm not going to repurpose this one for that.
comment:15 Changed 7 years ago by
- Milestone changed from sage-6.3 to sage-duplicate/invalid/wontfix
Practically a duplicate of #2516
comment:16 Changed 7 years ago by
- Resolution set to duplicate
- Status changed from positive_review to closed
one additional example by omologos on irc:
but i get this error: