assumptions in solve()



On 2/19/2011 11:01 AM, Dmitry Shkirmanov wrote:
> >I think you have not given any evidence that solve is changing 
> sqrt(a*b) to sqrt(a) * sqrt(b).
>
> I think that i have such evidence. Let's consider system of the equations:
>
> solve([a*b=(-ma^2/2+Ea*Eb)^2,a=Ea^2-ma^2,b=Eb^2-mb^2],[Eb,a,b]);
>
> (1) a*b=(-ma^2/2+Ea*Eb)^2
> (2) a=Ea^2-ma^2
> (3) b=Eb^2-mb^2
> (sorry, but i can not give more simple example)
> To solve this system one need to substitute (2) and (3) into (1). It 
> gives quadratic equation. From this equation one can easy get Eb. It 
> has term sqrt((Ea^2-ma^2)*(ma^2-4*mb^2)) (maxima gives right answer 
> for Eb).  Now, to get b one need to substitute Eb into (3). It is easy 
> to see that  b should have the term sqrt((Ea^2-ma^2)*(ma^2-4*mb^2)). 
> But maxima says that there is the term  sqrt(ma - Ea)*sqrt(ma + 
> Ea)*sqrt(2 mb - ma)*sqrt(2 mb + ma) So, i think that maxima divides 
> sqrt((Ea^2-ma^2)*(ma^2-4*mb^2)) into sqrt(ma - Ea)*sqrt(ma + 
> Ea)*sqrt(2 mb - ma)*sqrt(2 mb + ma)
>
I'm not sure what you are objecting to.  solve  produces two 
subsystems.  Each subsystem has a value for Eb and a value for b.
given that sqrt() really is two values, and you can choose one of them 
for one Eb and the other value for the other Eb,
and depending again on choice of sign, you have two distinct values of 
b, I think both of the two values for b are covered.
Now you may not know which of the two values for b is the one of 
interest to you, but one of them is right.

It is, I think, irrelevant whether you write sqrt(a*b)  or 
sqrt(a)*sqrt(b),   since either one has 2 distinct values, i.e.  + or -.

If all these parameters other than a b and Eb were numeric,  you could 
try to make a default assertion that
sqrt(3) means   that number n >0  such that n^2=3,    and the other root 
of n^2=3  is -sqrt(3).  But if your
equation is n^2= q^2-r^2,  then there is no way of telling which is 
positive without external information.
That information is ignored by solve, but you can mess around with the 
results of solve and try to find whatever
is meaningful to you.  So far as I can tell, the set of answers produced 
by solve was ok.

RJF