#12801: substitute_function misses some substitutions
-----------------------------+----------------------------------------------
       Reporter:  nbruin     |         Owner:  burcin          
           Type:  defect     |        Status:  positive_review 
       Priority:  minor      |     Milestone:  sage-5.0        
      Component:  symbolics  |    Resolution:                  
       Keywords:             |   Work issues:                  
Report Upstream:  N/A        |     Reviewers:  Michael Orlitzky
        Authors:             |     Merged in:                  
   Dependencies:  #12796     |      Stopgaps:                  
-----------------------------+----------------------------------------------
Changes (by nbruin):

  * status:  needs_review => positive_review


Old description:

> Works correctly:
> {{{
> sage: f=function('f')
> sage: g=function('g')
> sage: (f(g(x))+g(x)).substitute_function(g,sin)
> sin(x) + f(sin(x))
> }}}
> but
> {{{
> sage: f(g(x)).diff(x).substitute_function(g,sin)
> cos(x)*D[0](f)(g(x))
> sage:
> sage.symbolic.operators.FDerivativeOperator(f,[0])(g(x)).substitute_function(g,sin)
> D[0](f)(g(x))
> }}}
> so I suspect it forgets to descend into the arguments of an
> FDerivativeOperator

New description:

 Works correctly:
 {{{
 sage: f=function('f')
 sage: g=function('g')
 sage: (f(g(x))+g(x)).substitute_function(g,sin)
 sin(x) + f(sin(x))
 }}}
 but
 {{{
 sage: f(g(x)).diff(x).substitute_function(g,sin)
 cos(x)*D[0](f)(g(x))
 sage:
 
sage.symbolic.operators.FDerivativeOperator(f,[0])(g(x)).substitute_function(g,sin)
 D[0](f)(g(x))
 }}}
 so I suspect it forgets to descend into the arguments of an
 FDerivativeOperator

 
-------------------------------------------------------------------------------------------

 Apply [attachment:12801.patch], [attachment:sage-trac_12801-review.patch].

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12801#comment:8>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to