On Jun 10, 2009, at 3:23 PM, Mike Hansen wrote:

>
> On Wed, Jun 10, 2009 at 3:16 PM, Jason Grout<jason- 
> s...@creativetrax.com> wrote:
>> That's how I'd write it in class if I was illustrating the chain  
>> rule.
>>
>> I agree with Robert---functions have ordered, named parameters  
>> (thanks
>> to your patch that deprecated not specifying the order of  
>> variables!),
>> so we should be able to convert back and forth between D[i](f) and
>> \frac{df}{d<parameter>} or \frac{\partial f}{\partial<parameter>}
>> unambiguously.
>
> No, it's not that easy.  These really are two different things.
> Converting from the D[] notation to the diff() notation requires the
> introduction of a dummy variable and an evaluation.  Functions don't
> have ordered, named parameters associated to them. Consider the
> following:
>
> sage: x, y = var('x,y')
> sage: f = function('f')
> sage: f(x*y).diff(x)
> y*D[0](f)(x*y)
>
> Note that  "f = function('f', x)" is the same as "f = function('f') 
> (x)".

I misspoke. Raw functions are weird beasts, which don't even know how  
many parameters they take. E.g.

sage: f = function('f', x, 2, y); f
f(x, 2, y)
sage: f(10)
f(10, 2, y)

I'm not sure what to make of this, but I'd rather have them behave  
more like functions defined with the f(x) = ... notation.

> The correct solution is to make GiNaC know about both types of  
> expressions.

Yep.

- Robert


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to