Skip to main content
Source Link
joro
  • 25.4k
  • 10
  • 66
  • 121

From the sage-support mailing list.

Sage 5.10 claims $$\forall a,b \in \mathbb{R}, \; \sqrt{(a+b)^2}=\sqrt{a^2}+\sqrt{b^2} $$

though it contradicts it numerically for $a=1,b= -1$.

Session:

sage: var('a,b');assume(a,'real');assume(b,'real');ex=sqrt( (a+b)^2 ) - (sqrt(a^2)+sqrt(b^2));ex
(a, b)
sqrt((a + b)^2) - sqrt(a^2) - sqrt(b^2)
sage: ex.full_simplify()
0
sage: ex.subs(a=1,b=-1)
-2
Post Made Community Wiki by joro