Atan2 doesn't symplify as expected.



On 8/1/13 5:42 PM, David Ronis wrote:
> Hi Richard,
>
> Your point is well taken; however, within a given expression the sqrt
> function should have the same meaning.  If not, then why bother having
> solve(a*x^2+b*x+c=0, x) return both roots?
Interesting question.  The answer is that returning a list [r1,r2] of 
two solutions
shows there are two solutions to a quadratic.  Choose either of the 2
square roots of  b^2-4ac and put them in the list, and you get both
solutions.  However, if you pick r1, you don't know which solution you
have picked.  Separating the list [r1, r2]  and computing further with
just r1, in general, is dangerous if you need to know its value,  as
opposed to the property that it is a root...
>
> In any case, shouldn't there be a flag that forces one of the default
> choices?
Not really.  If you take a course in complex variables and conformal
mapping, you have a different perspective.  I'm guessing you haven't
taken such a course..
RJF
>
> David
>
>
> ----Original Message-----T
> o: David.Ronis at McGill.CA, Mailing Maxima <maxima at math.utexas.edu>D
> ate: Thu, 01 Aug 2013 14:13:12 -0700
>
> It may not be something that Maxima (or some of
> its programmers)  apparently agrees with, but
> noting that   q   is greater than zero does not, mathematically speaking,
> tell you that sqrt(q)  is greater than zero.   The
> object  q  still has 2 square roots in general.
>
> Also, if nothing at all is known about q,
> sqrt(q^2),  which Maxima simplifies to abs(q),
> is nonsense as well,  since there are two values,
> q and -q,  neither of which is abs(q).
>
> RJF
>
> On 8/1/13 1:56 PM, David Ronis wrote:
>> In maxima, if you evaluate
>>
>> atan2(y,x)+atan2(-y,x)
>>
>> you get zero as you should.  If you try something more complicated,
>> like:
>>
>>    atan2(2^(1/2)*omega^(1/2)+2*k,omega+2^(1/2)*k*omega^(1/2)+k^2-1)
>>    +atan2(-2^(1/2)*omega^(1/2)-2*k,omega+2^(1/2)*k*omega^(1/2)+k^2-1)
>>
>> where all variables are declared real and assumed to be positive,
>>
>> you don't get zero.  On the other hand, if I substitute z^2 for omega in
>> the last expression, I get zero again.   It seems that maxima is having
>> trouble with a possible sqrt branch issue and ignoring the assume(omega
>>> 0 ).
>> Thanks in advance.
>>
>> David
>>
>> _______________________________________________
>> Maxima mailing list
>> Maxima at math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima