Is it possible to write time derivatives with the dot notation?

6

2

In physics, we often write time derivatives with a dot ($\dot{a}$, $\ddot{a}$, for example).

Is it possible to force Mathematica to use this notation and then apply TeXForm so I can easily copy&paste my results in a TeX file?

If needed, I run Mathematica 10 on a Windows 8.1, 64 bits machine.

mattiav27

Posted 2016-10-13T12:53:52.013

Reputation: 5 181

Answers

10

I can't test robustness, because I don't know what your work flow is, but one can Format the expression:

Format[D[f_[t], {t, n_ /; n < 3}]] := OverDot[f, n]

Then,

expr1 = D[f[t], t]
expr2 = D[f[t], {t, 2}]

looks like:

enter image description here

Then, you can use TeXForm:

TeXForm[expr1 + expr2]
(* \ddot{f}+\dot{f} *)

march

Posted 2016-10-13T12:53:52.013

Reputation: 20 806