Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This one must be simple, but I can't figure out a decent solution.

Suppose, I have a symbol with a notational form applied to it, say OverHat[A]. Now, if I didn't specify anything about A, I would expect Dt[OverHat[A]] staying unevaluated.

But in reality OverHat gets evaluated: Dt[OverHat[A]] (* ---> Dt[A] Derivative[1][OverHat][A] *)

What are possible ways to prevent this from happening?


To state more clearly, I want OverHat[A] to behave like ordinary symbol under action of Dt:

Dt[symb] (* ---> Dt[symb] *)

share|improve this question
...but you are differentiating with respect to what? Anyway, have a look at the Constants option of Dt[]. –  J. M. May 17 '13 at 10:16
@J. M., Dt[OverHat[A]] is a total differential of OverHat[A] in my case. Setting A (or even OverHat) to a constant doesn't work, it just gives zero. –  SaF May 17 '13 at 10:26
@SaF You mean HoldForm@Dt[OverHat[A]] ? (BTW, setting A to a constant of course cause 0, since Dt[A]=0 in this case.) –  luyuwuli May 17 '13 at 10:39
@luyuwuli, HoldForm is a possible workaround, but this way the head of my expression will be HoldForm, which is unwanted. I want OverHat[A] to be treated like an ordinary unspecified symbol by Dt, e.g. Dt[OverHat[A]]=Dt[OverHat[A]] –  SaF May 17 '13 at 10:44
How about using a new symbol like overA in place of OverHat[A]? The problem is that OverHat is a typesetting function (like MatrixForm or Subscript) and you're trying to make it do something it isn't intended to do. –  bill s May 17 '13 at 11:11

1 Answer 1

up vote 4 down vote accepted

The official way of solving such notational problems is to use the following package:


OverscriptBox["A", "^"]]]

Now you can enter the notation in the usual way to get this:

screen shot

You have to do this for every hat-symbol individually, though.

share|improve this answer
Thanks, I'll check it out. –  SaF May 17 '13 at 22:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.