On Nov 16, 8:28 pm, Derrick <we.sana...@gmail.com> wrote:
> ok, I got your point. Now, a different issue with "bool"
>
> bool( sin(2*x) == 2*sin(x)*cos(x) ) returns True
> while
> bool( sin(x) == 2*sin(x/2)*cos(x/2) ) returns False
>
> Similarly,
> bool( tan(x) == sin(2*x)/(1+cos(2*x)) ) returns True
> while
> bool( tan(x/2) == sin(x)/(1+cos(x)) ) returns False
>
> Do you have any idea why sage "bool" fails for  trig functions with
> fractional angles?
> Can you suggest any work around?
>

This is a little tricky, because Sage uses certain simplifications of
Maxima, but not *every* conceivable one available, for checking this.
If you read the documentation for the following command, you'll see
various options that look promising, but none of them do what you want
- if Maxima has a command that would simplify this instead of using
half-angle formulas, we haven't wrapped it.

sage: b = 2*sin(1/2*x)*cos(1/2*x)
sage: b.expand_trig()
2*sin(1/2*x)*cos(1/2*x)
sage: b.expand_trig??

- kcrisman

does what you want

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to