Symbolics.jl
Symbolics.jl copied to clipboard
Solving equation fails
Symbolics.jl can't solve this equation but if I multiply both sides by x^3 then it can. Wolfram Alpha can solve both. Symbolics.jl's docs say it can do polynomial equations, what's the problem here?
[2edaba10] Nemo v0.46.2
[0c5d862f] Symbolics v6.11.0
using Symbolics, Nemo
@variables x y
julia> symbolic_solve(1/x^2 ~ 1/y^2 - 2/x^3 * (x-y), x)
┌ Warning: This expression cannot be solved with the methods available to ia_solve. Try a numerical method instead.
└ @ Symbolics ~/.julia/packages/Symbolics/6WqId/src/solver/ia_main.jl:176
julia> symbolic_solve( (1/x^2 * x^3 ~ (1/y^2 - 2/x^3 * (x-y)) * x^3), x)
[ Info: Assuming (y^2) != 0
[ Info: Assuming (y^2) != 0
2-element Vector{SymbolicUtils.BasicSymbolic{Real}}:
y
-2y
Easier to reproduce:
using Symbolics, Nemo
@variables x y
symbolic_solve(1/x^2 ~ 1/y^2 - 2/x^3 * (x-y), x)
# symbolic_solve( (1/x^2 * x^3 ~ (1/y^2 - 2/x^3 * (x-y)) * x^3), x)
using
(sym) pkg> st
Status `~/repos/sym/Project.toml`
[2edaba10] Nemo v0.46.2
[0c5d862f] Symbolics v6.11.0
@jariji Can you change the title to "Solving equation fails" ?
@n0rbed take a look?
Here's another one that yields the same issue today (Symbolics 6.38.0; the above example being fine now):
using Symbolics, Nemo
@variables x y
symbolic_solve(x + y - 1 / (x * y), x)
┌ Warning: This expression cannot be solved with the methods available to ia_solve. Try a numerical method instead.
└ @ Symbolics ~/.julia/packages/Symbolics/B6Z8m/src/solver/ia_main.jl:52