1 | initial version |
If rdot
is a symbolic variable and r
a symbolic function, eq.subs({rdot: diff(r(t), t)})
should work.
For example:
sage: rdot, t = var('rdot t')
sage: eq = rdot^2 - 3*rdot
sage: r = function('r')
sage: eq.subs({rdot: diff(r(t), t)})
diff(r(t), t)^2 - 3*diff(r(t), t)