How can I get an exact solution to a linear system using Symbolics.jl? For example:
@variables x y
Symbolics.solve_for([x + y ~ 2,
x - y ~ 1],
[x, y])
# Result:
2-element Vector{Float64}:
1.5
0.5
I would expect fractions 3/2 and 1/2.
For comparison, with SymPy.jl I get
@vars x y
solve([x + y ⩵ 2,
x - y ⩵ 1])
# Result:
Dict{Any, Any} with 2 entries:
y => 1/2
x => 3/2