MathGroup Archive 2008

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

Search the Archive

Re: bug? f'[x]'

  • To: mathgroup at
  • Subject: [mg90900] Re: bug? f'[x]'
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at>
  • Date: Tue, 29 Jul 2008 01:37:04 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <g6kc46$k6f$>

Benjamin.R.Lewis at wrote:

> In[]:= f'[x] =!= f[x]' && f''[x] === f'[x]'
> Out[]= True
> Can anyone explain this?

First, keep in mind that Mathematica does *pattern* matching.

Second, SameQ requires exact correspondence between expressions when 
those expressions are expressed in *FullForm* (FullForm being the 
internal representation used by Mathematica regardless of the type of 

In your case, the fullform of f'[x] is Derivative[1][f][x] whereas the 
fullform of f[x]' is Derivative[1][f[x]], both expressions are 
*syntactically* not the same.

OTOH, the fullform of f''[x] is Derivative[2][f][x] whereas the fullform 
of f'[x]' is Derivative[2][f][x], both expressions are *syntactically* 
the same. (Note that the fullform of f[x]'' is Derivative[2][f[x]].)

In[1]:= f'[x] =!= f[x]' && f''[x] === f'[x]'

Out[1]= True

In[2]:= f'[x] =!= f[x]'

Out[2]= True

In[3]:= f''[x] === f'[x]'

Out[3]= True

In[4]:= f'[x] // FullForm

Out[4]//FullForm= Derivative[1][f][x]

In[5]:= f[x]' // FullForm

Out[5]//FullForm= Derivative[1][f[x]]

In[6]:= f''[x] // FullForm

Out[6]//FullForm= Derivative[2][f][x]

In[7]:= f'[x]' // FullForm

Out[7]//FullForm= Derivative[2][f][x]

-- Jean-Marc

  • Prev by Date: Re: Re: How to call or run a NB file in another NB file?
  • Next by Date: Re: bug? f'[x]'
  • Previous by thread: Re: Re: bug? f'[x]'
  • Next by thread: Warning for use of 3D Graphics manipulation with notebook computers