I want to compute the following integral as a function of some positive real parameters, $a, \rho, \lambda$ and three positive real variables $L_a, L_b, L_c$:
Clear["Global`*"]
hfun[h_, J1_, J2_] := Sign[h] (Abs[h] - (Abs[J2] - Abs[J1]))/2
Jfun[h_, J1_, J2_] := (Abs[J2] + Abs[J1] - Abs[h])/2
Field1Evolution[h_, J1_, J2_] :=
Piecewise[{{Sign[h] J1,
Abs[J2] > Abs[J1] &&
Abs[h] > Abs[J1] + Abs[J2]}, {Sign[J1] hfun[h, J1, J2],
Abs[J2] > Abs[J1] && (Abs[J2] + Abs[J1]) >
Abs[h] && (Abs[J2] - Abs[J1]) < Abs[h]}, {0,
Abs[J2] > Abs[J1] && (Abs[J2] - Abs[J1]) > Abs[h]}, {Sign[h] J1,
Abs[J1] > Abs[J2] &&
Abs[h] > Abs[J2] + Abs[J1]}, {Sign[J1] hfun[h, J1, J2],
Abs[J1] > Abs[J2] && (Abs[J2] + Abs[J1]) >
Abs[h] && (Abs[J1] - Abs[J2]) < Abs[h]}, {Sign[J1] h,
Abs[J1] > Abs[J2] && (Abs[J1] - Abs[J2]) > Abs[h]}}]
Field2Evolution[h_, J1_, J2_] :=
Piecewise[{{Sign[h] J2,
Abs[J2] > Abs[J1] &&
Abs[h] > Abs[J1] + Abs[J2]}, {Sign[J2] hfun[h, J2, J1],
Abs[J2] > Abs[J1] && (Abs[J2] + Abs[J1]) >
Abs[h] && (Abs[J2] - Abs[J1]) < Abs[h]}, {Sign[J2] h,
Abs[J2] > Abs[J1] && (Abs[J2] - Abs[J1]) > Abs[h]}, {Sign[h] J2,
Abs[J1] > Abs[J2] &&
Abs[h] > Abs[J2] + Abs[J1]}, {Sign[J2] hfun[h, J2, J1],
Abs[J1] > Abs[J2] && (Abs[J2] + Abs[J1]) >
Abs[h] && (Abs[J1] - Abs[J2]) < Abs[h]}, {0,
Abs[J1] > Abs[J2] && (Abs[J1] - Abs[J2]) > Abs[h]}}]
CouplingEvolution[h_, J1_, J2_] :=
Piecewise[{{0,
Abs[J2] > Abs[J1] &&
Abs[h] > Abs[J1] + Abs[J2]}, {Sign[J1*J2] Jfun[h, J1, J2],
Abs[J2] > Abs[J1] && (Abs[J2] + Abs[J1]) >
Abs[h] && (Abs[J2] - Abs[J1]) < Abs[h]}, {Sign[J2] J1,
Abs[J2] > Abs[J1] && (Abs[J2] - Abs[J1]) > Abs[h]}, {0,
Abs[J1] > Abs[J2] &&
Abs[h] > Abs[J2] + Abs[J1]}, {Sign[J1*J2] Jfun[h, J2, J1],
Abs[J1] > Abs[J2] && (Abs[J2] + Abs[J1]) >
Abs[h] && (Abs[J1] - Abs[J2]) < Abs[h]}, {Sign[J1] J2,
Abs[J1] > Abs[J2] && (Abs[J1] - Abs[J2]) > Abs[h]}}]
R32[h1_, h2_, J12_, J23_, J13_] :=
UnitStep[
Abs[J23 + CouplingEvolution[h1, J13, J12]] -
Abs[h2 + Field2Evolution[h1, J13, J12]]]
P[J_, L_] := -2 a L \[Lambda]^L DiracDelta[J] +
a*L^2*\[Lambda]^L*\[Rho]*Exp[-\[Rho]*L*Abs[J]]
Assuming[Element[{La, Lb, Lc, a, \[Rho], \[Lambda]}, PositiveReals],
Integrate[
P[J12, La]*P[J23, Lb]*P[J13, Lc]*
R32[h1, h2, J12, J23,
J13], {J12, -\[Infinity], \[Infinity]}, {J13, -\[Infinity], \
\[Infinity]}, {J23, -\[Infinity], \[Infinity]}, {h1, -\[Infinity], \
\[Infinity]}, {h2, -\[Infinity], \[Infinity]}]]
I expect something like the following function: $$ \frac{a^3}{\rho^2}\frac{L_aL_b+L_aL_c+L_cL_b}{L_a+L_b+L_c}\lambda^{L_a+L_b+L_c}\, . $$ I tried with the previous code but it seems like Mathematica cannot compute it all. Do you have any suggestion?
Simplify
the problem and see what happens. In this case I triedSimplify[integrand,all6variablesofintegrationPositive]
and that resulted in an expression independent of the integration times a simplerPiecewise
which appears to have a value of either zero or one over each part of the domain. Pulling the independent expression outside the integral would help, but it still takes so long that I bailed out. Scaling the problem up to all six variables being positive or negative would likely take considerably longer. with many more parts $\endgroup$