Re: [sympy] Grouping Terms

2023-01-16 Thread Oscar Benjamin
On Mon, 16 Jan 2023 at 16:05, brombo wrote: > > I have a sum of terms some of which are multiplied by cos(th). I want to > group these terms together (in parenthesis) and have the terms not multiplied > by cos(th). A complicating issue is that the sum is a numerator in a > fraction. Consider

[sympy] Grouping Terms

2023-01-16 Thread brombo
I have a sum of terms some of which are multiplied by cos(th). I want to group these terms together (in parenthesis) and have the terms not multiplied by cos(th). A complicating issue is that the sum is a numerator in a fraction. Consider the following expression: (A*cos(th)+B*cos(th)+C)/D