Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isaffine and islinear not handling differentials correctly #1105

Open
n0rbed opened this issue Mar 28, 2024 · 0 comments
Open

isaffine and islinear not handling differentials correctly #1105

n0rbed opened this issue Mar 28, 2024 · 0 comments

Comments

@n0rbed
Copy link
Contributor

n0rbed commented Mar 28, 2024

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant