Cannot differentiate wrt a complicated variable in Sympy
问题 (I understand the title makes this sound like a duplicate question to Sympy Can't differentiate wrt the variable, but I'm fairly certain it is quite different. I apologize in advance if I am mistaken) I'm trying to solve the Double Pendulum using Hamiltonian Mechanics, but Sympy is having trouble taking one of the derivatives. The code is below, but it's much easier to read the iPython Notebook over at nbviewer.ipython.org from __future__ import division from sympy import * init_session() r_1