1
$\begingroup$

I am trying to solve these equations and want to plot the value of $a^{\dagger}a$ versus P0. I have tried this code but this gives me an error like "Conjunction::argr: Conjunction called with 1 argument; 2 arguments are expected. >>". If there is another method to solve this I don't know. If anybody can solve this will be appreciated.

delta = 4;
g0 = 1;
Pb = 2;
KL = 1;
kb = 0.2;
ome1 = 1;
gma = 0.02;
nth = 2;
Lf = Conjugate[a1]*b1;
Bf = a1*b1;
NL = Conjugate[a1]*a1;
sol = NSolve[{I*P0*(Conjugate[a1] - a1) + 
      I*Pb*(Lf - Conjugate[Lf] + Conjugate[Bf] - Bf) - KL*NL - 
      kb*(Lf*a1 + Conjugate[Lf]*Conjugate[a1] + Bf*Conjugate[a1] + 
         Conjugate[Bf]*
          a1 + (NL - 2*Abs[a1]^2)*(b1 + Conjugate[b1])) == 0, 
    I*g0*((NL - 2*Abs[a1]^2)*(Conjugate[b1] - b1) + 
         Conjugate[Lf]*Conjugate[a1] - Lf*a1 + Conjugate[Bf]*a1 - 
         Bf*Conjugate[a1]) + 
      I*Pb*(Conjugate[Bf] - Lf + Conjugate[Lf] - Bf) - 
      gma*Conjugate[b1]*b1 + gma*nth == 
     0, -I*delta*Lf - I*ome1*Lf + 
      I*g0*((2*NL - Abs[a1]^2 - Conjugate[b1]*b1 + 2*Abs[b1]^2 + 
            b1^2)*Conjugate[a1] - (Conjugate[Bf] + 2*Lf)*b1 - 
         Lf*Conjugate[b1]) - I*P0*b1 == 0, 
    I*delta*Bf - I*ome1*Bf + 
      I*g0*((2*NL - Abs[a1]^2 + Conjugate[b1]*b1 - 2*Abs[b1]^2)*
          a1 + (2*Bf - a1*b1 + Conjugate[Lf])*b1 + Bf*Conjugate[b1]) +
       I*P0*b1 + 
      I*Pb*(NL + Conjugate[b1]*b1 + a1^2 + b1^2 + 1) - (KL + gma)*
       Bf/2 - kb/
        2*((2*Bf - a1*b1 + Conjugate[Lf])*
          b1 + (Conjugate[b1]*b1 - 2*Abs[b1]^2)*a1 + 
         Bf*Conjugate[b1]) == 0, 
    I*delta*a1 + I*delta*a1 + I*g0*(Conjugate[Lf] + Bf) + I*P0 + 
      I*Pb*(b1 + Conjugate[b1]) - KL*a1/2 - 
      kb*(Conjugate[Lf] + Bf)/2 == 
     0, -I*ome1*b1 + I*g0*NL + I*Pb*(a1 + Conjugate[a1]) - gma*b1/2 ==
      0}, {a1, b1}];
Plot[{Evaluate[Conjugate[a1]*a1] /. sol}, {P0, 0, 30}]
$\endgroup$
5
  • 4
    $\begingroup$ You have one Conjunction[b] in your code and since you have dozens of Conjugate perhaps you just misspelled the first one. As an experiment I changed that to Conjugate and ran the code. It grinds for a while. I don't know whether it is going to finish or not. Maybe you can let it run for a while, minutes or an hour, and report back what it gives you. $\endgroup$
    – Bill
    Jun 29, 2020 at 4:21
  • 1
    $\begingroup$ The equations in NSolve have the undefined variables {b, ig0, Kb, kL, ome1}. Please provide their values. $\endgroup$
    – Bob Hanlon
    Jun 29, 2020 at 4:51
  • $\begingroup$ There are what seem to me multiple typos. For example, you have ig0 which should probably be I * g0, you have Conjunction[b] which should be Conjugate[b1] etc. $\endgroup$ Jun 29, 2020 at 4:58
  • $\begingroup$ Thanks for selecting these errors but sir, still it is running for more than one hour. $\endgroup$
    – vidya
    Jun 29, 2020 at 10:12
  • $\begingroup$ Do you have any reason to believe that it should be faster? You have a non-linear system with 6 equations, 2 unknowns and their conjugates, and a generic constant. You could try some special cases, e.g. $|a_1|=|b_1|=1$ that will simplify the equations to some extent, and see if the system can be solved then. $\endgroup$ Jun 29, 2020 at 11:06

1 Answer 1

1
$\begingroup$
Clear["Global`*"]

Use exact values for the constants to facilitate simplification.

delta = 4;
g0 = 1;
Pb = 2;
KL = 1;
kb = 2/10;
ome1 = 1;
gma = 2/100;
nth = 2;
Lf = Conjugate[a1]*b1;
Bf = a1*b1;
NL = Conjugate[a1]*a1;

eqns = And @@ 
   Simplify[{I*P0*(Conjugate[a1] - a1) + 
       I*Pb*(Lf - Conjugate[Lf] + Conjugate[Bf] - Bf) - KL*NL - 
       kb*(Lf*a1 + Conjugate[Lf]*Conjugate[a1] + Bf*Conjugate[a1] + 
          Conjugate[Bf]*a1 + (NL - 2*Abs[a1]^2)*(b1 + Conjugate[b1])) == 0, 
     I*g0*((NL - 2*Abs[a1]^2)*(Conjugate[b1] - b1) + 
          Conjugate[Lf]*Conjugate[a1] - Lf*a1 + Conjugate[Bf]*a1 - 
          Bf*Conjugate[a1]) + I*Pb*(Conjugate[Bf] - Lf + Conjugate[Lf] - Bf) -
        gma*Conjugate[b1]*b1 + gma*nth == 
      0, -I*delta*Lf - I*ome1*Lf + 
       I*g0*((2*NL - Abs[a1]^2 - Conjugate[b1]*b1 + 2*Abs[b1]^2 + b1^2)*
           Conjugate[a1] - (Conjugate[Bf] + 2*Lf)*b1 - Lf*Conjugate[b1]) - 
       I*P0*b1 == 0, 
     I*delta*Bf - I*ome1*Bf + 
       I*g0*((2*NL - Abs[a1]^2 + Conjugate[b1]*b1 - 2*Abs[b1]^2)*
           a1 + (2*Bf - a1*b1 + Conjugate[Lf])*b1 + Bf*Conjugate[b1]) + 
       I*P0*b1 + 
       I*Pb*(NL + Conjugate[b1]*b1 + a1^2 + b1^2 + 1) - (KL + gma)*Bf/2 - 
       kb/2*((2*Bf - a1*b1 + Conjugate[Lf])*
           b1 + (Conjugate[b1]*b1 - 2*Abs[b1]^2)*a1 + Bf*Conjugate[b1]) == 0, 
     I*delta*a1 + I*delta*a1 + I*g0*(Conjugate[Lf] + Bf) + I*P0 + 
       I*Pb*(b1 + Conjugate[b1]) - KL*a1/2 - kb*(Conjugate[Lf] + Bf)/2 == 
      0, -I*ome1*b1 + I*g0*NL + I*Pb*(a1 + Conjugate[a1]) - gma*b1/2 == 0}];

Convert a1 and b1 to Cartesian form so that all unknowns are real.

eqns2 = Assuming[Element[{x1, y1, x2, y2, P0}, Reals],
  (eqns /. {a1 -> x1 + I*y1, b1 -> x2 + I*y2}) // 
   ComplexExpand // FullSimplify]

(* False *)

This indicates that the equations are inconsistent. Further, there are too many equations for the number of unknowns, so the system is overdetermined.

$\endgroup$
2
  • $\begingroup$ Sir, thankyou for your response. After your code, I write $Plot[{Evaluate[x1^2 + y1^2] /. eqns2}, {P0, 0, 30}]$ and then run the program but it is showing this error: {False} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing. >> and General::stop: Further output of ReplaceAll::reps will be suppressed during this calculation. >> $\endgroup$
    – vidya
    Jun 29, 2020 at 16:36
  • $\begingroup$ eqns2 is not a Rule (LHS -> RHS) or a set of rules so it makes no sense to place it after ReplaceAll. You should determine why your equations are inconsistent. $\endgroup$
    – Bob Hanlon
    Jun 29, 2020 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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