Message Boards Message Boards

4 Replies
3 Total Likes
View groups...
Share this post:

How to group constants that multiply the same product of trig functions?

 I have an output that consists of more than 4000 lines where each line is a constant times a product of circular functions, each having only a single argument. Repeatedly the same product of circular functions is multiplied by several constants on separate lines. I want each distinct product of circular functions to appear only once multiplied by the sum of the contants that mulitplied it separately.   Simplify[ ] combines the circular function products into circular functions with arguments that are sums of the original arguments, which I do not want to happen, and it did not group the contants into  single factors. FullSimplify[ ] appears to be overkill.  It ran for a week with no result, so I aborted it.  It seems there must be a way to convert the ouput to a sum of products of the circular functions with single arguments where each product appears only once with a sum constants multiplying it while not combining the products into circular functions with arguments that are combinations of the single arguments.
POSTED BY: Stanton Peale
4 Replies
A Simplify[ ] command that does not alter the trig functions would be ideal.
POSTED BY: Stanton Peale
Dear Stanton,
Can you give a short example?

Have you tried, Simplify[expr, Trig->False]?
POSTED BY: W. Craig Carter
Dear Craig,
Thanks for the suggestion.  I tried Simplify[file, Trig->False], and it successfully executed. Some of the constant coefficients were combined, but not all.  There were still terms with different constants multiyplying the same product of circular functions, but in other parts of the output the constants were grouped as multipliers of nested products.  I will study Trig->False to make sure the math content of the output is preserved, and ascertain whether the nested products are going to be a problem.  Thanks again.
POSTED BY: Stanton Peale
If Simplify works in the way you like except for combining trig args, you could post-process with TrigExpand.

An alternative might be to use Collect. But you would have to give it complicated input, I think.
POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract