フィルターのクリア

Strange behavior of functionalDerivative()

1 回表示 (過去 30 日間)
yetanothernickname
yetanothernickname 2019 年 1 月 9 日
Hey all,
I've encountered the issue where functionalDerivative() gives a wrong result:
clear
syms x(t)
f = diff(x, t)^2 * x^2
functionalDerivative(f,x)
results in
- 2*x(t)*diff(x(t), t)^2 - 2*x(t)^2*diff(x(t), t, t)
while it should be (at least if my knowledge of partial derivates is still correct)
2*x(t)*diff(x(t), t)^2
How can this be?
If encountered this while trying to get the dynamics equation of a system using the Lagrangian approach.
Interestingly this error leads to -dL/dx = 0 producing the correct end result, while usually the equation d/dt( dL/ddiff(x,t) ) - dL/dx = 0 should produce this result. (with L=T-V, T being the kinetic and V the potential Energy of the system)

回答 (0 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by