An expression like:
a = TrigToExp[ 3 + 4 Cos[u] + Cos[ 2 u]]
produces a list of exponential factors:
3 + 2 E^(-I u) + 2 E^(I u) + 1/2 E^(-2 I u) + 1/2 E^(2 I u)
How would I make a substitution of E^(I u) -> z in this? If I try that, it does only the first power portion:
a /. E^(I u) -> z
3 + 2 E^(-I u) + 1/2 E^(-2 I u) + 1/2 E^(2 I u) + 2 z
I also tried:
a /. E^(m_ I u ) -> z^m
but this didn't work (at all, not making a single substitution).