On Sep 27, 11:51 pm, Aidan <aidan....@gmail.com> wrote:
> Hi,
>
> This may be a repeat question, but is there a function to simplify
> complex expressions in sage? For example, the input
>
> M = matrix([[e^(2*pi*I*i*j/3) for i in [0..2]] for j in [0..2]]);
> M.eigenvalues()
>
> outputs
>
> [-1/2*(-10/9*I*sqrt(3) + 2*I)^(1/3)*(I*sqrt(3) + 1) + 1/3*(I*sqrt(3) -
> 1)/(-10/9*I*sqrt(3) + 2*I)^(1/3) + 1/3*I*sqrt(3),
> -1/2*(-10/9*I*sqrt(3) + 2*I)^(1/3)*(-I*sqrt(3) + 1) + 1/3*(-I*sqrt(3)
> - 1)/(-10/9*I*sqrt(3) + 2*I)^(1/3) + 1/3*I*sqrt(3), (-10/9*I*sqrt(3) +
> 2*I)^(1/3) + 2/3/(-10/9*I*sqrt(3) + 2*I)^(1/3) + 1/3*I*sqrt(3)]
>
> What I'd really like is an output like
>
> [sqrt(3), I*sqrt(3), -sqrt(3)]
>
> Neither "simplify" nor "simplify_full" seemed to help. Thanks in
> advance,

Currently the various variants on 'simplify', 'expand', and 'factor'
are probably your best bet.  Then again, it is probably undecidable
how to "simplify" a given expression :)

- 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

Reply via email to