Solving 5 nonlinear equations, is there a suitable way?
AbsoluteTiming[
xyz = Reduce[{exp1, exp2, exp3, exp4, exp5, Element[{x, y, z}, Reals]}, {x, y, z}, {a, b}];
ans = NSolve[{exp1, exp2, exp3, xyz}, {x, y, z, a, b}] // Quiet;
]
ans
{exp1, exp2, exp3, exp4, exp5} /. ans
Output
{0.466927, Null}
{{x -> 0.222444, y -> -2.15701, z -> -0.686049, a -> -0.200401, b -> 2.10858},
{x -> 0.155142, y -> 0.904622, z -> 0.950293, a -> -0.0124473, b -> 0.489938},
{x -> -1.95192, y -> -0.545867, z -> 0.119973, a -> 0.00314125, b -> -0.0762384},
{x -> 1.13873, y -> 1.76806, z -> -0.573138, a -> 0.317141, b -> 1.86267}}{{True, True, True, True, True}, {True, True, True, True, True},
{True, True, True, True, True}, {True, True, True, True, True}}
Introduce a sixth variable for the exponential term
eq6 = E^(x - z) == exz
{eq1, eq2, eq3, eq4, eq5} ={exp1, exp2, exp3, exp4, exp5} /. E^(x - z) -> exz
And tell NSolve
all variables are Reals
(nsol = NSolve[And @@ {eq1, eq2, eq3, eq4, eq5, eq6} &&
Element[{x, y, z, a, b, exz}, Reals], {x, y, z, a, b, exz}]) // Timing
{0.641, {{x -> -1.95192, y -> -0.545867, z -> 0.119973,
a -> 0.00314125, b -> -0.0762384, exz -> 0.125947},
{x -> 0.155142,y -> 0.904622, z -> 0.950293, a -> -0.0124473, b -> 0.489938,
exz -> 0.451513},
{x -> 0.222444, y -> -2.15701, z -> -0.686049, a -> -0.200401, b -> 2.10858,
exz -> 2.48058},
{x -> 1.13873, y -> 1.76806, z -> -0.573138, a -> 0.317141, b -> 1.86267,
exz -> 5.5393}}}
{eq1, eq2, eq3, eq4, eq5, eq6} /. nsol
{{True, True, True, True, True, True}, {True, True, True, True, True, True},
{True, True, True, True, True, True}, {True, True, True, True, True, True}}
Even Solve
is very fast.
(sol = Solve[And @@ {eq1, eq2, eq3, eq4, eq5, eq6} &&
Element[{x, y, z, a, b, exz}, Reals], {x, y, z, a, b, exz}]); // Timing
{0.797, Null}
Try
exp1 = y*E^(x - z) == 18 a*x + b*y;
exp2 = 18 a*x + b*y == y*(8 a*y + b (x + z));
exp3 = 0 == 18 a*x + 72 a*z +2 b*y;
exp4 = 9 x^2 + 4 y^2 + 36 z^2 == 36;
exp5 = x*y + y*z == 1;
Reduce[{exp1, exp2, exp3, exp4, exp5}, {x, y, z, a, b}]
which adds some of your equations to others to eliminate some of the exponentials AND it removes the Reals
argument which I have seen greatly slows things down at times.
Perhaps you can extract the Real solutions once you see the results.
Check all this very carefully to make certain it is still correct.