Constant

Constant
is an attribute that indicates zero derivative of a symbol with respect to all parameters.

DetailsDetails

  • Constant is used by Dt.
  • Functions are taken to have zero total derivative if f has attribute Constant.
  • Mathematical constants such as Pi have attribute Constant.

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

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]=
New in 1
New to Mathematica? Find your learning path »
Have a question? Ask support »