Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: symbolic_solve with absolute values #1378

Open
1-Bart-1 opened this issue Dec 6, 2024 · 0 comments
Open

Feature request: symbolic_solve with absolute values #1378

1-Bart-1 opened this issue Dec 6, 2024 · 0 comments

Comments

@1-Bart-1
Copy link

1-Bart-1 commented Dec 6, 2024

Absolute values are very common in symbolic equations. I would like to be able to solve equations containing absolutes using symbolics.
For example:

julia> @variables x y
2-element Vector{Num}:
 x
 y

julia> lhs = norm([x, y])
sqrt(abs2(y) + abs2(x))

julia> symbolic_solve(lhs, x)
┌ Warning: Var not present in given expression
└ @ Symbolics ~/.julia/packages/Symbolics/YbNrd/src/solver/ia_main.jl:283

Right now this causes a warning related to issue #1377.

Running with lhs = abs(x) gives a different warning:

julia> @variables x y
2-element Vector{Num}:
 x
 y

julia> lhs = abs(x)
abs(x)

julia> symbolic_solve(lhs, x)
┌ Warning: This expression cannot be solved with the methods available to ia_solve. Try a numerical method instead.
└ @ Symbolics ~/.julia/packages/Symbolics/YbNrd/src/solver/ia_main.jl:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant