On Dec 6, 2006, at 11:21 AM, William Stein wrote:

> On Wed, 06 Dec 2006 11:09:04 -0800, <[EMAIL PROTECTED]> wrote:
>
>>
>> Yeah, that was my thought, too.  If we make an object, similar to a
>> ring, representative of a function space, then if you call a  
>> function on
>> an indeterminant member of this space, you get back a function; a  
>> member
>> of the space.
>>
>> Example:
>>
>> sage: F.<x> = FunctionSpace(domain = RR, range = RR)
>> sage: f = sin(x)
>> sage: g = cos(x)
>> sage: f+g
>> sin(x) + cos(x)
>> sage: f(g)
>> sin(cos(x))
>> sage: (f+g)(0)
>> 1
>> sage: (f(g)).diff(x)
>> cos(cos(x))*(-sin(x))
>
> Again, at this point I just don't see a compelling reason to so
> dramatically depart from what Maple/Mathematica/Maxima, etc. do.
> They all have a notion of substition of a variable for evaluating
> symbolic functions, and separately a notion like "def" or "lambda".
> Mixing these up seems to me to be ignoring the lessons learned
> by decades of research and testing of actual users of this sort
> of software.
>
>   -- William

I have to agree that although I like the concreteness of the  
FunctionSpace construction, this would go way over the heads of most  
of my calculus students. I am willing to assume that the way  
Mathematica/Maple does things is the result of a lot of thought and  
research. I would still advocate using the __call__ method for  
substitution (not necessarily to the exclusion of an explicit "subs"  
function) and, at least for single-variable expressions, letting the  
(single) indeterminate be implicit.

- Robert


--~--~---------~--~----~------------~-------~--~----~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to