On Friday, February 15, 2013 11:31:41 AM UTC, Julius wrote:
>
>
> 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
>
>
I totally agree that this is very inconvenient. When faced with a trig 
problem it doesn't take a lot of symbolic manipulations to arrive at 
something which is full of these expressions, and if we have no way of 
doing these obvious simplifications then that limits the usefulness of 
doing symbolic manipulations. For instance, the majority of the docstrings 
in trac #10132 now fail, for no good mathematical reason.

The behavior is also inconsistent, for reasons that I don't fully get. For 
instance, this will fail: 

sage: u = var('u')
sage: assume(u, 'real')
sage: (abs(cos(u))^2 + abs(sin(u))^2).simplify_trig()
abs(sin(u))^2 + abs(cos(u))^2

but this will work: 

sage: u = var('u', domain='real')
sage: (abs(cos(u))^2 + abs(sin(u))^2).simplify_trig()
1 

I don't know enough about the Maxima interface and the assumptions that 
went into changing this behavior from sage 5.5 to 5.6, but is there maybe a 
way we can set domain to real for symbolic functions over the reals before 
passing the whole thing to maxima for the simplification?

J.

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to