MathGroup Archive 2008

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

Search the Archive

Re: Re: bug? f'[x]'

Well, if I had to speculate about this, it would probably go like  
this. A long, long time ago, in the very early days of Mathematica,  
someone was writing code for Derivative and at some point decided to  
sacrifice a little of mathematical sense for a bit of notational  
convenience (for himself). He realized that it was quite likely that  
users would use expressions like f[1], f[2] etc, to denote functions,  
hence it would be a very bad idea to convert f[1]' to f'[1], etc.  
However, he thought it very unlikely that f'[1],f''[1], etc... would  
ever be used for anything but the values of the first, second etc.  
derivatives of f art 1. Hence, he though, it would do no harm, and  
could be quite convenient if Mathematica automatically interpreted  
f'[1]' as f''[1], etc. So he implemented this but being worried  that  
math professors and other "pedants" would rise hell over this  
violation of mathematical sense he decided not to tell anyone about it  
(i.e. did not document it).
That is of course what I would do if I had to speculate about this,  
but since I don't have to I won't.

Andrzej Kozlowski

On 30 Jul 2008, at 09:52, Ben wrote:

> Mathematica does distinguish between f'[x] (evaluating the derivative)
> and f[x]' (derivative of the evaluation), so it seems unreasonable
> that this behaviour should change when f is written in terms of its
> antiderivative (i.e., f->g').
> In other words, what is the justification for Derivative[i]
> [ (Derivative[j][g][x]) ][y] ever evaluating to Derivative[i+j][g][x]
> [y]?
> Even this behaviour is not consistent. Mathematica reverts to
> mathematically correct behaviour again if g was explicitly specified.
> For example, consider the function that takes an argument and returns
> the operator for multiplication by the cube of that argument
> (g=Function[x,Function[y,y*x^3]]). The derivative of its evaluation is
> obviously (an operator that returns) a constant (namely the cube of
> that argument, or zero for higher derivatives). By contrast, the
> evaluation of the derivative is not a constant (it is the partial with
> respect to the argument, an operator for multiplication by thrice the
> squared argument; zero is not produced until the fourth derivative).
> So, {g''[x][y],g'[x]'[y],g[x]''[y]}==={6xy,3x^2,0}.
> Even Derivative[j]//Derivative[i] evaluates further, nonsensically
> (garbage input ought only echo), as though a rule constraint had been
> overlooked. I wondered if there could be scoping error, as internal
> conversions involving #& are documented for Derivative. Also, this is
> not the only case of odd behaviour involving the distinction between
> numbers and operators:
> Ben
> On Jul 29, 3:48 pm, Andrzej Kozlowski <a... at> wrote:
>> Since, however, it is not documented
>> (and illogical) it is certianly cannot be regarded as any kind of  
>> "bug".

  • Prev by Date: NMaximize Questions
  • Next by Date: Re: Re: Problem with BinCounts
  • Previous by thread: Re: bug? f'[x]'
  • Next by thread: Re: Re: bug? f'[x]'