STACK: Problem with sqrt and sin/cos

Re: STACK: Problem with sqrt and sin/cos

by Christopher Sangwin -
Number of replies: 0
Picture of Particularly helpful Moodlers Picture of Plugin developers

Yes, 

This sort of thing is a problem, and there are already some known things which STACK does not think are equal but which I do.  E.g. sqrt(108)+10)^(1/3)-(sqrt(108)-10)^(1/3) and 2  [Actually this is Cardano's example from Ars Magna...]

I've added your very helpful examples to the list of "known fails" for now, and will try to improve this.  Testing for zero turns out to be very hard in general, when you don't know anything about the expressions.

What you can do in this case is use Maxima's "zeroequiv" function on the difference and test for equality with "true".

However, in general, zeroequiv introduces lots of false positives in my view.  Try

zeroequiv(x-sqrt(x^2),x);
zeroequiv(abs(x)-x,x);

which is why I didn't use this STACK in the first place!  You may have other problems with this approach.