0
$\begingroup$

I am trying to calculate the following integral and expecting the result to be one but instead returning to 0. This is the formal solution for tunneling Gaussian wavepackets for a finite-range potential.

    φ0[σ_, x0_, κ0_, d_, ω0_, 
   t_, τ_, ν0_, x_] = 
  1/(2 π)^(1/4) 1/Sqrt[σ]
    Exp[I (κ0 (x - d) - ω0 t)]/Sqrt[(1 + (I t)/τ)]
    Exp[-((x - d - x0 - ν0 t)^2/(
     4 σ^2 (1 + (I t)/τ)))];

z[m_, ℏ_, x_, d_, t_, τ_, κ0_, ν0_, α_, 
   x0_] = Exp[-((I π)/4)] Sqrt[m/(
   2 ℏ (t - I τ))] (x - d - 
     x0 - ν0 t + (ℏ (κ0 + (I α^2)/(2 d)) (t - 
        I τ))/m);

m1[m_, ℏ_, x_, d_, t_, τ_, κ0_, ν0_, α_, 
   x0_] = Exp[(I m (x - d - x0 - ν0 t)^2)/(
    2 ℏ (t - I τ))] Exp[
    z[m, ℏ, x, d, t, τ, κ0, ν0, α, x0]^2];

φ[m_?NumericQ, ℏ_?NumericQ, σ_?NumericQ, 
   x0_?NumericQ, κ0_?NumericQ, 
   d_?NumericQ, ω0_?NumericQ, 
   t_?NumericQ, τ_?NumericQ, α_?NumericQ, ν0_?
    NumericQ, λ_?NumericQ, 
   x_?NumericQ] = φ0[σ, x0, κ0, d, ω0, 
    t, τ, ν0, x] - 
   1/(2 π)^(1/4) 1/Sqrt[σ] E^(
    I (κ0 (x - d) - ω0 t))
     Sqrt[π] ((2 m σ λ d)/ℏ^2) m1[m, ℏ,
      x, d, t, τ, κ0, ν0, α, x0];

NIntegrate[φ[0.067*9.11*10^-31, 1.05*10^-34, 
   5*10^-10, -50*10^-10, 1.098*10^18, 2.5*10^-10, 1.52*10^12, 10^-12, 
   2.9*10^-16, 0.1047, 1.9*10^15, 3.204*10^-29, 
   x]^2, {x, -∞, ∞}]

φ[m_?NumericQ, ℏ_?NumericQ, σ_?NumericQ, 
   x0_?NumericQ, κ0_?NumericQ, 
   d_?NumericQ, ω0_?NumericQ, 
   t_?NumericQ, τ_?NumericQ, α_?NumericQ, ν0_?
    NumericQ, λ_?NumericQ, 
   x_?NumericQ] = φ0[σ, x0, κ0, d, ω0, 
    t, τ, ν0, x] - 
   1/(2 π)^(1/4) 1/Sqrt[σ] E^(
    I (κ0 (x - d) - ω0 t))
     Sqrt[π] ((2 m σ λ d)/ℏ^2) m1[m, ℏ,
      x, d, t, τ, κ0, ν0, α, x0];

NIntegrate[φ[0.067*9.11*10^-31, 1.05*10^-34, 
   5*10^-10, -50*10^-10, 1.098*10^18, 2.5*10^-10, 1.52*10^12, 10^-12, 
   2.9*10^-16, 0.1047, 1.9*10^15, 3.204*10^-29, 
   x]^2, {x, -∞, ∞}]

The error message is:

NIntegrate::izero: Integral and error estimates are 0 on all integration subregions. Try increasing the value of the MinRecursion option. If value of integral may be 0, specify a finite value for the AccuracyGoal option. enter image description here

$\endgroup$
7
  • $\begingroup$ Did you try plotting your functions to see how it behaves, and to get an idea about what sorts of numerical errors to expect? $\endgroup$
    – Szabolcs
    Sep 27, 2017 at 11:42
  • $\begingroup$ @Szabolcs, I didn't but will try. $\endgroup$
    – user0322
    Sep 27, 2017 at 11:49
  • $\begingroup$ @Szabolcs, this is the plot I got $\endgroup$
    – user0322
    Sep 27, 2017 at 12:05
  • 1
    $\begingroup$ You seem to be integrating extremely sharply peaked Gaussians. You might want to consider rewriting the problem in a from that is more amenable to numerical calculation. $\endgroup$
    – TimRias
    Sep 27, 2017 at 14:13
  • 1
    $\begingroup$ I get Underflow[] everywhere. You should try rescaling the problem so that the bulk of the function is greater than, say, 10^-308. Or if you know where the function has large values, add them to the interval: E.g., if f[200] does not underflow, then {x, -Infinity, 200, Infinity}. $\endgroup$
    – Michael E2
    Sep 28, 2017 at 11:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.