# How to solve a nonlinear system of equations with exponential terms

I want to solve this parametric nonlinear system of equations in Mathematica:

$$x−1−(e^{a−x}+e^{b−y})/(c+e^{b−y})=0$$

$$y−1−(e^{b−y})/(c+e^{a−x})=0$$

and I used this code:

Solve[{x - 1 - (Exp[a - x] + Exp[b - y])/(c + Exp[b - y]) == 0, y - 1 - (Exp[b - y])/(c + Exp[a - x]) == 0}, {x, y}]


but I got this message: This system cannot be solved with the methods available to Solve

Does anyone know what's the problem?

• It just cannot be solved by Solve - it's too difficult. If a,b are known values please provide the numbers - in which case you could try NSolve for a numerical solution, otherwise if you need a symbolic solution in $a,b,c$ I'm afraid you're out of luck. Jul 7, 2021 at 13:36
• but I got this message: how long did it take you to get this message? its been running for 20 minutes on my 12.31. You should really mention the version number and the OS also. Jul 7, 2021 at 13:51
• Not clear what is meant by "what's the problem". The result (unevaluated) and the message make pretty clear what has happened. What different outcome would you propose? Jul 7, 2021 at 14:09
• @DanielLichtblau Everyone expects that the powerful Mathematica should be able to solve any equation, ode, pde, integral, or any math problem. It does not matter if there exists a solution or not :) Jul 7, 2021 at 14:25
• Nasser did not claim that a closed form for this system exists. Jul 8, 2021 at 13:56

I am pretty sure this can be done only numerically after evaluating the parameters a,b,c, for example, in such a way. We extract the LHSes of the equations by [], square these by Map[#^2 &,...], sum the squares by Total, and evaluate the parameters by /. {a -> 1, b -> -2, c -> 3}. Then we apply NMinimize

NMinimize[Total[Map[#^2 &, {(x -
1 - (Exp[a - x] + Exp[b - y])/(c + Exp[b - y]) ==
0)[], (y - 1 - (Exp[b - y])/(c + Exp[a - x]) ==
0)[]}]] /. {a -> 1, b -> -2, c -> 3}, {x, y}]


{0., {x -> 1.26718, y -> 1.01305}}

If you are interested in the solutions over the complexes, then that approach should be modified.

• The results of the commands of Maple plots:-implicitplot([-1 - (exp(1 - x) + exp(-2 - y))/(3 + exp(-2 - y)) + x = 0, -1 - exp(-2 - y)/(3 + exp(1 - x)) + y = 0], x = -5 .. 5, y = -5 .. 5, color = [blue, red]) and fsolve([-1 - (exp(1 - x) + exp(-2 - y))/(3 + exp(-2 - y)) + x = 0, -1 - exp(-2 - y)/(3 + exp(1 - x)) + y = 0])confirm my answer ( see here) Jul 7, 2021 at 20:13

You can get solutions in terms of Root expressions for defined a,b,c.

Use the fact that f^2+g^2 has a minimum at intersection point to get additional equations.

You get two separated transzendental equations for x and y.

{f, g} = {x - 1 - (Exp[a - x] + Exp[b - y])/(c + Exp[b - y]),
y - 1 - (Exp[b - y])/(c + Exp[a - x])}

ContourPlot[
Evaluate[{f == 0, g == 0} /. {a -> 1, b -> 1, c -> 1}], {x, 0,
4}, {y, 0, 4}]

FindRoot[{f == 0, g == 0} /. {a -> 1, b -> 1, c -> 1}, {x, 2}, {y, 2}]

(*   {x -> 1.69589, y -> 1.43284}   *)

Plot3D[{0, f^2 + g^2 /. {a -> 1, b -> 1, c -> 1}}, {x, 0, 4}, {y, 0,
4}]

df = D[f^2 + g^2, x] // Together // Numerator // Simplify

dg = D[f^2 + g^2, y] // Together // Numerator // Simplify

elix = Eliminate[{f == 0, df == 0, g == 0, dg == 0}, x]

(*   Log[-((E^b + c E^y - c E^y y)/(1 - y))] == -1 + a - E^b/(
E^b + c E^y) + y + (
E^b + c E^y - c E^y y)/((E^b + c E^y) (1 - y)) && E^b + c E^y != 0   *)

Solve[elix[] /. {a -> 1, b -> 1, c -> 1}, y, Reals]

(*   {{y -> Root[{-E^#1 - 2 E #1 + E #1^2 + E^#1 #1^2 +
Log[-((E + E^#1 - E^#1 #1)/(1 - #1))] (E + E^#1 (1 - #1) -
E #1) &, 1.43283890934916955086}]}}   *)

eliy = Eliminate[{f == 0, df == 0, g == 0, dg == 0}, y]

Solve[eliy[] /. {a -> 1, b -> 1, c -> 1}, x, Reals]

(*   {{x -> Root[{-E - E^#1 - 2 E #1 - E^#1 #1 + E #1^2 + E^#1 #1^2 +
Log[-((E + E^#1 - E^#1 #1)/(2 - #1))] (2 E + E^#1 (2 - #1) -
E #1) &, 1.69589278283101356668}]}}   *)

• In fact, Solve[eliy[] /. {a -> 1, b -> 1, c -> 1}, x, Reals]  and Solve[elix[] /. {a -> 1, b -> 1, c -> 1}, y, Reals] are numerical solutions camouflaged by Root[..]. Before solving, the parameters are evaluated. Jul 8, 2021 at 4:16
• Yes, that's true and clear. But sometimes root expressions, instead of pure numbers, are of advantage for further algebraic calculations. Jul 8, 2021 at 6:24
• Akku (@ does not work.): Can you give such an example, grounding your words? TIA. Jul 8, 2021 at 7:00