Why does the equation solver return only one root when using "abs"?
Show older comments
I am using the Symbolic Math Toolbox.
When my equation has an absolute value the solver only returns one of the two roots.
Is this behavior expected?
Here is a reproduction example:
>> syms x
>> solve(abs(x) == 1) % ans = 1
>> solve(sqrt(x^2) == 1) % ans = [-1; 1]
Accepted Answer
More Answers (0)
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!