Derivatives don't evaluate automatically after subs. You have to call doit().
However, for your example, you are also replacing the derivatives. You
will need to replace the derivatives first. Otherwise you will get 0
because it will have Derivative(1, t) == 0. You can do the
substitution in a single call with
L.subs([(q1d, 3), (q2d, 7), (q1, 2), (q2, 1)])
Or if you are using Python 3.6 or newer:
L.subs({q1d: 3, q2d: 7, q1: 2, q2: 1})
Prior to Python 3.6 dicts are not ordered, so that won't always work
in older versions. But I do recommend using Python 3 for SymPy
regardless as we will be dropping Python 2 support later this year.
Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
sympy+un...@googlegroups.com.
> To post to this group, send email to
sy...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/sympy.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/935d0daa-9dc6-4174-990d-d0d7172612ae%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.