[sage-support] Re: Strange behaviour of trig_expand

2010-02-02 Thread Nicolas
Oops, case 4 ended at the end of the message... On 2 fév, 15:06, Nicolas wrote: > Here is some to-my-opinion strange behaviour of trig_expand : > > #Declare real variables > var('a b c') > assume([a,'real'],[b,'real'],[c,'real']) > assumptions() > ---> [a is real, b is real, c is real] > > #Case

[sage-support] Re: Strange behaviour of trig_expand

2010-02-02 Thread kcrisman
Dear Nicolas, If you do sage: a = sin((a+b)/c) sage: a.trig_expand?? you will see the source code, which simply uses one of Maxima's expansion routines, whose behavior should be documented on the Maxima Sourceforge site. My suspicion is that Maxima declines to expand this because c might be zer

[sage-support] Re: Strange behaviour of trig_expand

2010-02-02 Thread Nicolas
Thanks for your answer ! Following your idea, ny playing around in maxima, I found that : trigreduce(sin((a+b)/c)) > sin(b/c+a/c) Therefore trigexpand(trigreduce(sin((a+b)/c))) > cos(a/c)*sin(b/c)+sin(a/c)*cos(b/c) Which is what is wanted but I did not find any trigreduce in sage Any i

[sage-support] Re: Strange behaviour of trig_expand

2010-02-02 Thread andrejv
On Feb 2, 3:06 pm, Nicolas wrote: > Here is some to-my-opinion strange behaviour of trig_expand : > > #Declare real variables > var('a b c') > assume([a,'real'],[b,'real'],[c,'real']) > assumptions() > ---> [a is real, b is real, c is real] > > #Case 1 > sin(a+b).trig_expand() > ---> sin(a)*cos(b)

[sage-support] Re: Strange behaviour of trig_expand

2010-02-02 Thread ma...@mendelu.cz
On 2 ún, 18:11, andrejv wrote: > > I don't know how to change sin((x+y)/a) to sin(x/a + y/a) in Sage, > maybe someone else can help you with that. This is expand from Maxima sage: sin((a+b)/c)._maxima_().expand().sage() sin(a/c + b/c) Robert -- To post to this group, send email to sage-support

[sage-support] Re: Strange behaviour of trig_expand

2010-02-02 Thread ma...@mendelu.cz
On 2 ún, 17:38, Nicolas wrote: > Thanks for your answer ! > > Following your idea, ny playing around in maxima, I found that : > > trigreduce(sin((a+b)/c)) > > sin(b/c+a/c) > > Therefore > trigexpand(trigreduce(sin((a+b)/c))) > > cos(a/c)*sin(b/c)+sin(a/c)*cos(b/c) > Which is what is wan

[sage-support] Re: Strange behaviour of trig_expand

2010-02-02 Thread kcrisman
On Feb 2, 3:10 pm, "ma...@mendelu.cz" wrote: > On 2 ún, 17:38, Nicolas wrote: > > > > > Thanks for your answer ! > > > Following your idea, ny playing around in maxima, I found that : > > > trigreduce(sin((a+b)/c)) > > > sin(b/c+a/c) > > > Therefore > > trigexpand(trigreduce(sin((a+b)/c)))