
Re: An independent integration test suite
Posted:
Jul 24, 2013 12:52 PM


On Wednesday, July 24, 2013 3:14:07 AM UTC4, Nasser M. Abbasi wrote: > On 7/24/2013 1:25 AM, daly@axiomdeveloper.org wrote: > > > On Wednesday, July 24, 2013 1:21:51 AM UTC4, Albert Rich wrote: > > >> On Tuesday, July 23, 2013 2:32:20 PM UTC10, da...@axiomdeveloper.org wrote: > > >> > > >> > > >> > > >>> We differ on some results because Rubi (or whatever program you are using > > >> > > >>> to create the optimal results) assumes that square roots have only a single > > >> > > >>> positive value. Axiom does not want to make this simplification so given > > >> > > >>> sqrt(3)*sqrt(7)*sqrt(21)  21 > > >> > > >>> Axiom will not simplify this to zero but the Rubi test suite does. > > >> > > >> > > >> > > >> Surly there must be a way to tell Axiom to choose the principal branch so sqrt(4)2 will simplify to zero? > > >> > > >> > > >> > > >> Albert > > > > > > Actually, as you can guess, the real results are more complicated. > > > Given > > > > > > (sqrt(b^2*x^24)sqrt(b*x2)*sqrt(b*x+2))/ > > > (sqrt(b*x2)*sqrt(b*x+2)*sqrt(b^2*x^24)) > > > > > > under what conditions is this identically zero? > > > > > > If I extract the numerator and ask if it zero? > > > Axiom replies false. Is there an algorithm to show > > > that this is identically zero? I'd be happy to > > > implement it. I reread a paper on the subject and > > > now I'm more confused than when I started. > > > > > > Tim > > > > > > > hello Tim; > > > > This is in M 9.01: For domain Reals, Mathematica > > gives conditions for zero > > > >  > > Clear[x, b]; > > num = (Sqrt[b^2*x^2  4]  Sqrt[b*x  2]*Sqrt[b*x + 2]); > > den = Sqrt[b*x  2]*Sqrt[b*x + 2]*Sqrt[b^2*x^2  4]; > > Reduce[(num/den) == 0, {x, b}, Reals] > >  > > > > (x < 0 && b < 2/x)  (x > 0 && b > 2/x) > > > > But in Complex domain, it gives warnings due to branch cuts, > > so not possible to decide on conditions for sure in this > > case: > > > >  > > Clear[x, b]; > > num = (Sqrt[b^2*x^2  4]  Sqrt[b*x  2]*Sqrt[b*x + 2]); > > den = Sqrt[b*x  2]*Sqrt[b*x + 2]*Sqrt[b^2*x^2  4]; > > Reduce[(num/den) == 0, {x, b}, Complexes] > >  > > > >  > > During evaluation of In[29]:= Reduce::useq: The answer found by > > Reduce contains unsolved equation(s) {0==(Sqrt[2+Times[<<2>>]] > > Sqrt[2+Times[<<2>>]]+Sqrt[4+Power[<<2>>] Power[<<2>>]])/Sqrt[2+b x]}. > > A likely reason for this is that the solution set depends on branch > > cuts of Mathematica functions. >> > > > > Out[32]= Sqrt[2 + b x] != 0 && > > 0 == (Sqrt[2 + b x] Sqrt[2 + b x] + > > Sqrt[4 + b^2 x^2])/Sqrt[2 + b x] && 2 + b x != 0 > >  > > > > But if one wants one instance which makes num/den = 0, then > > there is a command for that: > > > > FindInstance[(num/den) == 0, {x, b}, Complexes] > > {{x > 0, b > 0}} > > > > Nasser
Even if you choose the principle root there is still a problem. The choice of values for the variables is constrained by the denominator. A choice of b=2, x=1 will generate a zero from the expression sqrt(b*x2) and the product in the denominator collapses to zero.
At this point it seems the problem is that there are at least 2 points (b=2,x=1), (b=2,x=1) that collapse the denominator if we only consider integer values for the variables. The problem grows hair if we allow rationals since (b=1/2,x=4) fails. Over the reals there are other cases.
I suppose there are a few solutions, such as taking limits to prove continuity, changing the choice of branch cuts in the original expression hoping to find a different result, or using "such that" expressions, that is, expression  (or (not (and (= b 2) (= x 1))) (not (and (= b 2) (= x 1))))
In any case, Axiom has no default machinery to prove that this expression is identically zero, even if we could assert principle values.
Does this matter? It depends. As my principle goal is to develop a computer algebra test suite I think it is important to consider these cases and make assumptions explicit, as in the suchthat expression.
There isn't a "right" answer but it is enlightening to see how each CAS handles these expressions.
Tim

