I wrote this little function
i[V_, d1_, d2_, T_] := Module[{eps, x},
eps = 0.005;
NIntegrate[
Re[Abs[x - V]/Sqrt[(x + I eps - V)^2 - d1^2]] Re[Abs[x]/
Sqrt[(x + I eps)^2 - d2^2]] (1/(Exp[(x - V)/T] + 1) - 1/(
Exp[x/T] + 1)), {x, -10 T - Abs[V], 10 T + Abs[V]},
WorkingPrecision -> 50, PrecisionGoal -> 10, MaxRecursion -> 50]
]
To calculate the IV characteristic of a SIS' junction.
When I request
i[0.75, 0.2, 0.4, 0.1]
I get a bunch of errors (NIntegrate::precw, NIntegrate::inumri) without a result (weirdly, it does that for these values specifically), the same as
With[{V = 0.75, d1 = 0.2, d2 = 0.4, T = 0.1, eps = 0.005},
NIntegrate[
Re[Abs[x - V]/Sqrt[(x + I eps - V)^2 - d1^2]] Re[Abs[x]/
Sqrt[(x + I eps)^2 - d2^2]] (1/(Exp[(x - V)/T] + 1) - 1/(
Exp[x/T] + 1)), {x, -10 T - Abs[V], 10 T + Abs[V]},
WorkingPrecision -> 50, PrecisionGoal -> 10, MaxRecursion -> 50]]
However, if I remove the WorkingPrecision, PrecisionGoal and MaxRecursion, I get the result of 0.588058 + 0. I. Why is that so?
SetPrecision[f, Infinity]orRationalize[f, 0]to the integrandf. – Michael E2 Dec 10 '18 at 12:32Overflow,Indeterminate, orInfinity-- not necessarilyIndeterminate. One might have numerical overflow or underflow even if there are no singularities. One clue is that that error goes away if you add the optionMethod -> {"GlobalAdaptive", "SymbolicProcessing" -> 0}. PerhapsIntegrationMonitorwould give more clues. It seems that it will take some time to debug it. – Michael E2 Dec 10 '18 at 20:10