1
$\begingroup$

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?

$\endgroup$
4
  • $\begingroup$ Can you, please, clarify what it is that you get as an output using this code, if anything? $\endgroup$ Commented Apr 30 at 3:13
  • $\begingroup$ When a big complicated problem won't finish I try to Simplify the problem and see what happens. In this case I tried Simplify[integrand,all6variablesofintegrationPositive] and that resulted in an expression independent of the integration times a simpler Piecewise 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$
    – Bill
    Commented Apr 30 at 5:34
  • $\begingroup$ @CATrevillian the function of $L_a,L_b,L_c$ I wrote as the "expected result$ may be the output of the last line, the Integrate. $\endgroup$ Commented Apr 30 at 7:20
  • $\begingroup$ @Bill thanks for the comment, it is a good idea! $\endgroup$ Commented Apr 30 at 7:21

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.