notation of physics



On 8/4/11, syn hedionn <synhedionn at gmail.com> wrote:

> Is there a way to follow notation of physics in order that writing
> diff(omega(t),t) doesn't output this but the omega letter with a dot at the
> top of the letter(speed), 2dots for a double derivation=acceleration?

Well, here's a half-baked idea.

tex_diff(e):=block([y,x,n,s],[y,x,n]:args(e),s:"",for i thru n do
s:sconcat(s,"d"),
         sconcat("{\\",s,"ot{",tex1(y),"}}"))$

texput (nounify (derivative), tex_diff);

depends (omega, t);
eqn : diff (omega, t) + diff (omega, t, 2) = 0;
tex (eqn);
 => $${\ddot{\omega}}+{\dot{\omega}}=0$$

HTH

Robert Dodier