How do you get maxima to "simplify" expressions like cos(2*%pi/5)?
Subject: How do you get maxima to "simplify" expressions like cos(2*%pi/5)?
From: Calvin Ostrum
Date: Sat, 18 Dec 2004 22:12:39 -0500
I have just started trying maxima, and I am finding it very
frustrating. Here is one example:
When I do solve(x^3), I get roots of unity expressed without
any special functions, but when I do solve(x^5), then are all of
a sudden expressed with exp. I can turn demoivre on, and get
them in terms of sin and cos, but I cannot get them without
any of these transcendental functions.
How can I change that?
For example, as it is now, it leaves
cos(2*%pi/5) - ((sqrt(5)-1)/4)
in that form even after simplfying. Since this trivially
simpifies to 0, that is not a good answer! (I put "simplify"
in quotes in the header because I realize in many cases the
cosine expression is simpler, but surely not in the above
expression).
I suspect from the descriptions I have found in various places that
trigrat might work, but although the example in the doc works fine
on my install, I get this on the example in question:
(%i4)trigrat(cos(2*%pi/5));
Maxima encountered a Lisp error:
Type-error in KERNEL::OBJECT-NOT-FIXNUM-ERROR-HANDLER:
NIL is not of type FIXNUM
Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
(%i5)trigrat(sin(3*a)/sin(a+%pi/3));
(%o5)sqrt(3)*sin(2*a)+cos(2*a)-1