#16224: incorrect translation of Bessel from Maxima?
----------------------------+------------------------
Reporter: kcrisman | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.2
Component: calculus | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
----------------------------+------------------------
Comment (by nbruin):
It's a problem in the automatic translation learning for `max_to_sr`. If
we force it to learn about Bessel functions beforehand, there's no
problem:
{{{
sage: var('k')
k
sage: sum(bessel_I(2,x),k,1,10)
10*bessel_I(2, x)
sage: sum(x^(2*k)/factorial(2*k),k,0,oo)
sqrt(pi)*sqrt(x)*sqrt(1/(pi*x))*cosh(x)
sage: from sage.interfaces.maxima_lib import *
sage: sage_op_dict[operator.mul] #as it should be
<ECL: MTIMES>
}}}
On the other hand, in a fresh session:
{{{
sage: var('k')
k
sage: sum(x^(2*k)/factorial(2*k),k,0,oo)
-1/4*sqrt(2)*sqrt(pi)*x^(3/2)
sage: from sage.interfaces.maxima_lib import *
sage: sage_op_dict[operator.mul]
<ECL: %BESSEL_I>
}}}
The problem is that the `bessel_I(-1/2,x)` gets immediately rewritten to
another expression, so the default heuristics for `max_to_sr` fail. The
remedy: initialize the translation of `%BESSEL_I`. This consists simply of
adding the line
{{{
sage.functions.bessel.bessel_I: "%BESSEL_I",
}}}
to sage_op_dict in sage/interfaces/maxima_lib.py
--
Ticket URL: <http://trac.sagemath.org/ticket/16224#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.