And, of course, there's always the
expr.rewrite(exp).expand().powsimp().rewrite(sin).expand() trick.

Aaron Meurer

On Sat, Oct 27, 2012 at 1:04 AM, Aaron Meurer <[email protected]> wrote:
> I believe it will be possible to extend the algorithm at
> https://github.com/sympy/sympy/pull/1258 to handle expressions like
> these.
>
> Aaron Meurer
>
> On Sat, Oct 27, 2012 at 12:32 AM, Chris Smith <[email protected]> wrote:
>> In my github branch, smichr/trigsimp there was some work added to
>> handle these...that branch is not being maintained and is far behind
>> the master branch but perhaps it would be of use:
>>
>>>>> eq
>> sin(a)*cos(b) - sin(b)*cos(a)
>>>>> simplify(eq)
>> sin(a - b)
>>
>> In that branch however, the simplified expression does not
>> expand...and if you do things to make it expand it doesn't go back to
>> the simplest formula again
>>
>>
>>>>> sin(a-b).rewrite(tan)
>> 2*tan(a/2 - b/2)/(tan(a/2 - b/2)**2 + 1)
>>>>> simplify(_)
>> 2*cos(a/2 - b/2)**2*tan(a/2 - b/2)
>>
>>
>> YMMV,
>>  Chris
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "sympy" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to 
>> [email protected].
>> For more options, visit this group at 
>> http://groups.google.com/group/sympy?hl=en.
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to