#15025: automatically injected function does not work with desolve
--------------------------+------------------------------------
    Reporter:  dkrenn     |            Owner:
        Type:  defect     |           Status:  new
    Priority:  major      |        Milestone:  sage-5.12
   Component:  symbolics  |         Keywords:  desolve function
   Merged in:             |          Authors:
   Reviewers:             |  Report Upstream:  N/A
 Work issues:             |           Branch:
Dependencies:             |         Stopgaps:
--------------------------+------------------------------------
 The following does not work:
 {{{
 sage: x = var('x')
 sage: f = function('y', x)
 sage: desolve(diff(y,x)-y == 0,y)
 Traceback (click to the left of this block for traceback)
 ...
 TypeError
 }}}
 altough {{{y}}} is automatically injected to the gobal namespace.

 This is because {{{y}}} is of the wrong type:
 {{{
 sage: f, type(f)
 (y(x), sage.symbolic.expression.Expression)
 sage: y, type(y)
 (y, sage.symbolic.function_factory.NewSymbolicFunction)
 }}}
 It works with {{{f}}}:
 {{{
 sage: desolve(diff(f,x)-f == 0,f)
 c*e^x
 }}}

 This is confusing, especially, since in the docstring of {{{function}}}
 under "Note" you can find

 >  The new function is both returned and automatically injected into the
 global namespace.

 Therefore, it is not absurd to assume that this automatically injected
 variable is the one I want to use, i.e. the one you would get by {{{y =
 function('y', x)}}} (similar to the {{{var}}}-command).

 (If this is behavior of {{{function}}} is (really) on purpose, then at
 least the error message of {{{desolve}}} should be more clearifying and
 give a hint.)

--
Ticket URL: <http://trac.sagemath.org/ticket/15025>
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/groups/opt_out.

Reply via email to