1
$\begingroup$

In my problem I need to plot roots with respect to a parameter. But the condition for root is det(Function)=0. This function cannot be solved symbolically. So I need to put in a parameter value and guess the value of the root. I am not able to get my desired result. Any help will be highly appreciated. Below is my Mathematica code.

   Δ = 0*0.5;
   λ = .5;
    u = .3;
    δ = (0.5*α)/ 1 - u);
    a1 = λ^2 + Δ^2 + δ^2 - Ω^2
    a2 = 2*Δ*λ
    a3 = 2*Δ*δ
    a4 = 2*δ*λ
    L = a1 - a2*Sin[2*x] + a3*Cos[x] - a4*Sin[x]
    a11 = -((Δ*Sin[x] - λ*Cos[x])^2/L)
    a12 = -2 ((Δ*Sin[x] - λ*Cos[x]) (λ*
    Sin[x] - Δ*Cos[x] - δ))/L
   a13 = -2 Ω (Δ*Sin[x] - λ*Cos[x])/L
    a21 = a12
   a22 = -2 (λ*Sin[x] - Δ*Cos[x] - δ)^2/L
  a23 = -I*2*Ω (λ*Sin[x] - Δ*
   Cos[x] - δ)/L
   a31 = -a13
   a32 = -a23
   a33 = -2 (1 + Ω^2/L)

           ListPlot[Table[{Ω, Max[Table[If[(Im[Det[({
         {(1 + u/(4 π)*NIntegrate[a11, {x, 0, 2 π}]), 
          u/(4 π)*NIntegrate[a12, {x, 0, 2 π}], 
          u/(4 π)*NIntegrate[a13, {x, 0, 2 π}]},
         {
          u/(4 π)*
           NIntegrate[a12, {x, 0, 2 π}], (1 + 
            u/(4 π)*NIntegrate[a22, {x, 0, 2 π}]), 
          u/(4 π)*NIntegrate[a23, {x, 0, 2 π}]},
         {-(u/(4 π))*
           NIntegrate[a13, {x, 0, 2 π}], -(u/(4 π))*
           NIntegrate[a23, {x, 0, 2 π}], (1 + 
            u/(4 π)*NIntegrate[a33, {x, 0, 2 π}])}
        })]]
     + Re[Det[({
         {(1 + u/(4 π)*NIntegrate[a11, {x, 0, 2 π}]), 
          u/(4 π)*NIntegrate[a12, {x, 0, 2 π}], 
          u/(4 π)*NIntegrate[a13, {x, 0, 2 π}]},
         {
          u/(4 π)*
           NIntegrate[a12, {x, 0, 2 π}], (1 + 
            u/(4 π)*NIntegrate[a22, {x, 0, 2 π}]), 
          u/(4 π)*NIntegrate[a23, {x, 0, 2 π}]},
         {-(u/(4 π))*
           NIntegrate[a13, {x, 0, 2 π}], -(u/(4 π))*
           NIntegrate[a23, {x, 0, 2 π}], (1 + 
            u/(4 π)*NIntegrate[a33, {x, 0, 2 π}])}
        })]]) <= .0000000, λ, 0]
 , {λ, 0, 8, 0.1}]]}, {Ω, 0, 8, 0.1}], 
   Joined -> True]
$\endgroup$
3
  • 2
    $\begingroup$ You need to reduce your problem to a minimal example in order to be more likely to receive help. I, for one, am intimidated by all your code... $\endgroup$
    – MarcoB
    Aug 23, 2015 at 4:40
  • $\begingroup$ yeaph i am working on it. $\endgroup$ Aug 24, 2015 at 5:23
  • 2
    $\begingroup$ I'm voting to close this question as off-topic because it is too localized; i.e, it applies only to the local situation and needs of its poster and answers will not benefit others. $\endgroup$
    – m_goldberg
    Feb 19, 2016 at 15:22

0

Browse other questions tagged or ask your own question.