Open jkosata opened 2 years ago
I know, but both equations above are linear in b
I was just wondering whether not multiplying by a
is intentional here (in case a
ends up being 0) or not.
True. I made the same mistake as the algorithm. I saw a /
and blindly assumed it is a non-linear equation.
linear_expansion
function first converts the b/a~1
equation to 1-b/a
and then goes down the computation tree. When it reaches b/a
it proclaims the equation nonlinear.
Needs a test/linear_solver.jl
A, b, islinear = Symbolics.linear_expansion(x/y ~ 1, x)
@test_broken isequal(islinear, true)
for
@variables a,b
the following works fine
solve_for([b] .~ [a], [b])
--->a
however
solve_for([b/a] .~ [1], [b])
--->AssertionError: islinear
┆Issue is synchronized with this Trello card by Unito