#4102: make bessel_J symbolic
----------------------------------+-----------------------------------------
       Reporter:  jwmerrill       |         Owner:  burcin             
           Type:  enhancement     |        Status:  needs_review       
       Priority:  major           |     Milestone:  sage-5.9           
      Component:  calculus        |    Resolution:                     
       Keywords:                  |   Work issues:                     
Report Upstream:  N/A             |     Reviewers:  Karl-Dieter Crisman
        Authors:  Benjamin Jones  |     Merged in:                     
   Dependencies:                  |      Stopgaps:                     
----------------------------------+-----------------------------------------

Comment (by benjaminfjones):

 There is something strange going on. Here is sage-5.9.beta2 with the three
 patches applied:

 {{{
 [bjones@cabbage:devel/sage]% ../../sage
 ----------------------------------------------------------------------
 | Sage Version 5.9.beta2, Release Date: 2013-03-28                   |
 | Type "notebook()" for the browser-based notebook interface.        |
 | Type "help()" for help.                                            |
 ----------------------------------------------------------------------
 **********************************************************************
 *                                                                    *
 * Warning: this is a prerelease version, and it may be unstable.     *
 *                                                                    *
 **********************************************************************
 sage:  y = function('y', x)
 sage: diffeq = x^2*diff(y,x,x) + x*diff(y,x) + x^2*y == 0
 sage: f = desolve(diffeq, y, [1, 1, 1]); f
 (bessel_Y(0, 1) + bessel_Y(1, 1))*bessel_J(0, x)/(bessel_J(0,
 1)*bessel_Y(1, 1) - bessel_J(1, 1)*bessel_Y(0, 1)) - (bessel_J(0, 1) +
 bessel_J(1, 1))*bessel_Y(0, x)/(bessel_J(0, 1)*bessel_Y(1, 1) -
 bessel_J(1, 1)*bessel_Y(0, 1))
 }}}

 which is exactly what the doctest expects.

 Now doctesting `sage/functions/bessel.py` with sage in the exact same
 state:

 {{{
 [bjones@cabbage:devel/sage]% ../../sage -t sage/functions/bessel.py
 Running doctests with ID 2013-04-01-21-31-17-4bc246be.
 Doctesting 1 file.
 sage -t sage/functions/bessel.py
 **********************************************************************
 File "sage/functions/bessel.py", line 977, in sage.functions.bessel.Bessel
 Failed example:
     f = desolve(diffeq, y, [1, 1, 1]); f
 Expected:
     (bessel_J(0, 1) + bessel_J(1, 1))*bessel_Y(0, x)/(bessel_Y(0,
 1)*bessel_J(1, 1) - bessel_Y(1, 1)*bessel_J(0, 1)) - (bessel_Y(0, 1) +
 bessel_Y(1, 1))*bessel_J(0, x)/(bessel_Y(0, 1)*bessel_J(1, 1) -
 bessel_Y(1, 1)*bessel_J(0, 1))
 Got:
     (bessel_Y(0, 1) + bessel_Y(1, 1))*bessel_j(0, x)/(bessel_j(0,
 1)*bessel_Y(1, 1) - bessel_j(1, 1)*bessel_Y(0, 1)) - (bessel_j(0, 1) +
 bessel_j(1, 1))*bessel_Y(0, x)/(bessel_j(0, 1)*bessel_Y(1, 1) -
 bessel_j(1, 1)*bessel_Y(0, 1))
 }}}

 The lower cased `bessel_j` is what Maxima returns if you don't register a
 conversion to `bessel_J`, the Sage symbolic version of J that these
 patches introduce.

 What is also strange is that the above output does actually represent a
 different form of the correct solution (modulo replacing bessel_j by
 bessel_J).

 So what is going on here?

 FWIW, sage-5.8 with same three patches applied does not exhibit this
 behavior.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4102#comment:41>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to