So close yet so far! I've read a number of posts here about tips and strategies for simplifying expressions. I hope this case still offers guidance to others.
I have an expression that (just!) fits in on the screen (after a marathon of black magic to from 12Mb of length). It is made up of 78 terms that of complex exponentials. Here is a simplified (illustrative) version, with 4 terms, of the code I am running:
FullSimplify[( 2 E^(I (b + (3 + 2 N) v - 2 \[Phi])))/((Sqrt[a] E^(I b) - E^( I v))^3 (Sqrt[a] E^(I b) + E^(I v))) - ( 2 a^4 E^(I (5 b + (3 + 2 N) v - 2 \[Phi])))/((-Sqrt[a] E^(I b) + E^( I v))^4 (a - E^(2 I v))^2 (Sqrt[a] - E^(I (b + v)))^4) - ( 2 a^3 E^(I (b + (5 + 2 N) v - 2 \[Phi])))/((-Sqrt[a] E^(I b) + E^( I v))^4 (a - E^(2 I v))^2 (Sqrt[a] - E^(I (b + v)))^4) - ( 26 a^3 E^( I (3 b + (5 + 2 N) v - 2 \[Phi])))/((-Sqrt[a] E^(I b) + E^( I v))^4 (a - E^(2 I v))^2 (Sqrt[a] - E^(I (b + v)))^4), Assumptions -> {N \[Element] PositiveIntegers && N > 1, 0 < a < 1, b > 0, v > 0, 0 <= \[Phi] < 2*Pi}] I know my final function must only have Real components (i.e. should be trigonometric). I also just have intuition to believe that it can be simplified further as I do have limiting cases that are much more manageable.
I tried naively running FullSimplify but it crashed: my 32GB RAM was not enough!
Of course I have tried Simplifying it (it returned back the same thing instantly). This clearly requires more hand-curation. The question is how to go about that?
As such, there are important questions such as:
- Is it better to manipulate (simplify) expressions in terms of exponentials or trig? (Given I know my end result will be trignometric). The reason I have it in exponential form is that the summation I had done initially to get an expression did not seem to complete if I used trig.
- Are there more systemised ways to simplify sublists? Is it better to do random sublists and hope for partial cancellation between terms?
- Are there ever times where simplifying can be done too early? In my case, if I do TrigReduce[], it can make the expressions grow considerably, even if that does end up resulting in just a trig expression. It really then is unclear if I have something more useful (given that Simplifying is already unreliably slow)
Nas a variable, as it is a built-in Mathematica function. $\endgroup$