Why abs(sin(pi/n)) is not simplified by sin(pi/n) when n>2

asked 2013-06-20 13:09:08 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I try to simplify an expression but Sage can't to do so.

This is my code :

sage: n= var("n")
sage: assume(n,'integer',n>2)
sage: show((abs(sin(pi/n))).simplify_full().simplify_trig())

But this code :

sage: show((abs(pi/n)).simplify())

gives "of course" the good result :

pi/n

Can someone explain to me what is happening?

edit retag flag offensive close merge delete

Comments

The most one can say here is that Maxima doesn't "know" that sin(pi/n) is, in fact, positive. The assumptions framework in Maxima (and hence Sage) is acknowledged to be fairly weak.

kcrisman gravatar imagekcrisman ( 2013-06-20 14:41:04 +0100 )edit

It is unfortunate because for more complicated expressions that simplify a lot, we can not rely on Sage for such simplification. Thanks Krisman for your help!

moroplogo gravatar imagemoroplogo ( 2013-06-20 14:50:19 +0100 )edit