Symbolics islinear issue

Why the equation below is triggering islinear assertion if the equation is linear?

julia> f = 2x -4 == 0
(-4 + 2x) == 0
julia> symbolic_linear_solve(f, x)
ERROR: AssertionError: islinear
Stacktrace:
 [1] symbolic_linear_solve(eq::Num, var::Num; simplify::Bool, check::Bool)
   @ Symbolics C:\Users\jcbri\.julia\packages\Symbolics\YbNrd\src\linear_algebra.jl:105
 [2] symbolic_linear_solve(eq::Num, var::Num)
   @ Symbolics C:\Users\jcbri\.julia\packages\Symbolics\YbNrd\src\linear_algebra.jl:101
 [3] top-level scope
   @ REPL[34]:1

(-4 + 2x) ~ 0?

Im sorry, but I’m not understanding the assertion. Islinear is telling me that a first degree equation is not linear?

No, that’s not a first degree equation. It’s a function with a boolean operation, not an equation.

2 Likes

Oh, thank you.