isaffine and islinear not handling differentials correctly
n0rbed opened this issue · 0 comments
n0rbed commented
@variables x y t
D = Differential(t)
Dx = D(x)
expr = Dx * x + Dx*t - 2//3*x + y*Dx
Symbolics.isaffine(expr - Dx, [x])
# ERROR: Failed to apply rule (~f)(~(x::isidx)) => if haslinearity_1(~f)
Symbolics.islinear(expr - Dx, [x])
# ERROR: Failed to apply rule (~f)(~(x::isidx)) => if haslinearity_1(~f)
However, checking if its linear with respect to Dx outputs a correct answer:
Symbolics.isaffine(expr - Dx, [Dx])
# true