Atan2 doesn't symplify as expected.



The original simplification problem here has nothing to do with anything so
sophisticated as square roots, branch cuts, etc.

Here is the simplest case of the problem:

      assume(n<0,p>0)

      atan2( -x, r ) => - atan2(  x, r )   << moves negation out
      atan2( -n, r ) =>   atan2( -n, r )
      atan2( -p, r ) =>   atan2( -p, r )

Maxima moves the negation out of atan2 if the first argument is *syntactically
negative* but not known to be positive or negative. The culprit is the cond
clause calling mminusp* in simpatan2.

This looks intentional, but I don't know the motivation.  It certainly
breaks the simplification atan2(-p,r)+atan2(p,r).  Replacing mminusp* with
mminusp fixes this particular problem.

            -s


On Sun, Aug 4, 2013 at 2:15 AM, Richard Fateman <fateman at gmail.com> wrote:

>  Generally  RootOf(..) should not "evaluate"  to a list or anything else.
>
> RootOf(x^2-1, 1/2, [1,2])    ^2    simplifies to x^2-1
>
> You can compute the sum and product of roots etc.
>
>
>
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>