On Fri, Dec 4, 2009 at 9:22 PM, taco <jcho...@gmail.com> wrote: > I have been using sage to solve for the eigenvectors and eigenvalues > of a 4x4 symbolic matrix. It takes a few hours, but sage is able to > return the solutions. My dilemma is that the resulting expressions are > *HUGE*. If I ask sage to display one of the eigenvalues on screen (not > using show()) it takes several minutes and then finally displays a > loooong, truncated string. As a specific example, the full text file > containing the output of the first eigenvalue.real_part() is 8.6 MB. > > 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?
You might find this example useful: sage: f = arctan2(0,sin(x)^2) + cos(x^3) + 1/x sage: g(x,y) = 0 sage: f.substitute_function(arctan2, g) 1/x + cos(x^3) William -- 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