I have a very ugly function with 157 terms that I want to integrate over three variables. Each term is a Gaussian integral in those variables multiplied by a polynomial in the variables. However, in each term the argument of the exponential is different (still Gaussian) and each polynomial is different. I want to I will give an example term at the bottom (I've also attached a picture in case this is too tough to parse).
Is there a way to extract the coefficient in front of the exponent in such an expression, and to extract the argument of the exponent? I'm asking because I saw a post that deals with improving the speed of these types of integrals. That post provides a module to do the integration given the exponent's argument, the coefficient expression, and the variables. So if I can extract the relevant argument and exponent, I should in principle be able to use that module.
(I E^((3 I m \[Omega] (-2 q q1 + (q^2 + q1^2) Cos[t1 \[Omega]]) Csc[
t1 \[Omega]])/(2 \[HBar]) + (
I m \[Omega] (-2 q1 q2 + (q1^2 +
q2^2) Cos[(-t1 + t2) \[Omega]]) Csc[(-t1 + t2) \[Omega]])/(
2 \[HBar]) + (
I m \[Omega] (-2 q q2 + (q^2 +
q2^2) Cos[(-t2 + t3 - I \[Beta]) \[Omega]]) Csc[(-t2 + t3 -
I \[Beta]) \[Omega]])/(2 \[HBar])) m q1^5 q2 \[Lambda] Cot[
t1 \[Omega]] Csc[t1 \[Omega]]^3 Sqrt[-((
I m \[Omega] Csc[t1 \[Omega]])/\[HBar])] Sqrt[-((
I m \[Omega] Csc[(-t1 + t2) \[Omega]])/\[HBar])] Sqrt[-((
I m \[Omega] Csc[(-t2 + t3 -
I \[Beta]) \[Omega]])/\[HBar])])/(64 Sqrt[2] \[Pi]^(
5/2) \[HBar])

q1,q2andq. Is that correct? – Jens Jul 19 '17 at 00:00