#12455: Make Airy functions symbolic
-------------------------------------+-------------------------------------
       Reporter:  olazo              |        Owner:  rws
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.6
      Component:  symbolics          |   Resolution:
       Keywords:  Airy functions     |    Merged in:
  sd40.5 sd48                        |    Reviewers:  Eviatar Bach, Karl-
        Authors:  Oscar Gerardo      |  Dieter Crisman, Burcin Erocal, Ralf
  Lazo Arjona, Benjamin Jones, D.    |  Stephan, Jeroen Demeyer, Marc
  S. McNeil, Eviatar Bach, Ralf      |  Mezzarobba
  Stephan                            |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  2f6945af73219458fb0a2745e2df9e2eea79b055
  public/ticket/12455                |     Stopgaps:
   Dependencies:  #12289, #17130     |
-------------------------------------+-------------------------------------
Changes (by mmezzarobba):

 * reviewer:  Eviatar Bach, Karl-Dieter Crisman, Burcin Erocal, Ralf Stephan
     =>
     Eviatar Bach, Karl-Dieter Crisman, Burcin Erocal, Ralf Stephan, Jeroen
     Demeyer, Marc Mezzarobba


Old description:

> As discussed in [http://groups.google.com/group/sage-
> support/browse_thread/thread/f458d0f9cfd89c9a sage-support].
>
> Currently sage can evaluate airy functions numerically:
> {{{
> sage: airy_ai(1.4)
> 0.0820380498076
> }}}
>
> but it doesn't work symbolically
>
> {{{
> sage: airy_ai(x)
> ---------------------------------------------------------------------------
> TypeError                                 Traceback (most recent call
> last)
>
> /home/oscar/Escritorio/tesis/calculos/<ipython console> in <module>()
>
> /home/oscar/sage/sage-4.7.1/local/lib/python2.6/site-
> packages/sage/functions/special.pyc in airy_ai(x)
>     621    """
>     622    _init()
> --> 623    return RDF(meval("airy_ai(%s)"%RDF(x)))
>     624
>     625 def airy_bi(x):
>
> /home/oscar/sage/sage-4.7.1/local/lib/python2.6/site-
> packages/sage/structure/parent.so in
> sage.structure.parent.Parent.__call__ (sage/structure/parent.c:7102)()
>
> /home/oscar/sage/sage-4.7.1/local/lib/python2.6/site-
> packages/sage/structure/coerce_maps.so in
> sage.structure.coerce_maps.NamedConvertMap._call_
> (sage/structure/coerce_maps.c:4221)()
>
> /home/oscar/sage/sage-4.7.1/local/lib/python2.6/site-
> packages/sage/symbolic/expression.so in
> sage.symbolic.expression.Expression._real_double_
> (sage/symbolic/expression.cpp:5391)()
>
> /home/oscar/sage/sage-4.7.1/local/lib/python2.6/site-
> packages/sage/symbolic/expression.so in
> sage.symbolic.expression.Expression._eval_self
> (sage/symbolic/expression.cpp:4898)()
>
> TypeError: Cannot evaluate symbolic expression to a numeric value.
> }}}
>
> We should make it symbolical for both airy_ai and airy_bi, as well as
> their derivatives.

New description:

 As discussed in [http://groups.google.com/group/sage-
 support/browse_thread/thread/f458d0f9cfd89c9a sage-support].

 Currently sage can evaluate airy functions numerically:
 {{{
 sage: airy_ai(1.4)
 0.0820380498076
 }}}

 but it doesn't work symbolically

 {{{
 sage: airy_ai(x)
 ...
 TypeError: Cannot evaluate symbolic expression to a numeric value.
 }}}

 We should make it symbolical for both airy_ai and airy_bi, as well as
 their derivatives.

--

Comment:

 Replying to [comment:84 rws]:
 > > * Raising a `ValueError` in `FunctionAiryAiGeneral._derivative_` when
 `diff_param == 0` may not be the most appropriate, since (if I'm not
 mistaken) the partial derivative would make sense mathematically.
 > A quick look at old and new code shows 1. `ValueError`, 2.
 `NotImplementedError`, 3. `assert`. So, this needs to be unified to
 `NotImplementedError`.
 > > One last thing: IMO `hold_derivative` should be `True` by default in
 `airy_ai` and `airy_bi`, except perhaps when the differentiation order is
 one. But I don't know if that's consistent with the way things are done in
 other parts of sage symbolics. Thoughts?
 > I believe the code of this ticket is the only one that has such a
 parameter, so please feel free to improve it.

 Both done (now rather than later to avoid breaking the interface).

 > I have looked at your patch and it's fine, so if you think the rest is
 OK please set positive.

 I'm okay with everything prior to my commits. Could you (or someone else)
 have a quick look at my last changes and set the ticket to positive
 review? Thanks!

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

Reply via email to