Dear Mathematica users:
As attached. I have two very long trigonometric expressions (Expression1 and Expression2). I try to Simplify Expression1 however it fails. Then, I try to use MySimplify (defined by Simplify[ExpToTrig[Simplify[TrigToExp[x]]]]), it gets a simplified expression (SExpression1) easily. Ok, this may indicate that I should always use MySimplify for long trigonometric expressions.
However, when I use MySimplify to simplify the second Expression2, it fails again. However, I can straightly use the default Simplify to get SExpression2.
This is so crazy. Why the Mathematica Simplify can be so unstable? I don't require the Mathematica Simplify to find the most simplified expression every time. However, I need it to have a solution every time. Don't just stop there arbitrarily. This makes my research so difficult since I have a program that need to simplify long trigonometric expressions several times in a loop.
ps, I use Mathematica 8 with 32 GB RAM.
Many thanks for your prompt reply. You do provide me valuable information. I will try to figure out how to deal with long trigonometric expression simplification and give my feedback later.
Simplifying an expression is essentially a optimization problem. Except in very specific cases, optimization problems are very difficult and has the kinds of issues you're describing.
When using FullSimplify, please check that:
For examples like the one in your notebook, you might want to try Common Sub-Expression Elimination. If you search online, you can find examples of how to do that in Mathematica, including a function called Experimental`OptimizeExpression.