Sage: Ticket #9908: maxima sum returns hypergeometric function
https://trac.sagemath.org/ticket/9908
<p>
The parsing of Maxima's output is not good enough to handle this:
</p>
<pre class="wiki">var('n')
sum(((2*I)^n/(n^3+1)*(1/4)^n), n, 0, infinity)
</pre><p>
gives an exception
</p>
<pre class="wiki">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
</pre><p>
which is - i think - a f_43 hypergeometric function.
</p>
en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/9908
Trac 1.1.6schillySat, 18 Sep 2010 11:47:21 GMT
https://trac.sagemath.org/ticket/9908#comment:1
https://trac.sagemath.org/ticket/9908#comment:1
<p>
one additional example by omologos on irc:
</p>
<pre class="wiki">var('x n')
f=(-1)^n/((2*n+1)*factorial(2n+1))
sum(f,n,0,oo)
</pre><p>
but i get this error:
</p>
<pre class="wiki">TypeError: unable to make sense of Maxima expression 'f[1,2]([1/2],[3/2,3/2],-1/4)' in Sage
</pre>
TicketkcrismanThu, 17 Feb 2011 01:51:30 GMT
https://trac.sagemath.org/ticket/9908#comment:2
https://trac.sagemath.org/ticket/9908#comment:2
<p>
This should be
</p>
<pre class="wiki">var('x n')
f=(-1)^n/((2*n+1)*factorial(2*n+1))
sum(f,n,0,oo)
</pre><p>
If I'm not mistaken, this might be related to <a class="closed ticket" href="https://trac.sagemath.org/ticket/2516" title="enhancement: generalized hypergeometric functions should be implemented (closed: fixed)">#2516</a>, in the sense that we should be parsing hypergeometric functions correctly and that would be part of that ticket.
</p>
TicketeviatarbachWed, 12 Jun 2013 20:06:41 GMTcc set
https://trac.sagemath.org/ticket/9908#comment:3
https://trac.sagemath.org/ticket/9908#comment:3
<ul>
<li><strong>cc</strong>
<em>eviatarbach</em> added
</li>
</ul>
TicketeviatarbachMon, 17 Jun 2013 21:01:42 GMT
https://trac.sagemath.org/ticket/9908#comment:4
https://trac.sagemath.org/ticket/9908#comment:4
<p>
This also causes a similar problem in <a class="closed ticket" href="https://trac.sagemath.org/ticket/4102" title="enhancement: make bessel_J symbolic (closed: fixed)">#4102</a>:
</p>
<pre class="wiki">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
</pre><p>
In that case, Maxima is returning <code>hypergeometric([3/2],[5/2,3],-x^2/4)</code>.
</p>
TicketjdemeyerTue, 13 Aug 2013 15:35:53 GMTmilestone changed
https://trac.sagemath.org/ticket/9908#comment:5
https://trac.sagemath.org/ticket/9908#comment:5
<ul>
<li><strong>milestone</strong>
changed from <em>sage-5.11</em> to <em>sage-5.12</em>
</li>
</ul>
TicketkcrismanThu, 17 Oct 2013 01:01:33 GMT
https://trac.sagemath.org/ticket/9908#comment:6
https://trac.sagemath.org/ticket/9908#comment:6
<p>
See also <a class="ext-link" href="http://ask.sagemath.org/question/3091"><span class="icon"></span>http://ask.sagemath.org/question/3091</a> for another example.
</p>
Ticketvbraun_spamThu, 30 Jan 2014 21:20:52 GMTmilestone changed
https://trac.sagemath.org/ticket/9908#comment:7
https://trac.sagemath.org/ticket/9908#comment:7
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.1</em> to <em>sage-6.2</em>
</li>
</ul>
TicketchapotonThu, 06 Mar 2014 17:07:35 GMTkeywords set
https://trac.sagemath.org/ticket/9908#comment:8
https://trac.sagemath.org/ticket/9908#comment:8
<ul>
<li><strong>keywords</strong>
<em>hypergeometric</em> added
</li>
</ul>
TicketkcrismanThu, 24 Apr 2014 01:15:49 GMT
https://trac.sagemath.org/ticket/9908#comment:9
https://trac.sagemath.org/ticket/9908#comment:9
<p>
And see <a class="ext-link" href="https://groups.google.com/forum/#!topic/sage-support/IgC78rcdO7c"><span class="icon"></span>this sage-support thread</a> for possibly another example.
</p>
Ticketvbraun_spamTue, 06 May 2014 15:20:58 GMTmilestone changed
https://trac.sagemath.org/ticket/9908#comment:10
https://trac.sagemath.org/ticket/9908#comment:10
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.2</em> to <em>sage-6.3</em>
</li>
</ul>
TicketkcrismanTue, 08 Jul 2014 15:21:11 GMT
https://trac.sagemath.org/ticket/9908#comment:11
https://trac.sagemath.org/ticket/9908#comment:11
<p>
<a class="closed ticket" href="https://trac.sagemath.org/ticket/2516" title="enhancement: generalized hypergeometric functions should be implemented (closed: fixed)">#2516</a> has all the examples above in it, with the exception of the ones mentioned in the comments.
</p>
<ul><li>One would want to be able to do
<pre class="wiki">b=var('b')
integral(1/(x^b+1),x)
</pre>without using W|A; apparently <code>1/(a^b+1)</code> would yield <code>2F1(1,1/a,1+1/a,-a^x)</code>.
</li><li>Apparently
<pre class="wiki">sum(x^(3*k)/factorial(2*k),k,0,oo)
</pre>would also be doable with hypergeometrics.
</li></ul>
TicketrwsTue, 08 Jul 2014 15:54:48 GMT
https://trac.sagemath.org/ticket/9908#comment:12
https://trac.sagemath.org/ticket/9908#comment:12
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/9908#comment:11" title="Comment 11">kcrisman</a>:
</p>
<blockquote class="citation">
<p>
<a class="closed ticket" href="https://trac.sagemath.org/ticket/2516" title="enhancement: generalized hypergeometric functions should be implemented (closed: fixed)">#2516</a> has all the examples above in it, with the exception of the ones mentioned in the comments.
</p>
</blockquote>
<p>
What I get with <a class="closed ticket" href="https://trac.sagemath.org/ticket/2516" title="enhancement: generalized hypergeometric functions should be implemented (closed: fixed)">#2516</a> is
</p>
<pre class="wiki">sage: integral(1/(x^b+1),x)
integrate(1/(x^b + 1), x)
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))
</pre>
TicketkcrismanTue, 08 Jul 2014 16:09:48 GMTstatus changed; reviewer set
https://trac.sagemath.org/ticket/9908#comment:13
https://trac.sagemath.org/ticket/9908#comment:13
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>needs_review</em>
</li>
<li><strong>reviewer</strong>
set to <em>Karl-Dieter Crisman, Ralf Stephan</em>
</li>
</ul>
<blockquote class="citation">
<p>
What I get with <a class="closed ticket" href="https://trac.sagemath.org/ticket/2516" title="enhancement: generalized hypergeometric functions should be implemented (closed: fixed)">#2516</a> is
</p>
<pre class="wiki">sage: integral(1/(x^b+1),x)
integrate(1/(x^b + 1), x)
</pre></blockquote>
<p>
Not really worth keeping open, as even Maxima does this.
</p>
<blockquote class="citation">
<pre class="wiki">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))
</pre></blockquote>
<p>
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 <a class="closed ticket" href="https://trac.sagemath.org/ticket/16224" title="defect: incorrect translation of Bessel from Maxima? (closed: fixed)">#16224</a> - earlier it gave yet another (wrong) answer.
</p>
<p>
So I nominate to close this ticket.
</p>
TicketkcrismanTue, 08 Jul 2014 16:13:37 GMTstatus changed
https://trac.sagemath.org/ticket/9908#comment:14
https://trac.sagemath.org/ticket/9908#comment:14
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>positive_review</em>
</li>
</ul>
<blockquote class="citation">
<blockquote class="citation">
<pre class="wiki">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))
</pre></blockquote>
<p>
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 <a class="closed ticket" href="https://trac.sagemath.org/ticket/16224" title="defect: incorrect translation of Bessel from Maxima? (closed: fixed)">#16224</a> - earlier it gave yet another (wrong) answer.
</p>
</blockquote>
<p>
Even more interestingly, this is not as simple as just <code>cosh(x^(3/2))</code> (which is correct) but I'm not going to repurpose this one for that.
</p>
TicketrwsTue, 08 Jul 2014 16:15:42 GMTmilestone changed
https://trac.sagemath.org/ticket/9908#comment:15
https://trac.sagemath.org/ticket/9908#comment:15
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.3</em> to <em>sage-duplicate/invalid/wontfix</em>
</li>
</ul>
<p>
Practically a duplicate of <a class="closed ticket" href="https://trac.sagemath.org/ticket/2516" title="enhancement: generalized hypergeometric functions should be implemented (closed: fixed)">#2516</a>
</p>
TicketvbraunTue, 08 Jul 2014 22:53:22 GMTstatus changed; resolution set
https://trac.sagemath.org/ticket/9908#comment:16
https://trac.sagemath.org/ticket/9908#comment:16
<ul>
<li><strong>status</strong>
changed from <em>positive_review</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>duplicate</em>
</li>
</ul>
Ticket