$x = \frac{1}{\sqrt{2 \pi}}\int dz~ e^{-z^2/2}F(x,y;z,T,\Delta) $$q = \frac{1}{\sqrt{2 \pi}}\int dz~ e^{-z^2/2}F(q,\phi;z,\beta,\Delta, J) $
$y = \frac{1}{\sqrt{2 \pi}}\int dz~ e^{-z^2/2}G(x,y;z,T, \Delta) $$\phi = \frac{1}{\sqrt{2 \pi}}\int dz~ e^{-z^2/2}G(q,\phi;z,\beta, \Delta, J) $
As you may see they are self-consistent equations, the main problem is that the expressions for $F$ and $G$ are horrible (they involve error functions and exponential)quite involved, so in order to compute the Gaussian integral I have to use NIntegrateintegration over $z$ can only be achieved by a numerical integration. I have
My goal is to solve these self-consistent equations for sevaralseveral values of the parameters $\Delta$ and $T$$\beta$, then plot $x(T)$$x(\beta)$ for each valuedifferent values of $\Delta$. The problems I'm having areproceeding in the following way:
- There are some problems with NIntegrate, a lot of times it gives me an error indicating overflow, indeterminate form or infinite encountered.
- Those values that are successfully computed I have to insert them again until achieving convergence, nevertheless, a lot of those values are very small, hence even after the first iteration it gives back very small values and mathematica crashes, I want to take those values as zero.
- I want to find a way to automatize this process. I have used the functions Nest, NestWhile, FixedPoint, and related ones with no avail.
The functions $F$ and $G$ are actually fractions with a common denominator I define as
Den[\[CapitalDelta]_, J_, \[Beta]_, q_, \[Phi]_, z_] =
(1/\[CapitalDelta])*Integrate[Exp[(-2^(-1))*(q - \[Phi])*\[Beta]^2*J^2*t^2]*
Cosh[\[Beta]*J*Sqrt[q]*z*t], {t, 1 - \[CapitalDelta]/2, 1 + \[CapitalDelta]/2}]
If someone is ableThen we comput the full functions $F$ and $G$, defined as fractionq and fraction$\phi$ in the latex code
fractionq[\[CapitalDelta]_, J_, \[Beta]_, q_, \[Phi]_] = 1/\[CapitalDelta]*Integrate[Exp[-1/2 (q-\[Phi]) \[Beta]^2 J^2 t^2] (t^2 Cosh[\[Beta] J Sqrt[q] z t]- z t /(\[Beta] J Sqrt[q])Sinh[\[Beta] J Sqrt[q]z t]),{t, 1-\[CapitalDelta]/2,1+\[CapitalDelta]/2}]/Den[\[CapitalDelta], J, \[Beta], q, \[Phi], z]
fraction\[Phi][\[CapitalDelta]_, J_, \[Beta]_, q_, \[Phi]_] = 1/\[CapitalDelta]*Integrate[Exp[-1/2 (q-\[Phi]) \[Beta]^2 J^2 t^2] t^2 Cosh[\[Beta] J Sqrt[q] z t],{t, 1-\[CapitalDelta]/2,1+\[CapitalDelta]/2}]/Den[\[CapitalDelta], J, \[Beta], q, \[Phi], z]
We then prepare the HoldForm of the numerical integration over $z$
RHSq[\[CapitalDelta]_, J_, \[Beta]_, q_, \[Phi]_]:= NIntegrate[1/Sqrt[2 Pi] Exp[-1/2 z^2] fractionq[\[CapitalDelta], J, \[Beta], q, \[Phi]], {z, -Infinity, Infinity},
PrecisionGoal->4, WorkingPrecision->10, AccuracyGoal->10, MinRecursion->2]
RHS\[Phi][\[CapitalDelta]_, J_, \[Beta]_, q_, \[Phi]_]:= NIntegrate[1/Sqrt[2 Pi] Exp[-1/2 z^2] fraction\[Phi][\[CapitalDelta], J, \[Beta], q, \[Phi]], {z, -Infinity, Infinity},
PrecisionGoal->4, WorkingPrecision->10, AccuracyGoal->10, MinRecursion->2]
And finally we defined the ordered pair {RHSq, RHS$\phi$} to at least shedwhich we are going to apply a lightfunction (either FixedPoint, Nest, NestWhile) in order to solve iteratively for several values of $\beta$ and $\Delta$.
newpairs[\[CapitalDelta]_, J_, \[Beta]_][{q_, \[Phi]_}]:={RHSq[\[CapitalDelta], J, \[Beta], q, \[Phi]], RHS\[Phi][\[CapitalDelta], J, \[Beta], q, \[Phi]]}
Table[FixedPoint[newpairs[0.2, 1, \[Beta]],{1.5,1}],{\[Beta],\[Beta]list}]
where $\beta$list is just a list of the different values of $\beta$ I want to generate. The following are the error outputs displayed while running this problem I'llroutine:
NIntegrate::inumri "The integrand ... has evaluated to Overflow, Indeterminate, or Infinity for all
sampling points in the region with boundaries
{{-[Infinity],-3.000000000}}"
General::stop "Further output of NIntegrate::inumri will be extremely gratefulsuppressed during this
calculation"
NIntegrate::write "tag Times in -z is Protected"
several times