# Derivatives of overscript variables

If we have an expression with terms of some variable and terms of the same variable with some overscript, the differentiation of this expression does not entirely function.

The problem is that Mathematica does not recognize $\stackrel{\text{batman}}{x}$ and $x$ as two intrinsically different variables. Anyone know of some fix to this?

• mathematica.stackexchange.com/a/18395/193 – Dr. belisarius Dec 30 '14 at 16:15
• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – Dr. belisarius Dec 30 '14 at 16:16
• Try the notation package and the Symbolize command. (but what you are trying to do is very confusing. Why not use normal symbols?) – Nasser Dec 30 '14 at 16:37
• Thanks for the tip on Notation package and Symbolize command, worked like a charm. – user23366 Jan 1 '15 at 3:02

A simple approach is to have a separate variable format as Overscript[x, batman]

Format[xbat] := Overscript[x, batman];

expr = xbat^2 + x^2


D[expr, xbat]


D[expr, x]


2 x