I am using the Symbolics package and having trouble figuring out how to simplify expressions. Note that \sqrt{3} and 3/\sqrt{3} are equal, but I can’t seem to get that. For example:
julia> using Symbolics
julia> a = sqrt(Num(3))
sqrt(3)
julia> a == 3/a
sqrt(3) == (3 / sqrt(3)) # this isn't helpful
julia> a - 3/a
sqrt(3) + -3 / sqrt(3)
julia> iszero(ans)
false # this is incorrect
Looks like a bug, isequal(a, 3 / a) should return true or at least realize it can’t do the computation. isequal((3/a)^2, 3) also fails, but isequal(simplify((3/a)^2), 3) succeeds.
For my project, I’ve swapped out Symbolics for PySym. So I’m set, but I would have thought Symbolics should be able to do this sort of simplification without modifications.