ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 27 Jan 2015 15:22:47 +0100(abs(sin(x))^2).simplify_full()https://ask.sagemath.org/question/9740/abssinx2simplify_full/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?
Tue, 29 Jan 2013 10:07:09 +0100https://ask.sagemath.org/question/9740/abssinx2simplify_full/Comment by jllb for <p>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?</p>
https://ask.sagemath.org/question/9740/abssinx2simplify_full/?comment=18326#post-id-18326Here, using Ubuntu 12.04, it consistently yields abs(sin(x))^2. Please note that the similar input abs(sin(x)^2).simplify_full() produces the right answer. Version 5.5 does not have this problem. Wed, 30 Jan 2013 04:00:32 +0100https://ask.sagemath.org/question/9740/abssinx2simplify_full/?comment=18326#post-id-18326Answer by rws for <p>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?</p>
https://ask.sagemath.org/question/9740/abssinx2simplify_full/?answer=25608#post-id-25608I think that Maxima (which handles simplification and assumptions) is correct insofar that
sage: assume(x,"real")
sage: (abs(sin(x))^2).simplify_full()
abs(sin(x))^2
sage: (abs(x)^2).simplify_full()
x^2
because it can't assume `sin(x)` to be real. But trying that gives an error,
so, even if Maxima doesn't know by itself that `sin(x)` is real, there should
be a means to specify it.
Mon, 26 Jan 2015 18:12:24 +0100https://ask.sagemath.org/question/9740/abssinx2simplify_full/?answer=25608#post-id-25608Comment by kcrisman for <p>I think that Maxima (which handles simplification and assumptions) is correct insofar that</p>
<pre><code>sage: assume(x,"real")
sage: (abs(sin(x))^2).simplify_full()
abs(sin(x))^2
sage: (abs(x)^2).simplify_full()
x^2
</code></pre>
<p>because it can't assume <code>sin(x)</code> to be real. But trying that gives an error,
so, even if Maxima doesn't know by itself that <code>sin(x)</code> is real, there should
be a means to specify it.</p>
https://ask.sagemath.org/question/9740/abssinx2simplify_full/?comment=25613#post-id-25613Upstream it? Esp. if this used to work, as I can confirm in 5.2.Tue, 27 Jan 2015 15:22:47 +0100https://ask.sagemath.org/question/9740/abssinx2simplify_full/?comment=25613#post-id-25613