Message Boards Message Boards

Looking for a closed-form solution using Solve[ ]

Posted 3 years ago

I was wondering if a closed form solution does exist for the following equation:

a^2 Exp[x/a] + x^2/2 (1 - b) - a^2 - a x Exp[x/a] = 0

where a and b are Real numbers. I would like to obtain a solution of the form x=f(a,b). I tried to use the following command:

Solve[a^2*Exp[x/a] + x^2/2*(1 - b) - a^2 - a*x*Exp[x/a] == 0, x, 
 Assumptions -> Element[a, Reals], Assumptions -> Element[b, Reals]]

but I obtained the following message: Solve: This system cannot be solved with the methods available to Solve.

I was wondering whether I could use the Lambert W function to solve this equation or if there is any way to obtain an approximated solution of this equation. I am looking for a solution for x<0, and I know that a>0, if this can make any difference. Thank you.

Edited after the 1st reply: The last sentence is probably superfluous: I am interested in the general closed-form solution of this equation. Then, I will use the part of solution when x<0 (which happens when 0<b<1).

4 Replies

It does not appear to have solutions for x<0. Just a cursory numerical exploration gives:

ans = Table[
  NSolve[a^2*Exp[x/a] + x^2/2*(1 - b) - a^2 - a*x*Exp[x/a] == 0 , x, 
   Reals], {a, 1, 10}, {b, -5, 5}]

All solutions are zero and a positive number for x. I would make sure the equation is correct before "diving into" solving it.

Regards

Neil

POSTED BY: Neil Singer

Thank you for the quick reply. As I expect based on the physical reasoning that stays behind the derivation of this equation and looking at its plot, the solutions of this equation should be:

  • x1=x2=0 when b>=1

  • x1=0 and x2<0 when 0<b<1

  • x1=0 and x2>0 when b<0

So, one solution is always x=0. I'm mainly interested to derive the solution when 0<b<1. For example, when I solve it with NSolve and assuming a = 0.3 and b=0.5, the solutions are x=0 and x=-0.327474 as confirmed by the plot. I guess that the cursory numerical exploration suggested above did not provide negative solutions because the table command did not explore values 0<b<1.

Based on that, you can plot the answer. I put a Quiet[] in there because sometimes the solution has issues but you can get the idea by doing something like this:

Manipulate[
 ListLinePlot[
  Quiet[ans = 
    Table[x /. 
      FindRoot[
       a^2*Exp[x/a] + x^2/2*(1 - b) - a^2 - a*x*Exp[x/a] == 
        0, {x, -1, -100, -0.001}], {b, 0.01, 0.9, 0.01}]]], {{a, 0.3},
   0.1, 1}]

Giving a plot that looks like this for any value of a (only the y axis seems to change with a). This suggests you can easily do an excellent interpolation or an approximate curve fit.

enter image description here

POSTED BY: Neil Singer

Thank you for the suggestion.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract