How do you get maxima to "simplify" expressions like cos(2*%pi/5)?



Try load(ntrig). Note that unless you're using the latest CVS, it may not
always give you the correct result outside the first quadrant, due to a sign
error.


(%i1) load(ntrig);
(%o1)     /home/vttoth/dev/maxima/maxima/share/trigonometry/ntrig.mac
(%i2) demoivre:true;
(%o2)                                true
(%i3) cos(2*%pi/5) - ((sqrt(5)-1)/4);
(%o3)                                  0
(%i4) solve(x^5=1);
           2 sqrt(sqrt(5) + 5) %i + sqrt(2) sqrt(5) - sqrt(2)
(%o4) [x = --------------------------------------------------, 
                               4 sqrt(2)

    (sqrt(5) - 1) sqrt(sqrt(5) + 5) %i - sqrt(2) sqrt(5) - sqrt(2)
x = --------------------------------------------------------------, 
                              4 sqrt(2)

      (sqrt(5) - 1) sqrt(sqrt(5) + 5) %i + sqrt(2) sqrt(5) + sqrt(2)
x = - --------------------------------------------------------------, 
                                4 sqrt(2)

      2 sqrt(sqrt(5) + 5) %i - sqrt(2) sqrt(5) + sqrt(2)
x = - --------------------------------------------------, x = 1]
                          4 sqrt(2)



Viktor
 

-----Original Message-----
From: maxima-admin@math.utexas.edu [mailto:maxima-admin at math] On
Behalf Of Calvin Ostrum
Sent: Saturday, December 18, 2004 10:13 PM
To: maxima@math.utexas.edu
Subject: How do you get maxima to "simplify" expressions like
cos(2*%pi/5)?

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


_______________________________________________
Maxima mailing list
Maxima@www.math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima