With sage 5.5: sage: (abs(sin(x))^2).simplify_full() sin(x)^2 Maybe not completely correct because, as you said, x could be a complex number. However, I found it convenient.
With sage 5.6 sage: assume(x, 'real') sage: (abs(sin(x))^2).simplify_full() abs(sin(x))^2 For trigonometric simplifications, this is very inconvenient. For example sage: (abs(sin(x))^2 + abs(cos(x))^2).simplify_full().simplify_trig() abs(sin(x))^2 + abs(cos(x))^2 On Thursday, February 14, 2013 10:10:04 PM UTC+1, Frédéric Chapoton wrote: > > This is not a bug, because x can be any complex number : > > sage: x=CDF(4+2*I) > sage: abs(sin(x))**2 > 13.7268664349 > sage: sin(x)**2 > 2.48667440045 + 13.4997523143*I > > > Le jeudi 14 février 2013 16:21:29 UTC+1, Julius a écrit : >> >> I think (abs(sin(x))^2).simplify_full() should render sin(x)^2. This is >> not the case in sage 5.6 even with the assumption assume(x, 'real'). Is >> this a [known] bug? > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.