Re: Derivative[1] applied to numeric constants
- To: mathgroup at smc.vnet.net
- Subject: [mg66776] Re: Derivative[1] applied to numeric constants
- From: "Scout" <Scout at nodomain.com>
- Date: Tue, 30 May 2006 05:48:13 -0400 (EDT)
- References: <e5ei2k$7u2$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"Andrew Moylan" <andrew.moylan at anu.edu.au> news:e5ei2k$7u2$1 at smc.vnet.net... > Hi, > > Do numeric constants have special behaviour under the Derivative[1] > function? > > The number e.g. 2 is not defined as the function that always returns 2: > > In[1]:=2[x] > Out[1]=2[x] > > But Derivative[1][2] is defined: > > In[2]:=2' > Out[2]=0& > > Could anyone explain why this is? Is this behaviour documented in the > help system? > > Cheers, > > Andrew > It can't be assign a number to a function name. If you want to make a constant function (e.g. f(x)=2 ), try with: In[1]:= f[x_]:=2; or with a <<pure function>>: Function[x,2] either using the shorthand notation: #1 &[2] . Cheers, ~Scout~