Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I need to integrate the function, $f(a,b)=-g(a,b)ln(g(a,b)) = -1/ Pi(( (E^(-((a^2 - E^(-t [Gamma]) [Alpha]^2)/( 1 + 2 [Sigma]^2)))) [Pi] ([Sigma]^2) )/((1 + 2 [Sigma]^2) (E^(2 [Alpha]^2) + Cos[[Phi]])) (Exp[ I*(4 b E^(-((t [Gamma])/2)) [Alpha] + [Phi] + 2 [Sigma]^2 [Phi])/(1 + 2 [Sigma]^2)] + Exp[-I*(4 b E^(-((t [Gamma])/2)) [Alpha] + [Phi] + 2 [Sigma]^2 [Phi])/(1 + 2 [Sigma]^2)]) + (( E^(-((b^2 + (a + Sqrt[E^(-t [Gamma])] [Alpha])^2 - (2 [Alpha]^2 + t [Gamma]) (1 + 2 [Sigma]^2))/( 1 + 2 [Sigma]^2)))) [Pi] )/((2 + 1/[Sigma]^2) (E^( 2 [Alpha]^2) + Cos[[Phi]])*E^(t [Gamma])) + (( E^(-((b^2 + (a - Sqrt[E^(-t [Gamma])] [Alpha])^2 - (2 [Alpha]^2 + t [Gamma]) (1 + 2 [Sigma]^2))/( 1 + 2 [Sigma]^2)))) [Pi] )/((2 + 1/[Sigma]^2) (E^( 2 [Alpha]^2) + Cos[[Phi]])E^(t [Gamma])))/ Normalization(Log[( [Pi] ([Sigma]^2) )/((1 + 2 [Sigma]^2) (E^( 2 [Alpha]^2) + Cos[[Phi]]))] - ( a^2 - E^(-t [Gamma]) [Alpha]^2)/(1 + 2 [Sigma]^2) + Log[(2* Cos[(4 b E^(-((t [Gamma])/2)) [Alpha] + [Phi] + 2 [Sigma]^2 [Phi])/(1 + 2 [Sigma]^2)]) + E^(-((b^2 + 2*a*Sqrt[ E^(-t [Gamma])] [Alpha] - (2 [Alpha]^2 + t [Gamma]) (1 + 2 [Sigma]^2))/(1 + 2 [Sigma]^2)))* E^(-t [Gamma]) + E^(-((b^2 - 2*a*Sqrt[ E^(-t [Gamma])] [Alpha] - (2 [Alpha]^2 + t [Gamma]) (1 + 2 [Sigma]^2))/(1 + 2 [Sigma]^2)))* E^(-t [Gamma])] - Log[Normalization]) where

$g(a,b)=$enter image description here

a,b are variables, I is a imaginary unit and others are constants having the following values. Normalization= 0.00585175 [Alpha] = 0.8 [Gamma] = 0.005*0.08 [Phi] = 0 [Sigma] = 0.02 t = 0

$f(a,b)$ cannot be analytically integrated, and so I'd like to numerically integrate it. As you can see in $g(a,b)$, $f(a,b)$ is a highly oscillatory function. So I'm using option "LevinRule".

NIntegrate[f, {a, -Infinity, Infinity}, {b, -Infinity, Infinity}, 
 Exclusions -> g == 0, Method -> "LevinRule", 
 MaxRecursion -> 100], WorkingPrecision -> 60]

The problem is Mathematica says that

Numerical integration with "LevinRule" failed. The integration continues 
with Method ->"MultiDimensionalRule"

The result of the numerical integration with "MultiDimensionalRule" is not accurate enough.

Anyone knows how I can numerically integrate $f(a,b)$?

share|improve this question
4  
Hello, welcome to Mathematica.SE. Please post f definition as a code not a picture. –  Kuba Feb 19 at 8:28
2  
Include values for the constants too. –  Simon Woods Feb 19 at 9:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.