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

asked 11 years ago

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?

Preview: (hide)

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 ( 11 years ago )

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 ( 11 years ago )