# Assigning symbolic operators to built-in functions

Can I do something like this:

$$\partial_t = D[f, t]$$

i.e. create a symbol instead of a function so that each time I call it, it executes the operation as defined?

-
Yes. Look up the Notations package in the docs. – Mike Honeychurch Feb 13 '14 at 22:37

With the notation package something like this is easy. I would never use this by myself, because IMO such sugar can easily introduce bugs and undesired behavior if one is not cautious. I will paste a screenshot so that you see how I used the Notation package, but first of all you have to load it:

<< Notation


then you can use

Testing it

or

-

When I read this question, it seems to be asking for set-delayed. For example, say we want to calculate D[f[t],t] over and over but want to give it a name like q. Then

q := D[f[t], t]


does this. If you don't have f defined then

q
Derivative[1][f][t]


If f is defined, say

f[t_] := t^2
q
2 t

-

Actually $\partial _t f[t]$ in Mathematica is interpreted as D[f[t],t] by default. You don't need to redefine it.

Considering $\partial _t = D[f,t]$ given by the OP is only an example of what the OP wants to do, I regard this question as a way to redefine the basic rules for the input of the expression. You can define the low-level input rules by using MakeExpression.

In this case, I try to define $\mathbb{D}_t f[t]$ as D[f[t],t] for better understanding.

MakeExpression[RowBox[{SubscriptBox["\[DoubleStruckCapitalD]", t_], f_}], StandardForm] :=
MakeExpression[RowBox[{"D", "[", f, ",", t, "]"}], StandardForm]


$\mathbb{D}_t$f[t]

f'[t]

You can use FullForm to check it:

$\mathbb{D}_t$f[t]//FullForm

Derivative[1][f][t]

For more details about Low-Level Input and Output Rules, pls read here.

-