I am trying to solve:

Exp[-a Exp[-x/b] - c Exp[-x/d]] == Y

to x, and using the command

Solve [Exp[-a Exp[-x/b] - c Exp[-x/d]] == Y, x]

Mathematica says me that it can't do it:

"Solve::nsmet: This system cannot be solved with the methods available to Solve".

I believed the problem was in introducing the terms or constants b and d, and maybe adding the assumptions that there are constants or parameters larger than 0 it works. But I see that solve doesn't accept Assumptions as parameters. Than trying to put any set of constants (example: 1,2,3,4) for a, b, c and d I got the same error.

Somebody can help me to understand why it not works and how to solve this equation?

Thank you very much.

  • $\begingroup$ As an aside, the nsmet error is not there for the case of: Solve[Exp[-a Exp[-x/b]] == y, x] $\endgroup$ – dr.blochwave Jul 20 '14 at 20:58
  • $\begingroup$ Try it for SolveAlways[Exp[-a Exp[-x/b] - c Exp[-x/d]] == Y, x] and you get a whole heap of messages. $\endgroup$ – dr.blochwave Jul 20 '14 at 21:03
  • $\begingroup$ Solve::svars: Equations may not give solutions for all "solve" variables. and SolveAlways::tdep: The equations appear to involve the variables to be solved for in an essentially non-algebraic way. and a Roots::neq too. $\endgroup$ – dr.blochwave Jul 20 '14 at 21:03
Clear[a, b, c, d, x, y]

Provided a, b, c, and d have appropriate numeric values,

With[{a = 1, b = 2, c = 3, d = 4},
 eqn = Exp[-a Exp[-x/b] - c Exp[-x/d]] == y // Simplify;
 sol = Solve[eqn, x]]

enter image description here

Verifying that sol satisfies eqn under the given conditions:

Assuming[Element[{C[1], C[2]}, Integers], eqn /. sol // Simplify]

{True, True}

  • $\begingroup$ Thanks you very much also Bob, in your case I can understand that I have to trust solve the Mathematica functions first, and then I see that you add a validation code. The only think is that I get other code that I write in my own answer. $\endgroup$ – JosGranada Jul 21 '14 at 21:10

Without making assumptions on the parameters except that they are real, one easily observes that the original equation is equivalent to the following:

eq1 = -a E^(-(x/b)) - c E^(-(x/d)) == f

where (* f = Log[Y] *). With the exchange:

eq2 = eq1 /. x -> -b*Log[y]

one obtains this:

(*  -a y - c y^(b/d) == f   *)

By rescaling y -> A*z:

    eq3 = Map[Divide[#, c*A^(b/d)] &, (eq2 /. y -> A*z)] // PowerExpand //

one obtains this:

  (*  -((a A^(1 - b/d) z)/c) - z^(b/d) == (A^(-(b/d)) f)/c   *)

Defining A as follows:

sl = Solve[(a (A^(1 - b/d)) )/c == 1, A][[1, 1]]

and substituting it into equation one finds:

    eq3 /. sl // PowerExpand // 
 Simplify[#, {a \[Element] Reals, b \[Element] Reals, 
    c \[Element] Reals, d \[Element] Reals}] &

one finally finds the equation:

   k + z + z^p == 0

where k=a^(-(b/(b - d))) c^(d/(b - d)) f and p=b/d. This equation is only dependent upon 2 parameters kand p. It can be solved either numerically, or simply tabulated. It depends on what do you want to do with the solution. A simplest is just to plot the solution z=z(k,p):

    ParametricPlot3D[{-z - z^p, p, z}, {z, 0, 1}, {p, 0, 1}, 
 AxesLabel -> {Style["k", 16, Italic], Style["p", 16, Italic], 
   Style["z", 16, Italic]}, ColorFunction -> "Rainbow"]

It should look as follows: enter image description here

  • $\begingroup$ Thank you very much Alexei. I apreciate your high level, but my appologies by not understanding a lot of the code or how do youd decide your transformations and other operations. I'm not mathematician and I use Mathematica only from some days ago. I would to understand the transformation from eq2, and some composite code as the more difficult in eq3. I understand any function (Map, Divide, #, $ or Expand) individually but my tries doesn't shows me what two terms I'm dividing, what is the function that refers & or if the parameters are all the values of eq2 after transforming it. $\endgroup$ – JosGranada Jul 21 '14 at 21:04
  • $\begingroup$ @JosGranada The #&form is a pure function. Check this term in Menu/Help/Documentation Center. The construct Divide[#,x]&[z] returns z/x. In combination with Map like this: Map[Divide[#,x]&,expression] it projects the division over xoperation onto all elements of the first level of the expression. However, if you are only few days user of Mma, this may also sound obscure. What you can do wile you are not that familiar with Mma is the following. First with all those Mma operations I did a rather trivial rescaling of your equation. It may be summarized by the following changes of $\endgroup$ – Alexei Boulbitch Jul 22 '14 at 7:28
  • $\begingroup$ @JosGranada Continuation. variables and parameters: Y=Exp[f], x=-b*Log[y], y=A*z, where A = (c/a)^(-(d/(b - d))). This transforms the equation into its form k + z + z^p == 0, where kand pare given in my answer in the explicit form. All this I did using Mma, but you may do also by hand, no problem. Then the question arises, how to solve this equation. If p is Integer and below 5 it is easily solved by Mma exactly. However, if it is not the case, (That is p is an arbitrary real number) this equation is much simpler that the initial one, but it is in no case trivial. $\endgroup$ – Alexei Boulbitch Jul 22 '14 at 7:38
  • $\begingroup$ @JosGranada Continuation. The answer to this question (i.e., how to solve it) depends upon the answer to the question, what do you intend to do with the solution. And I do not know that. As an example of what can be done I have drawn it using ParametricPlot3D function. You can check it in Menu/Help/Documentation Center/Parametricplot3D. If you have in mind some other use of the result, specify it. $\endgroup$ – Alexei Boulbitch Jul 22 '14 at 7:44
  • $\begingroup$ I'll study your explanation. I forget my aim with this application. This is not my main goal, but I want to do that AFINS 2.0 does to any quantile or X value, that is to apply the inverse of that double exponential function. You can download AFINS here: lluvia.dihma.upv.es/ES/software/software.html. Is very easy of use if you have IDL installed. But basically it gives the initial 4 parameters that then are adjusted by Maximum Likelihood. Also it gives the inverse values (X) for Fx(X) corresponding to several return periods (T=5, T=10...). I guess T must be: 1/(1-Fx(x)), so Fx(x)=(T-1)/T $\endgroup$ – JosGranada Jul 22 '14 at 16:32

Bob, this is the solution that I got:

Clear[a, b, c, d, x, y]

With[{a = 1, b = 2, c = 3, d = 4}, 
 eqn = Exp[-a Exp[-x/b] - c Exp[-x/d]] == y // Simplify; sol = Solve[eqn, x]]

Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. >> enter image description here

Assuming[Element[{C[1], C[2]}, Integers], eqn /. sol // Simplify]
{True, True}

Trying the generic form: eqn = Exp[-a Exp[-x/b] - c Exp[-x/d]] == y // Simplify

sol = Solve[eqn, x]

I obtain the message that the system cannot be solved with the mthods available to Solve

  • $\begingroup$ @JoeGranada - You are using an older version of Mma. I used v10. Your solution is a special case of the more general solution. You can just use eqn /. sol // Simplify since there are no arbitrary integer constants C[1] and C[2] in your result. This approach only works when you assign numeric values to a, b, c, and d. $\endgroup$ – Bob Hanlon Jul 21 '14 at 23:32
  • $\begingroup$ Thanks Bob, I'll try to download the trial of v10 and apply your guidelines. $\endgroup$ – JosGranada Jul 22 '14 at 9:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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