# solving complicated non linear equation

F1= (0.291667 (0.019307 a^0.714286 (0.01 - b^2) +
0.538462 (-0.00019307 a^0.714286 + b^3 (a b)^0.714286)))/( 0.005 - b^2/2) + (-0.0369729 b^3 (a b)^1.25 + b^2 (0.0112624 a^0.714286 - 0.583333 b (a b)^0.714286 + 0.0785674 b (a b)^1.25))/b^2 == 1
F2= -0.1767766952966369 (a b)^1.25 == 10


I have these two equations. I am trying to solve for a and b. I am trying to use

F12=Solve[{F1,F2},{a,b}]


but I have not been able to arrive at a solution. I left the running program for 12 hours still it couldn't solve. What could be the possible way to go about it??

Use FindRoot. For instance,

FindRoot[{F1, F2}, {a, 1}, {b, 1}]
(* {a -> 159.394 + 183.253 I, b -> -0.101258 + 0.0233462 I} *)


Undoubtedly, there are more roots, which probably can be found by using other initial guesses for a and b. Here are a few more:

FindRoot[{F1, F2}, {a, -1}, {b, I}]
(* {a -> -24.6984 - 208.039 I, b -> 0.0818061 - 0.0884339 I} *)

FindRoot[{F1, F2}, {a, -1}, {b, 10 + I}]
(* {a -> 354.985 - 194.022 I, b -> -0.0618751 + 0.00797092 I} *)


Complex conjugates of these three roots also are roots.

You can get all solutions with NSolve, if you solve the second equation for b and insert it in the first equation.

Here I defined your equations F1, F2 as functions FF1,FF2 and rationalized.

FF1 = Rationalize[(0.291667 (0.019307 a^0.714286 (0.01 - b^2) +
0.538462 (-0.00019307 a^0.714286 +
b^3 (a b)^0.714286)))/(0.005 -
b^2/2) + (-0.0369729 b^3 (a b)^1.25 +
b^2 (0.0112624 a^0.714286 - 0.583333 b (a b)^0.714286 +
0.0785674 b (a b)^1.25))/b^2 - 1, 0];
FF2 = Rationalize[-0.1767766952966369 (a b)^1.25 - 10, 0];

solb = Solve[FF2 == 0, b]

(*     {{b -> -((28 (-1)^(1/5) (7/13)^(3/5) 2^(2/5) (1114457/45697)^(4/5))/(
13 a))}, {b -> (28 (-1114457)^(4/5) (7/13)^(3/5) 2^(2/5))/(
13 45697^(4/5) a)}}     *)

f1[a_] = FF1 /. First@solb;

f2[a_] = FF1 /. Last@solb;


A contourplot gives an impression, where solutions are to be expected

ContourPlot[{Re@f1[x + I y], Im@f1[x + I y]}, {x, -1000,
1000}, {y, -1000, 1000}, MaxRecursion -> 8, FrameLabel -> {x, y}] But see later: not all appearend crossings in the graph are solutions.

NSolve of only one variable together with limits for that variable works and gives all solutions

nsol1 = NSolve[
f1[a] == 0 && -1000 < Re[a] < 1000 && -1000 < Im[a] < 1000, a]

(*     {{a -> -24.6984 - 208.039 I}, {a ->
159.394\[VeryThinSpace]+ 183.253 I}, {a ->
354.985\[VeryThinSpace]+ 194.022 I}}     *)

{a, b} /. First@solb /. nsol1

(*     {{-24.6984 - 208.039 I,
0.0818061\[VeryThinSpace]- 0.0884339 I}, {159.394\               [VeryThinSpace]+
183.253 I, -0.101258 + 0.0233462 I}, {354.985\[VeryThinSpace]+
194.022 I, -0.0618751 - 0.00797092 I}}     *)


Test, whether the defined functions equal 0

 {FF1, FF2} /. First@solb /. nsol1

(*     {{-2.19499*10^-11 - 1.76362*10^-11 I,
0}, {-1.40782*10^-11 + 2.105*10^-11 I,
0}, {-4.76525*10^-11 - 5.86145*10^-12 I, 0}}     *)


Do the same with f2 and you get the conjugate solutions (here with higher WorkingPrecision)

nsol2 = NSolve[
f2[a] == 0 && -1000 < Re[a] < 1000 && -1000 < Im[a] < 1000, a,
WorkingPrecision -> 30]

{FF1, FF2} /. Last@solb /. nsol2

(*     {{0.*10^-29 + 0.*10^-29 I, 0}, {0.*10^-29 + 0.*10^-29 I,
0}, {0.*10^-29 + 0.*10^-29 I, 0}}     *)


If you dont rationalize, you get a forth solution which is not shown in the graph

(*     {{a -> -204.182 + 148.347 I}, {a -> -24.6984 + 208.039 I}, {a ->
159.394\[VeryThinSpace]- 183.253 I}, {a ->
354.985\[VeryThinSpace]- 194.022 I}}     *)


This root can be veryfied with FindRooot

fr = FindRoot[Rationalize[f1[a], 0] == 0, {a, 210 - 160 I},
WorkingPrecision -> 50]

(*     {a -> -204.18206255433842217845791785757110447325804670280 +
148.34702306645915046307213403659551265351451884028 I}     *)

{FF1, FF2} /. First@solb /. fr

(*     {0.*10^-49 + 0.*10^-49 I, 0}     *)