0
$\begingroup$

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?

$\endgroup$
6
  • 3
    $\begingroup$ 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. $\endgroup$
    – flinty
    Commented Jul 7, 2021 at 13:36
  • $\begingroup$ 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. $\endgroup$
    – Nasser
    Commented Jul 7, 2021 at 13:51
  • $\begingroup$ 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? $\endgroup$ Commented Jul 7, 2021 at 14:09
  • 3
    $\begingroup$ @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 :) $\endgroup$
    – Nasser
    Commented Jul 7, 2021 at 14:25
  • 1
    $\begingroup$ Nasser did not claim that a closed form for this system exists. $\endgroup$ Commented Jul 8, 2021 at 13:56

2 Answers 2

1
$\begingroup$

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 [[1]], 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)[[1]], (y - 1 - (Exp[b - y])/(c + Exp[a - x]) == 
    0)[[1]]}]] /. {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.

$\endgroup$
1
  • $\begingroup$ 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) $\endgroup$
    – user64494
    Commented Jul 7, 2021 at 20:13
1
$\begingroup$

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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