differentiating an ode w.r.t one of the derivatives

71 Views Asked by At

I am trying to solve some Lagrange mechanics functions and I have to differentiate a differential equation like $a q^2 + b q +c \dot{q} $ with respect to the derivative. Is it correct to simply treat $q$ as a constant during the differentiation like this:

$ \frac{\partial}{\partial \dot{q}} ( a q^2 + b q +c \dot{q}) = c $

Thanks in advance!