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

Old description:

> The motivation for this is
>
> {{{
> sage: plot(bessel_J(1, x), (x, 1, 10))
> Traceback (most recent call last):
> ...
> TypeError: Unable to convert x
> (='1-1/8*x^2+1/192*x^4-1/9216*x^6+1/737280*x^8-1/88473600*x^10+1/14863564800*x^12-1/3329438515200*x^14+1/958878292377600*x^16+O(x^17)')
> to real number.
> }}}
>
> The problem is that special functions, or at least {{{bessel_J}}}, can't
> currently be partially evaluated--that is, called with a
> {{{SymbolicExpression}}} as an argument.  The model of good behavior is
> {{{polylog}}}, for which the above method produces a perfectly nice plot
>
> {{{
> sage: plot(polylog(1,x),(x,.1,.9)) #makes a fine plot
> }}}
>
> See discussion at http://groups.google.com/group/sage-
> support/browse_thread/thread/1b985b080ba2369e/7dee9eed953857f5#7dee9eed953857f5

New description:

 The motivation for this is

 {{{
 sage: plot(bessel_J(1, x), (x, 1, 10))
 Traceback (most recent call last):
 ...
 TypeError: Unable to convert x
 
(='1-1/8*x^2+1/192*x^4-1/9216*x^6+1/737280*x^8-1/88473600*x^10+1/14863564800*x^12-1/3329438515200*x^14+1/958878292377600*x^16+O(x^17)')
 to real number.
 }}}

 The problem is that special functions, or at least {{{bessel_J}}}, can't
 currently be partially evaluated--that is, called with a
 {{{SymbolicExpression}}} as an argument.  The model of good behavior is
 {{{polylog}}}, for which the above method produces a perfectly nice plot

 {{{
 sage: plot(polylog(1,x),(x,.1,.9)) #makes a fine plot
 }}}

 See discussion at http://groups.google.com/group/sage-
 support/browse_thread/thread/1b985b080ba2369e/7dee9eed953857f5#7dee9eed953857f5

 ----

 Release manager:

 Apply: attachment:trac_symbolic_bessel_v6.patch,
 attachment:trac_symbolic_bessel_doctests.patch,
 attachment:trac_symbolic_bessel_deprecation.patch

--

Comment (by benjaminfjones):

 I still have not been able to track down the doctesting issue (described
 starting at comment:41). I've tried bisecting the doctest state (delta
 debugging) to no avail. The problem seems to be intimately linked to the
 doctesting environment. I'm unable to reproduce the doctest failure when
 running __all__ the prior doctests which come before in `bessel.py`, in
 the right order, by hand, and then running the offending one.

 The only thing I can tell for sure is that at some point as the doctests
 are run, one of the pynac symbol tables get's modified. This causes the
 `bessel_j` vs `bessel_J` problem.

 My inclination is to remove the offending doctest and file a new ticket to
 resolve the problem. Meanwhile, the bessel function code can be reviewed
 and become useful. I've posted a patch `trac_symbolic_bessel_v6` which
 removes the offending doctest block.

 Comments?

 ----

 Patchbot, apply trac_symbolic_bessel_v6.patch
 trac_symbolic_bessel_doctests.patch trac_symbolic_bessel_deprecation.patch

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4102#comment:48>
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