9

To denote differentiation with respect to time I wish to use overhead dots rather than primes, so that differential expressions will look somewhat like this:

$\quad \quad$ DSolve$[\ddot y[t] + \dot y[t]==0,\,\dot y[0]==0,\,y[0]==1,\,y,\,t]$

I would like to use this notation after the usual $y''[x]$ prime has been reserved to denote differentiation with respect to distance and because I also want to avoid using D, Dt.

Is it at all possible?

Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263
Narasimham
  • 3,160
  • 13
  • 26
  • Thanks. Somehow I am missing something. Can you please give the lines that I can copy/paste so it appears as above on the last line with dots above the letters? – Narasimham Jan 26 '15 at 15:04

1 Answers1

9

Maybe this?

OverDot[f_, n_Integer] := Derivative[n][f]

Mathematica graphics

It really only works for . and \[DoubleDot].

To keep the output from displaying as y'[x], etc., you could define

MakeBoxes[Derivative[n_Integer][f_], form_] /; 1 <= n <= 2 := 
 ToBoxes[HoldForm[OverDot[f, n]], form]
Michael E2
  • 235,386
  • 17
  • 334
  • 747