How would you tackle the following Lagrangian derivative?

3 vues (au cours des 30 derniers jours)
Mike Meyers
Mike Meyers le 19 Jan 2018
Imagine you are modeling a system, and have obtained a Lagrangian equation which includes a time derivative of a variable.
How would you obtain a partial derivative with respect to that variable, as it seems that Matlab cannot use diff or functionalDerivative with a time function (for example, x(t)) as a parameter?
equation in question:
L(t) = (3*theta2(t))/4 - (3*theta1(t))/4 + (69468677223508225*x(t))/9007199254740992 + diff(theta1(t), t)^2/5000 +
diff(theta2(t), t)^2/5000 + (7*diff(x(t), t)^2)/40 - 100*x(t)^2 - 25*((3*theta1(t))/100 - (3*theta2(t))/100)^2
How would you derive this with respect to theta1(t), theta2(t), and x(t)?
So far, I have tried:
Eq1 = diff(functionalDerivative(L, diff(theta1(t),t),t);
Eq1 = functionalDerivative(functionalDerivative(L, diff(theta1(t),t)))
etc.
Any ideas? Can it even be done?

Réponses (0)

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by