You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recent Fixes #570 and #568 leaves a strange behavior for derivatives (it sounds like there are some known issues, but I wanted to document a simple case here)
@variables t x[1:2](t) # independent and dependent variables@parameters k # parameters
Dx1 =Differential(x[1])
Dx2 =Differential(x[2])
V =1/2*k*(x[2]- x[1])^2
Symbolics.expand_derivatives(Dx1(L))
Result should be -k*(x[2] - x[1])
but instead you receive 0
The problem seems to stem from the Differential
@variables t x[1:2](t) # independent and dependent variables@parameters k # parameters
Dx1 =Differential(x[1])
Dx2 =Differential(x[2])
V =1/2*k*x[2]^2+1/2*x[1]^2
Symbolics.expand_derivatives(Dx1(L))
returns
k*x_2 + k*x_1
instead of the correct
k*x_1
The text was updated successfully, but these errors were encountered:
The recent Fixes #570 and #568 leaves a strange behavior for derivatives (it sounds like there are some known issues, but I wanted to document a simple case here)
Result should be
-k*(x[2] - x[1])
but instead you receive
0
The problem seems to stem from the
Differential
returns
k*x_2 + k*x_1
instead of the correct
k*x_1
The text was updated successfully, but these errors were encountered: