And sorry, it's clear that the way my final expression displays makes its meaning ambiguous. The expression in block parenthesis is not meant to be part of the exponent. Perhaps this makes the integral clearer
|
It wasn't really ambiguous, I just fucked up. Not that you probably need that integral, but it looks like a straightforward application of Euler's formula and the multinomial theorem, if I'm reading it correctly... Something like (using k instead of i as the iteration variable in the product to prevent it from being mixed up with the imaginary unit)
where
Pushing the

factor inside the summation sign, then switching the order of summation and integration shouldn't be an issue since they've both got finite bounds, so you get (if I didn't mess up the algebra, too...)
where
If the

factor was meant as the imaginary unit instead, the result isn't very different. I don't particularly like mixing capital pi with capital sigma notation, but it seems hard to avoid without combinatorial arguments sometimes.
"Stephen Wolfram is the creator of Mathematica and is widely regarded as the most important innovator in scientific and technical computing today." - Stephen Wolfram