How would you tackle the following Lagrangian derivative?

3 次查看(过去 30 天)
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?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by