MathGroup Archive 2006

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

Search the Archive

Re: RE: Subvalues and Parameters in Differentiation and Usage Messages

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67855] Re: [mg67787] RE: Subvalues and Parameters in Differentiation and Usage Messages
  • From: "Carl K. Woll" <carlw at wolfram.com>
  • Date: Mon, 10 Jul 2006 06:38:40 -0400 (EDT)
  • References: <200607071113.HAA27613@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

David Park wrote:
> Hi James,
[snip]
> I am still looking for an answer as to the results of the following
> statement.
> 
> D[foo[x][x], x]
> foo[x]'[x] + foo'[x][x]
> 
> What is the mathematical justification of the second term? I don't think
> that differentiation should act on the heads of expressions and am still
> looking for a reason why it should. I don't see how the above will ever be a
> useful answer and, in turn, it forecloses many useful constructions. But
> there may be something I am missing.
> 
> In many cases the subvalue x is only an identifier. For example, we might
> have a function, undefined at the moment, with x and y components,
> f[x][x,y] and f[y][x,y]. It seems to me that it makes sense to have
> differentiation work on the values in the last square brackets, but not to
> touch subvalues in the head. I might want to differentiate these, say as
> part of didactic exposition, and only later substitute the actual functions
> for
> f[x] and f[y].
> 
> So I'm not content with 'don't use subvalues' and am still looking for an
> explanation. Either the Mathematica result is useful in an important class
> of cases or the behavior should be changed.
> 
> David Park
> djmp at earthlink.net
> http://home.earthlink.net/~djmp/
> 

David,

There is a Developer context function (i.e. it is subject to change in 
the future) that should satisfy you:

Developer`SetSystemOptions["DifferentiationOptions" ->
      "DifferentiateHeads" -> False];

Now try your example:

In[4]:=
D[f[x][x],x]//OutputForm

Out[4]//OutputForm=
(f[x])'[x]

Your unwanted f'[x][x] term is no longer there. The function 
Developer`SystemOptions[] will tell you what all of these options are, 
but experimenting with them is not recommended.

Carl Woll
Wolfram Research

[snip]


  • Prev by Date: Re: RE: Subvalues and Parameters in Differentiation and Usage Messages
  • Next by Date: Re: failure to Integrate in orthogonal polynomials
  • Previous by thread: Re: RE: Subvalues and Parameters in Differentiation and Usage Messages
  • Next by thread: Re: Subvalues and Parameters in Differentiation and Usage Messages