# Simultaneous solving of three equations with nested, complicated expressions

I have the following variables s1, s2, and r1 defined as

s1 = 12 *g1^2 + 12 *g2^2 - Γ^2 + Γ*κ1 - κ1^2 + (Γ + κ1)*κ2 - κ2^2;
s2 = 4*s1^3 + 9*s1^2*(Γ + κ1 - 2 κ2)^2 + 6*s1*(Γ + κ1 - 2 κ2)*((Γ + κ1
-2κ2)^3+ 108*g2^2*(-Γ + κ2)) + ((Γ + κ1 - 2 κ2)^3 + 108*g2^2*(-Γ+κ2))^2;
r1 = Sqrt[s2] - (3*s1 + (Γ + κ1 - 2 κ2)^2)*(Γ + κ1 - 2*κ2) + 108*g2^2*(Γ-κ2);


Followed by three equations that contains s1, s2, and r1

o1 = 1/6*(Γ + κ1 + κ2 - s1*(2/r1)^(1/3) + (r1/2)^(1/3) - 6*I*ω);
o2 = 1/6*(Γ + κ1 + κ2 + s1*(1 + I*Sqrt[3])/(4*r1)^(1/3) - (1 - I*Sqrt[3])*
(r1/16)^(1/3) - 6*I*ω);
o3 = 1/6*(Γ + κ1 + κ2 + s1*(1 - I*Sqrt[3])/(4*r1)^(1/3) - (1 + I*Sqrt[3])*
(r1/16)^(1/3) - 6*I*ω);


I then wish to solve for the common value of g1 between o1, o2, and o3. I proceed to do

Solve[o1==o2==o3,g1]


But the compilation time becomes incredibly long (I have yet to compile it successfully). Given how computationally expensive it must be, are there any alternatives to solving the three equations simultaneously for g1 in a faster way?

Thanks!

• NO solution by NSolve, Try: Table[\[CapitalGamma] = RandomReal[{-1000, 1000}, 10][[k]]; \[Kappa]1 = RandomReal[{-1000, 1000}, 10][[k]]; \[Kappa]2 = RandomReal[{-1000, 1000}, 10][[k]]; \[Omega] = RandomReal[{-1000, 1000}, 10][[k]]; g2 = RandomReal[{-1000, 1000}, 10][[k]]; NSolve[o1 == o2 == o3 && -1000 < g1 < 1000, g1], {k, 1, 10}] – Mariusz Iwaniuk Aug 22 '18 at 22:08
• @MariuszIwaniuk Thanks for your help but upon running your solution, I was returned with a list with 10 braces: '{{}, {}, {}, {}, {}, {}, {}, {}, {}, {}}'. Moreover, it seems to me that you're replacing the variables with numbers using 'RandomReal' but I need the solution to be in the original algebraic expression. Do you have any ideas on how to go about solving this without substituting numbers? – kowalski Aug 23 '18 at 16:23
• @Bill I tried the suggested solution but I was returned with an error saying that parts of the argument in the 'Reduce' function is not a variable. Are there any alternatives to solving this? Thanks – kowalski Aug 23 '18 at 16:32
• NSolve needs numeric values for variables.From Documentation Center this 10 brances mean: No solution 10 times,because in Table[expr,{k,1,10}]. – Mariusz Iwaniuk Aug 23 '18 at 16:59
• This sol=NMinimize[Total[Abs[{Re[o1], Im[o1], Re[o2], Im[o2], Re[o3], Im[o3]}]], {g1, g2, \[CapitalGamma], \[Kappa]1, \[Kappa]2, \[Omega]}, WorkingPrecision->64, MaxIterations->10^4, Method->"RandomSearch"]; {Re[o1]+I Im[o1], Re[o2]+I Im[o2], Re[o3]+I Im[o3]} /. sol[[2]] finds an approximate numeric solution. Can you show an example from experience which has a symbolic solution? Perhaps that might give some insight. – Bill Aug 24 '18 at 16:52