1
$\begingroup$

I have two function, $\alpha20$ and $\alpha22$, which are given in terms of some integrals. They depend on some parameters. I fix most of them except $(T,\mu)$. I want to find the roots of these function (equivalently finding $T$) for various parameter $\mu$. I used Findroot but no success specially when I am working with $\alpha22$. These are my functions:

α20[(A_)?NumberQ, (μ_)?NumberQ, (T_)?NumberQ, (ω_)?
   NumberQ, (lMin_)?NumberQ, (lMax_)?NumberQ, (Nf_)?NumberQ, (Nc_)?
   NumberQ, 
     (b_)?NumberQ, (Λ_)?NumberQ, (r_)?
   NumberQ] := Λ^2/(2*b) - 
  A^2*((Nf*Nc)/(8*Pi^2))*
   NIntegrate[1/τ^2, {τ, Λ^(-2), Infinity}, 
         Method -> {"LocalAdaptive", "SymbolicProcessing" -> 0}, 
    AccuracyGoal -> 10] + 
     A^2*((Nf*Nc)/(4*Pi^2))*
   Sum[NIntegrate[
     p*(BesselJ[ℓ, p*r]^2 + BesselJ[ℓ + 1, p*r]^2)*
             (1/(E^((Sqrt[
                 k^2 + p^2] - μ - ω*(ℓ + 1/2))/
              T)*((1 + 
               E^(-((Sqrt[
                    k^2 + p^2] - μ - ω*(ℓ + 1/2))/
                    T)))*Sqrt[k^2 + p^2])) + 
                
        1/(E^((Sqrt[k^2 + p^2] + μ + ω*(ℓ + 1/2))/
              T)*((1 + 
               E^(-((Sqrt[
                    k^2 + p^2] + μ + ω*(ℓ + 1/2))/
                    T)))*Sqrt[k^2 + p^2]))), 
           {p, 0, Infinity}, {k, 0, Infinity}, 
     Method -> {"LocalAdaptive", "SymbolicProcessing" -> 0}, 
     AccuracyGoal -> 10], 
         {ℓ, lMin, lMax, 1}]

and

α22[(A_)?NumberQ, (μ_)?NumberQ, (T_)?NumberQ, (ω_)?
    NumberQ, (lMin_)?NumberQ, (lMax_)?NumberQ, (Nf_)?NumberQ, (Nc_)?
    NumberQ, 
       (b_)?NumberQ, (Λ_)?NumberQ, (r_)?NumberQ] := 
  A^2*((Nf*Nc)/(2*Pi^(5/2)))*
    NIntegrate[(1/τ^(1/2))*((3 - 2*k^2*τ)/E^(k^2*τ)), 
           {k, 0.000001, Infinity}, {τ, Λ^(-2), 
      Infinity}, 
     Method -> {"LocalAdaptive", "SymbolicProcessing" -> 0}, 
     AccuracyGoal -> 10] - 
       A^2*((Nf*Nc)/(4*Pi^2))*T*
    Sum[NIntegrate[
      p*(BesselJ[ℓ, p*r]^2 + 
         BesselJ[ℓ + 1, p*r]^2)*
               ((3*E^((3*Sqrt[k^2 + p^2])/T)*p^2*T^2 + 
           6*E^((3*μ)/T)*p^2*T^2 + 
           3*E^((3*(Sqrt[k^2 + p^2] + 
                   2*(μ + ω*(ℓ + 1/2))))/T)*p^2*
                       T^2 + 
           9*E^((3*Sqrt[k^2 + p^2] + 
                 2*(μ + ω*(ℓ + 1/2)))/T)*p^2*
            T*(2*Sqrt[k^2 + p^2] + 3*T) + 
                     
           9*E^((3*Sqrt[k^2 + p^2] + 
                 4*(μ + ω*(ℓ + 1/2)))/T)*p^2*
            T*(2*Sqrt[k^2 + p^2] + 3*T) - 
                     
           E^((5*Sqrt[k^2 + p^2] + 
                 2*(μ + ω*(ℓ + 1/2)))/T)*(k^4 + 
              k^2*p^2 - 3*p^2*T*(Sqrt[k^2 + p^2] + T)) - 
                     
           6*E^((4*Sqrt[k^2 + p^2] + 
                 3*(μ + ω*(ℓ + 1/2)))/T)*(k^4 + 
              k^2*p^2 - 3*p^2*T*(Sqrt[k^2 + p^2] + T)) - 
                     
           E^((5*Sqrt[k^2 + p^2] + 
                 4*(μ + ω*(ℓ + 1/2)))/T)*(k^4 + 
              k^2*p^2 - 3*p^2*T*(Sqrt[k^2 + p^2] + T)) + 
                     
           E^((4*Sqrt[
                   k^2 + p^2] + (μ + ω*(ℓ + 
                    1/2)))/T)*(k^4 + k^2*p^2 + 
              3*p^2*T*(Sqrt[k^2 + p^2] + 2*T)) + 
                     
           6*E^((2*Sqrt[k^2 + p^2] + 
                 3*(μ + ω*(ℓ + 1/2)))/T)*(k^4 + 
              k^2*p^2 + 3*p^2*T*(Sqrt[k^2 + p^2] + 2*T)) + 
                     
           E^((4*Sqrt[k^2 + p^2] + 
                 5*(μ + ω*(ℓ + 1/2)))/T)*(k^4 + 
              k^2*p^2 + 3*p^2*T*(Sqrt[k^2 + p^2] + 2*T)) - 
                     
           
           E^((2*Sqrt[
                   k^2 + p^2] + (μ + ω*(ℓ + 
                    1/2)))/T)*(k^4 + k^2*p^2 - 
              3*p^2*T*(Sqrt[k^2 + p^2] + 4*T)) - 
                     
           E^((2*Sqrt[k^2 + p^2] + 
                 5*(μ + ω*(ℓ + 1/2)))/T)*(k^4 + 
              k^2*p^2 - 3*p^2*T*(Sqrt[k^2 + p^2] + 4*T)) + 
                     
           E^((Sqrt[k^2 + p^2] + 
                 2*(μ + ω*(ℓ + 1/2)))/T)*(k^4 + 
              k^2*p^2 + 3*p^2*T*(Sqrt[k^2 + p^2] + 5*T)) + 
                     
           E^((Sqrt[k^2 + p^2] + 
                 4*(μ + ω*(ℓ + 1/2)))/T)*(k^4 + 
              k^2*p^2 + 3*p^2*T*(Sqrt[k^2 + p^2] + 5*T)))/
                  ((E^(Sqrt[k^2 + p^2]/T) + 
              E^((μ + ω*(ℓ + 1/2))/T))^3*(1 + 
              E^((Sqrt[
                    k^2 + p^2] + μ + ω*(ℓ + 1/2))/
                 T))^3*(k^2 + p^2)^(5/2)*
                     T^2)), {p, 0.000001, Infinity}, {k, 0.000001, Infinity}, 
      Method -> {"LocalAdaptive", "SymbolicProcessing" -> 0}, 
      AccuracyGoal -> 10], 
           {ℓ, lMin, lMax, 1}]; 

I use Findroot to find $T$ for different values of $\mu$. But the code run for a long period of time and I do not receive any results (specially for $\alpha22$).This is my sample code

Block[{A = N[1], lMin = -2, lMax = 2, Nf = 2, 
  Nc = 3, Λ = 0.86, r = 0.1, 
  b = 11, ω = 0.05}, 
   list = {}; 
 Table[roots = 
   FindRoot[α22[A, μ, T, ω, lMin, lMax, Nf, Nc, 
     b, Λ, r], {T, 0.05}, Method -> "Newton"]; 
roots2 = 
   FindRoot[α20[A, μ, T, ω, lMin, lMax, Nf, Nc, 
     b, Λ, r], {T, 0.05}, Method -> "Newton"]; 
       AppendTo[
   list, {roots[[1, 2]],roots2[[1, 2]], μ, ω}]; , {μ, 
   0.36, 0.4, 0.005}]]

Is there a way to find roots of these function? I also want the code run a bit faster! Any help is appreciated.

$\endgroup$
4
  • $\begingroup$ This is a bit of a code dump, with some obviously nasty complex integrations. You will need to do a little more troubleshooting yourself to try and pinpoint a specific problem we can help with. Otherwise people may not be that interested in troubleshooting your code for you, since the work is unlikely to help others in the future. For example, were you able to get FindRoot to work on one sample case before launching on the full parameter search with Table? $\endgroup$
    – MarcoB
    Commented Jan 7, 2023 at 16:22
  • $\begingroup$ Thanks for the comment. Yes, apart from some convergence issue in the integrals, I could find $\alpha20$ for specific value of $\mu$. But I could not find any results for $\alpha22$. I am just wondering if there exists another way to find roots avoiding to use FindRoot!> $\endgroup$
    – MohA
    Commented Jan 7, 2023 at 16:48
  • $\begingroup$ Can you approximate your functions at all? You have numerical integration and also summation over all $k$. Evaluation will be very slow. For example, could part of the summation range be cut off? (By the way, is this a QCD problem?) $\endgroup$ Commented Jan 7, 2023 at 17:01
  • $\begingroup$ I cannot simplify these expression further.The range of summation was larger but I kept only those with larger contribution. (Yes, this is a QCD problem) $\endgroup$
    – MohA
    Commented Jan 7, 2023 at 17:22

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.