Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Why D[x', x] isn't 0 ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg66117] Re: [mg66094] Why D[x', x] isn't 0 ?
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Sun, 30 Apr 2006 04:21:08 -0400 (EDT)
  • References: <200604290740.DAA23451@smc.vnet.net> <FB7EB262-5F35-4989-B9CE-897C729295F8@mimuw.edu.pl>
  • Sender: owner-wri-mathgroup at wolfram.com

On 29 Apr 2006, at 20:41, Andrzej Kozlowski wrote:

>
> On 29 Apr 2006, at 16:40, Vladimir wrote:
>
>> Hello!
>>
>> D[x'', x']  =>  0  (* okay *)
>>
>> D[x', x]  =>  x''  (* unexpected despite being similar to above *)
>>
>> D[f[x'], x]  =>  x'' f'[x']  (* unexpected as well *)
>>
>> Why the last 2 lines don't produce zeroes and how to make them
>> do so (for any function f) because it's quite common in mechanics
>> where velocity is treated as independent of position, etc.
>>
>> --
>> Vladimir
>>
>
> Consider the case D[x', x]. Mathematica does it as follows. The  
> FullForm of the expression is:
>
> D[Derivative[1][x], x]
>
> So Mathematica sees it as having the form  f[x], where f is the  
> function Derivative[1]. Next, Derivative[1] is differentiated as a  
> function to obtain Derivative[2]. Finally Derivative[2][x] is  
> returned and re-written as x''.
>
> Now  the case D[x'', x']
>
> The FullForm is D[Derivative[2][x], Derivative[1][x]]. Now the  
> expression that is being differentiated is not seen as an explicit  
> function of the expression   Derivative[1][x] with respect to which  
> the differentiation is being performed, so the answer 0 is returned.
>
> The other case should now be obvious.
>
> As for your other question: the easiest way is the most obvious one:
>
> In[1]:=
> x'=v;
>
> In[2]:=
> D[f[x'], x]
>
> Out[2]=
> 0
>
> In[3]:=
> D[x',x]
>
> Out[3]=
> 0
>
> There are other, more elaborate ways, but I can't imagine that they  
> would be preferable to the above.
>
> Andrzej Kozlowski
> Tokyo, Japan
>

On re-reading, I find my answer above unsatisfactory.
It more or less  correctly describes  what Mathematica does formally  
but incorrectly suggests that it is mathematically meaningful. In  
fact it is nonsense, though not through any fault of Mathematica.

The problem is of course with the phrase:

> Next, Derivative[1] is differentiated as a function to obtain  
> Derivative[2].

I did not of course mean to suggest that mathematica differentiates  
the derivative as a function, as one does, for example, in the  
Calculus of Variations. All that happens is that it applies the  
following formal rule:

In[4]:=
Derivative[n][Derivative[m]]

Out[4]=
Derivative[m+n]

Now, this makes perfect sense if one thinks of Derivative[n] as an  
operator and the above as a composition of operators, but this does  
not mean that the "mth derivative is differentiated" n -times in any  
mathematically meaningful sense. In fact all the  inputs and outputs  
in the original post are mathematically meaningless since they mix  
differentiation of functions and of expressions.
This makes sense:

In[5]:=
Derivative[1][Derivative[1][x]]

Out[5]=
Derivative[2][x]

This really does not:

In[6]:=
D[Derivative[1][x], x]

Out[6]=
Derivative[2][x]


The fault, however,  is not Mathematica's but simply incorrect input;  
the  result form confusing differentiation of expressions ( D 
[expr,x]) with differentiation of functions (x' = Derivative[1] 
[x] ).  So, basically this is just a case of "nonsense in -> nonsense  
out'.


Andrzej Kozlowski




  • Prev by Date: Re: Graphics--combining graphics
  • Next by Date: Re: Graphics--combining graphics
  • Previous by thread: Re: Why D[x', x] isn't 0 ?
  • Next by thread: Re: Why D[x', x] isn't 0 ?