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: [mg66116] Re: [mg66094] Why D[x', x] isn't 0 ?
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Sun, 30 Apr 2006 04:21:05 -0400 (EDT)
  • References: <200604290740.DAA23451@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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





  • Prev by Date: Re: 2D/3D plots scaled to unit of dimension
  • Next by Date: Re: 2D/3D plots scaled to unit of dimension
  • Previous by thread: Why D[x', x] isn't 0 ?
  • Next by thread: Re: Why D[x', x] isn't 0 ?