17
$\begingroup$

I would like to express a second derivative with two dots above the variable. You can do this with a first derivative by saying:

f[x_] := OverDot[x];
Print[HoldForm[f[x]], " == ", f[x]]

Is there a possible syntax to do this with the second derivative?

$\endgroup$

2 Answers 2

15
$\begingroup$
g[x_] := Overscript[x, ".."]
Print[HoldForm[g[x]], " == ", g[x]]

You could use AdjustmentBox to tweak the two dots, but maybe this is not necessary.

$\endgroup$
1
  • $\begingroup$ Awesome, this works just how I want it to. -- Thanks $\endgroup$
    – Napthali
    Commented Jan 28, 2012 at 21:27
9
$\begingroup$

You may also find utility in this:

Format[f''[x_]] := Overscript[x, ".."]

f''[j]

See the documentation for Format for more information.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.