MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Subvalues and Parameters in Differentiation and Usage Messages

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67762] Subvalues and Parameters in Differentiation and Usage Messages
  • From: "David Park" <djmp at earthlink.net>
  • Date: Thu, 6 Jul 2006 06:54:20 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I wonder if there is a good reason Mathematica's treatment of subvalues, especially in differentiation?

But first I have a complaint about how they are treated in usage messages. Here is a usage message for a function.

foo::usage = "foo[parm][x] is an example for MathGroup.";

If I type 'foo' and then use command completion (Shift-Ctrl-K) I obtain 
foo[parm] and not foo[parm][x], which I would much prefer. It seems to me that it would not be difficult to fix Mathematica to go through to the last of the square brackets.

Now if I differentiate a foo expression as follows I get

D[foo[p][x], x]
foo[p]'[x]

Now suppose I put x in the place of p. The subvalue might just be an identifier and not a true variable. Then I obtain

D[foo[x][x], x]
foo[x]'[x]+foo'[x][x]

I like the first term but I don't like the second term. Does this actually make mathematical sense? Is it the chain rule? Is it the Leibniz rule? Would there be anything incorrect in stipulating that differentiation would be applied ONLY to the arguments in the LAST set of argument brackets? Am I missing examples where the above output is meaningful and desired?

This would also save a lot of trouble with expressions such as

D[Subscript[f, x][x], x]
Derivative[1][Subscript[f, x]][x] + 
  Derivative[0, 1][Subscript][f, x][x]

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/ 


  • Prev by Date: RE: Beginner--Simplest question: How to control some values in Input dialog box
  • Next by Date: RE: Plot Question
  • Previous by thread: Re: Speed challenge: Improve on integer frequencies from Count?
  • Next by thread: Re: Subvalues and Parameters in Differentiation and Usage Messages