Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version


Apparently you are using an old version of Sage, because with Sage 6.7, one has

sage: r,M=var('r','M')
sage: assume(r>0,M>0,r>2*M)
sage: sqrt((2*M-r)^2)
sqrt((2*M - r)^2)

To simplify it, simply run

sage: s = sqrt((2*M-r)^2)
sage: s.simplify_real()
-2*M + r

which is correct, given the assumption.