This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Constant

Constant
is an attribute that indicates zero derivative of a symbol with respect to all parameters.
  • Functions are taken to have zero total derivative if f has attribute Constant.
  • Mathematical constants such as Pi have attribute Constant.
is a mathematical constant representing a number:
is not explicitly a number:
is numeric and evaluates to a number with N:
Define f to be a constant function for total derivatives computed with Dt:
is a mathematical constant representing a number:
In[1]:=
Click for copyable input
Out[1]=
is not explicitly a number:
In[2]:=
Click for copyable input
Out[2]=
is numeric and evaluates to a number with N:
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=
 
Define f to be a constant function for total derivatives computed with Dt:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
The built-in system mathematical constants:
They are all NumericQ:
They all represent exact values that can be evaluated to numbers of any precision with N:
Define f locally to be a constant function:
This does not affect subsequent computations with Dt:
Using the Constants option in Dt is similar, but has completely unambiguous output:
New in 1