On Dec 5, 6:15 am, Burcin Erocal <bur...@erocal.org> wrote: > On Sat, 5 Dec 2009 03:32:04 -0500 > > > > William Stein <wst...@gmail.com> wrote: > > On Fri, Dec 4, 2009 at 9:22 PM, taco <jcho...@gmail.com> wrote: > > > > Sooo.... I am currently working on trying to simplify the resulting > > > expressions in sage to shrink them down to a smaller size. Here is > > > the problem: I notice that my expressions contain *a lot* of terms > > > like this, arctan2(0, looooooooooooong_expression). Now I know that > > > arctan2(0,x) = 0 for all x and so this should simplify my > > > expressions a great deal. However, I cannot get sage to make this > > > simplification for me. Simplify() and simplify_full() do not touch > > > these terms. Does anyone have an idea about how to address this > > > trigonometric simplification? >
This doesn't really answer the original post. The issue is this: sage: arctan2(0,1) 0 sage: arctan2(0,-1) pi So in fact Sage is correct in not evaluating this to be zero, as we consider the angle -pi<theta<=pi for arctan2 (consistent with Python/C and Maxima). If you assume(x>0) and then use the 'calculus copy of Maxima', you get zero; the same would happen with sage: assume(x>0) sage: arctan2(0,x).simplify() 0 since that just sends it to Maxima and back. sage: forget() sage: arctan2(0,x).simplify() arctan2(0,x) By the way, the documentation for arctan2 says arctan2(y,x)=arctan(y/ x), but then (correctly) contradicts it in the next line. Am I missing something? - kcrisman -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org