I have this complex function $wig2$ which I am trying to double integrate with respect to 2 variables $q$ and $p$. Using the code below, I have tried to run it several times; however, it takes forever to compute and doesn't produce a final answer. It just keeps on running. I have tried leaving it for hours but it didn't work.
I have also tried using NIntegrate by fixing limits of $q$ from $-5$ to $5$ but it says the integrand has evaluated to a non-numerical value at the sampling points.
Please guide me why this is happening and how can I fix this?
wig2
= (1/(81*Pi))*4*Abs[(97 - 648*I*Sqrt[2]*p - 2992*p^2 + 2624*I*Sqrt[2]*p^3 + 1088*p^4 - 648*Sqrt[2]*q + 5984*I*p*q + 7872*Sqrt[2]*p^2*q - 4352*I*p^3*q + 2992*q^2 - 7872*I*Sqrt[2]*p*q^2 - 6528*p^2*q^2 - 2624*Sqrt[2]*q^3 + 4352*I*p*q^3 + 1088*q^4 + 64*(17 + 64*p^4 + 64*I*p^3*(3*Sqrt[2] - 4*q) - 88*Sqrt[2]*q + 304*q^2 - 192*Sqrt[2]*q^3 + 64*q^4 + 16*p^2*(-19 + 36*Sqrt[2]*q - 24*q^2) - 8*I*p*(11*Sqrt[2] - 76*q + 72*Sqrt[2]*q^2 - 32*q^3))*Conjugate[p]^4 - 8*(81*Sqrt[2] + 704*Sqrt[2]*p^4 - 1000*q + 2144*Sqrt[2]*q^2 - 3520*q^3 + 704*Sqrt[2]*q^4 - 704*I*p^3*(-5 + 4*Sqrt[2]*q) - 32*p^2*(67*Sqrt[2] - 330*q + 132*Sqrt[2]*q^2) + 8*I*p*(-125 + 536*Sqrt[2]*q - 1320*q^2 + 352*Sqrt[2]*q^3))*Conjugate[q] + 16*(187 + 1216*p^4 + 128*I*p^3*(25*Sqrt[2] - 38*q) - 1072*Sqrt[2]*q + 4240*q^2 - 3200*Sqrt[2]*q^3 + 1216*q^4 + 16*p^2*(-265 + 600*Sqrt[2]*q - 456*q^2) - 16*I*p*(67*Sqrt[2] - 530*q + 600*Sqrt[2]*q^2 - 304*q^3))*Conjugate[q]^2 - 64*(41*Sqrt[2] + 192*Sqrt[2]*p^4 - 440*q + 800*Sqrt[2]*q^2 - 1088*q^3 + 192*Sqrt[2]*q^4 - 64*I*p^3*(-17 + 12*Sqrt[2]*q) - 32*p^2*(25*Sqrt[2] - 102*q + 36*Sqrt[2]*q^2) + 8*I*p*(-55 + 200*Sqrt[2]*q - 408*q^2 + 96*Sqrt[2]*q^3))*Conjugate[q]^3 + 64*(17 + 64*p^4 + 64*I*p^3*(3*Sqrt[2] - 4*q) - 88*Sqrt[2]*q + 304*q^2 - 192*Sqrt[2]*q^3 + 64*q^4 + 16*p^2*(-19 + 36*Sqrt[2]*q - 24*q^2) - 8*I*p*(11*Sqrt[2] - 76*q + 72*Sqrt[2]*q^2 - 32*q^3))*Conjugate[q]^4 + 64*Conjugate[p]^3*(-192*I*Sqrt[2]*p^4 - 64*p^3*(-17 + 12*Sqrt[2]*q) + 32*I*p^2*(25*Sqrt[2] - 102*q + 36*Sqrt[2]*q^2) + 8*p*(-55 + 200*Sqrt[2]*q - 408*q^2 + 96*Sqrt[2]*q^3) - I*(41*Sqrt[2] - 440*q + 800*Sqrt[2]*q^2 - 1088*q^3 + 192*Sqrt[2]*q^4) - 4*(-64*I*p^4 + 64*p^3*(3*Sqrt[2] - 4*q) - 16*I*p^2*(-19 + 36*Sqrt[2]*q - 24*q^2) - 8*p*(11*Sqrt[2] - 76*q + 72*Sqrt[2]*q^2 - 32*q^3) + I*(-17 + 88*Sqrt[2]*q - 304*q^2 + 192*Sqrt[2]*q^3 - 64*q^4))*Conjugate[q]) + 16*Conjugate[p]^2*(-187 - 1216*p^4 - 128*I*p^3*(25*Sqrt[2] - 38*q) + 1072*Sqrt[2]*q - 4240*q^2 + 3200*Sqrt[2]*q^3 - 1216*q^4 + p^2*(4240 - 9600*Sqrt[2]*q + 7296*q^2) + 16*I*p*(67*Sqrt[2] - 530*q + 600*Sqrt[2]*q^2 - 304*q^3) + 12*(41*Sqrt[2] + 192*Sqrt[2]*p^4 - 440*q + 800*Sqrt[2]*q^2 - 1088*q^3 + 192*Sqrt[2]*q^4 - 64*I*p^3*(-17 + 12*Sqrt[2]*q) - 32*p^2*(25*Sqrt[2] - 102*q + 36*Sqrt[2]*q^2) + 8*I*p*(-55 + 200*Sqrt[2]*q - 408*q^2 + 96*Sqrt[2]*q^3))*Conjugate[q] + 24*(-17 - 64*p^4 - 64*I*p^3*(3*Sqrt[2] - 4*q) + 88*Sqrt[2]*q - 304*q^2 + 192*Sqrt[2]*q^3 - 64*q^4 + p^2*(304 - 576*Sqrt[2]*q + 384*q^2) + 8*I*p*(11*Sqrt[2] - 76*q + 72*Sqrt[2]*q^2 - 32*q^3))*Conjugate[q]^2) + 8*Conjugate[p]*(704*I*Sqrt[2]*p^4 + 704*p^3*(-5 + 4*Sqrt[2]*q) - 32*I*p^2*(67*Sqrt[2] - 330*q + 132*Sqrt[2]*q^2) - 8*p*(-125 + 536*Sqrt[2]*q - 1320*q^2 + 352*Sqrt[2]*q^3) + I*(81*Sqrt[2] - 1000*q + 2144*Sqrt[2]*q^2 - 3520*q^3 + 704*Sqrt[2]*q^4) + 4*(-1216*I*p^4 + 128*p^3*(25*Sqrt[2] - 38*q) - 16*I*p^2*(-265 + 600*Sqrt[2]*q - 456*q^2) - 16*p*(67*Sqrt[2] - 530*q + 600*Sqrt[2]*q^2 - 304*q^3) + I*(-187 + 1072*Sqrt[2]*q - 4240*q^2 + 3200*Sqrt[2]*q^3 - 1216*q^4))*Conjugate[q] + 24*(192*I*Sqrt[2]*p^4 + 64*p^3*(-17 + 12*Sqrt[2]*q) - 32*I*p^2*(25*Sqrt[2] - 102*q + 36*Sqrt[2]*q^2) - 8*p*(-55 + 200*Sqrt[2]*q - 408*q^2 + 96*Sqrt[2]*q^3) + I*(41*Sqrt[2] - 440*q + 800*Sqrt[2]*q^2 - 1088*q^3 + 192*Sqrt[2]*q^4))*Conjugate[q]^2 + 32*(-64*I*p^4 + 64*p^3*(3*Sqrt[2] - 4*q) - 16*I*p^2*(-19 + 36*Sqrt[2]*q - 24*q^2) - 8*p*(11*Sqrt[2] - 76*q + 72*Sqrt[2]*q^2 - 32*q^3) + I*(-17 + 88*Sqrt[2]*q - 304*q^2 + 192*Sqrt[2]*q^3 - 64*q^4))*Conjugate[q]^3))/E^(2*Abs[-(1/Sqrt[2]) + I*p + q]^2)/ ((Sqrt[2] - 4*I*p - 4*q)^2*(Sqrt[2] + 4*I*Conjugate[p] - 4*Conjugate[q])^2)];
abs = ComplexExpand[Abs[wig2]]];
intofwig = Integrate[abs, q];
doubint = Integrate[intofwig, p];
delta = Simplify[doubint] - 1;
Integrate[abs, q];
but where isabs
defined? May be you forgot the code for that? $\endgroup$Conjugate[q] == Abs[q]^2/q
andConjugate[p] == Abs[p]^2/p
for analytical solution if closed-form exist !. I Try with:NIntegrate[wig2, {q, -5, 5}, {p, -5, 5}, Method -> "LocalAdaptive"]
and give me:0.6804
with no errors. $\endgroup$wig2
expression is to complicated to computed analyticaly. Probably only way isNIntegrate
. $\endgroup$