# Symbol Order for Built-in Functions such as TrigReduce

I’d like to use the TrigReduce function on a sum of n sinusoids to any power, and am running into an issue with Mathematica’s default ordering of symbols. Is there a way that I can specify an order of f symbols for TrigReduce, such that f1 < f2 < f3 {…}, while keeping notation symbolic?

For example, using numeric values work nicely:

But if symbols are used alone, I want to specify that f2 is the larger value in this example, so instead of f1-f2, TrigReduce would ideally yield the term f2-f1.

For perspective, the end goal is the general formula will output a list pairing each calculated numeric value with its associated symbolic f relationship (with f1 < f2 < f3 < f4, etc), but as it is, TrigReduce's symbol ordering doesn't always work as it doesn't know my preference for ascending values.

It isn't TrigReduce doing this. Mathematica automatically sorts expressions into canonical order. The sort is basically structural/lexical, so knowledge of symbolic inequalities isn't applicable.
• Forget TrigReduce. It is not the cause of your problem. To see what's happening, type Cos[x]-1. Mathematica will automatically rearrange it. You could Hold your expression and then rearrange it internally, but that's complicated and requires a great deal of Mathematica expertise to do correctly. – John Doty Mar 6 '18 at 14:35
• One possibility is to make your output into a List with a substitution like Plus->List. Then sort that. – John Doty Mar 6 '18 at 14:40