OK, so I'm doing a computation and my result is something I
called thirdroot. I'm trying to test whether it's equal to a
particular expression. Can someone explain what is wrong here?
(s*t+1)^2/(s+t)^2
(s*t + 1)^2/(s + t)^2
factor(thirdroot+1)
(s*t + 1)^2/(s + t)^2
thirdroot+1-(s*t+1)^2/(s+t)^2
((s^2 - 1)*t^2 - s^2 + 1)/(s^2 + 2*s*t + t^2) - (s*t + 1)^2/(s + t)^2 + 1
simplify(thirdroot+1-(s*t+1)^2/(s+t)^2)
((s^2 - 1)*t^2 - s^2 + 1)/(s^2 + 2*s*t + t^2) - (s*t + 1)^2/(s + t)^2 + 1
expand(thirdroot+1-(s*t+1)^2/(s+t)^2)
-s^2/(s^2 + 2*s*t + t^2) - 2*s*t/(s^2 + 2*s*t + t^2) - t^2/(s^2 + 2*s*t + t^2) + 1
Seeing a 0 would make me happier...
Fernando
-- ============================================================= Fernando Q. Gouvea http://www.colby.edu/~fqgouvea Carter Professor of Mathematics Dept. of Mathematics and Statistics Colby College 5836 Mayflower Hill Waterville, ME 04901 When God is invisible behind the world, the contents of the world will become new gods; when the symbols of transcendent religiosity are banned, new symbols develop from the inner-worldly language of science to take their place. -- Eric Voegelin
sage: var('s t')
(s, t)
sage: thirdroot = ((s^2 - 1)*t^2 - s^2 + 1)/(s^2 + 2*s*t + t^2)
sage: factor(thirdroot + 1)
(s*t + 1)^2/(s + t)^2
sage: a = thirdroot + 1 - (s*t + 1)^2/(s+t)^2
sage: a
((s^2 - 1)*t^2 - s^2 + 1)/(s^2 + 2*s*t + t^2) - (s*t + 1)^2/(s + t)^2 + 1
sage: a.simplify_full()
0