0
$\begingroup$

I am a new to Mathematica. I want to calculate a triple integral but Mathematica returned SystemException["MemoryAllocationFailure"].

Could you please help me? I attached my code here.

ClearAll["Global`*"]
Ri = 10.5/10^3; 
Ro = 11.5/10^3; 
h = 1/10^3; 
c = 30/10^3; 
l = 3/10^3; 
μ = (4*Pi)/10^7; 
i0 = 1; 
f = 0.159*10^9; 
ω = 2*Pi*f; 
σ = 1; 
Subscript[Λ, 2] = Sqrt[γ^2 + I*ω*μ*σ]; 
ℒ = ((μ*Pi)/(h*(Ri - Ro))^2)*NIntegrate[(r*BesselJ[1, γ*r])*
     (R0*BesselJ[1, γ*R0])*((1 - E^((-h)*γ))^2/(E^(2*l*γ)*γ^2))*
     ((E^(2*c*γ + 2*(c + 2*h + l)*Subscript[Λ, 2])*
       (-1 + E^(2*c*Subscript[Λ, 2]))*(γ - Subscript[Λ, 2])*
       (γ + Subscript[Λ, 2])*
       ((-(E^(2*(2*h + l)*γ) + E^(2*c*Subscript[Λ, 2])))*
         (γ - Subscript[Λ, 2])^2 + 
        (1 + E^(4*h*γ + 2*l*γ + 2*c*Subscript[Λ, 2]))*(γ + Subscript[Λ, 2])^
          2))/(E^(2*(c + 2*h + l)*(γ + Subscript[Λ, 2]))*
        (γ - Subscript[Λ, 2])^4 + 
       E^(2*(c + 2*h + l)*γ + 2*(3*c + 2*h + l)*Subscript[Λ, 2])*
        (γ + Subscript[Λ, 2])^4 - E^(2*c*γ + 2*(c + 2*h + l)*Subscript[Λ, 2])*
        (2*E^(4*h*γ + 2*l*γ + 2*c*Subscript[Λ, 2]) + 
         (-1 + E^(2*c*Subscript[Λ, 2]))^2)*(γ^2 - Subscript[Λ, 2]^2)^2)), 
    {γ, 0, Infinity}, {r, Ri, Ro}, {R0, Ri, Ro}]

enter image description here

$\endgroup$
2

1 Answer 1

0
$\begingroup$

I changed some of the option values -- is this a result you expect:

Ri = 10.5/10^3;
Ro = 11.5/10^3;
h = 1/10^3;
c = 30/10^3;
l = 3/10^3;
\[Mu] = (4*Pi)/10^7;
i0 = 1;
f = 0.159*10^9;
\[Omega] = 2*Pi*f;
\[Sigma] = 1;

L2 = Sqrt[\[Gamma]^2 + I*\[Omega]*\[Mu]*\[Sigma]];

\[ScriptCapitalL] = ((\[Mu]*Pi)/(h*(Ri - Ro))^2)*
  NIntegrate[(r*BesselJ[1, \[Gamma]*r])*(R0*
      BesselJ[1, \[Gamma]*
        R0])*((1 - 
         E^((-h)*\[Gamma]))^2/(E^(2*
           l*\[Gamma])*\[Gamma]^2))*((E^(2*c*\[Gamma] + 
           2*(c + 2*h + l)*L2)*(-1 + E^(2*c*L2))*(\[Gamma] - 
          L2)*(\[Gamma] + 
          L2)*((-(E^(2*(2*h + l)*\[Gamma]) + E^(2*c*L2)))*(\[Gamma] - 
              L2)^2 + (1 + 
             E^(4*h*\[Gamma] + 2*l*\[Gamma] + 2*c*L2))*(\[Gamma] + 
              L2)^2))/(E^(2*(c + 2*h + l)*(\[Gamma] + L2))*(\[Gamma] -
             L2)^4 + 
        E^(2*(c + 2*h + l)*\[Gamma] + 
            2*(3*c + 2*h + l)*L2)*(\[Gamma] + L2)^4 - 
        E^(2*c*\[Gamma] + 2*(c + 2*h + l)*L2)*(2*
            E^(4*h*\[Gamma] + 2*l*\[Gamma] + 2*c*L2) + (-1 + 
              E^(2*c*L2))^2)*(\[Gamma]^2 - L2^2)^2)), {\[Gamma], 0, 
    Infinity}, {r, Ri, Ro}, {R0, Ri, Ro}, PrecisionGoal -> 3, 
   Method -> {"LocalAdaptive", "SymbolicProcessing" -> 0}]

(* -6.75294*10^-11 - 2.90231*10^-10 I *)
$\endgroup$
2
  • $\begingroup$ Thank you sir, I don't know yet but at least it works. I tried to test it with Matlab but Matlab returned me singularity. $\endgroup$
    – Shan
    Commented Aug 17, 2017 at 19:32
  • 1
    $\begingroup$ @Shan Ok, good luck with your work! $\endgroup$ Commented Aug 17, 2017 at 23:06

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.