Comment by hnarayanan
15 hours ago
This is a general pattern in CAS. For a more basic case, it’s not obvious sqrt(square(x)) will simplify to x without any further assumptions on x.
15 hours ago
This is a general pattern in CAS. For a more basic case, it’s not obvious sqrt(square(x)) will simplify to x without any further assumptions on x.
I think you would get sqrt(x^2) = x, if x belonged to the natural domain of sqrt, which is a Riemann surface, that may also be defined using the language of "sheaves". I don't know how to connect this to the article or Mathematica.
it's literally the prototypical example for `Assuming`
https://reference.wolfram.com/language/ref/Assuming.html
That's not what it simplifies to using a real or complex number domains for x, it's abs(x). CAS need type inference assumptions and/or type qualifiers to be more powerful.
Edit: Fixed stuff.
For x = -i, square(x) = -1, sqrt(square(x)) = i. Meanwhile, abs(x) = 1. You're right that it simplifies to abs(x) for real x, but that no longer holds for arbitrary complex values.
for arbitrary complex values sqrt() gives 2 answers with +- signs
so sqrt(square(-i)) = +-i, one of which is x
2 replies →
It's abs(x) only over the reals, for complex numbers it's more complicated.
That abs(x) (or |x| as we wrote it) used to catch out so many of us in HS trig and algebra.
Right, that's why you need further assumptions on x in order for that simplification to hold.
It's not a simplification, it's wrong. Sqrt(square(x)) equals abs(x).
5 replies →