MathGroup Archive 2006

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

Search the Archive

Re: Derivative[1] applied to numeric constants


"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~




  • Prev by Date: Re: Graphics with MGL3D
  • Next by Date: Re: Graphics with MGL3D
  • Previous by thread: Re: Derivative[1] applied to numeric constants
  • Next by thread: Problem with a limit.