# Is there a closed form solution to this equation?

I have the following equation $e^{-x/b}(a+x) = e^{x/b}(a-x)$

where $b > 0$, and $a > 0$

I need to solve for $x$. I can do it numerically, but would prefer if there was a closed form solution.

It seems to me that there likely is no closed form solution, but thought I'd ask the experts here, just in case.

• Notice that $e^{-x/b}(a+x)=e^{x/b}(a-x)\iff e^{2x/b}=(a+x)/(a-x)$. Subsitute $y=2x/b$, and obtain $e^y=(2a/b+y)/(2a/b-y)$, so you only have to solve $e^y=(c+y)/(c-y)$, $c>0$. – Luiz Cordeiro Jul 2 '14 at 21:38
• Letting $u = \frac{2x}{b}$ in the equation $\exp\left(\frac{2x}{b}\right) = \frac{a+x}{a-x}$ gives $e^u = \frac{2a+bu}{2a-bu},$ and I am nearly certain that this can't be solved explicitly (at least without using something like the Lambert function) even when $a=b=1.$ – Dave L. Renfro Jul 2 '14 at 21:38
• Mathematica can't solve the original equation or the one supplied by @DaveL.Renfro not very surprising though. I highly doubt that this can be solved in closed form. – Alice Ryhl Jul 2 '14 at 21:52
• Another tidy presentation of the equation is $\frac xa = \tanh(\frac xb)$. – user21467 Jul 2 '14 at 23:58
• $x=0$ is one solution – Claude Leibovici Jul 3 '14 at 8:03

As Steven Taschuk commented, the equation can write $$\frac xa = \tanh(\frac xb)$$ Changing variable $x=by$, this write $$\frac {b}{a} y = \tanh(y)$$ Taking into account the shape of $\tanh(y)$ and essentially the fact that, at $y=0$, $\Big(tanh(y)\Big)'=1$, there is a solution only if $a\gt b$. Otherwise, the only possible solution is $y=0$ which is valid for any non zero values of $a$ and $b$. If $y_*$ is a solution, $-y_*$ is the other one. So, we have a maximum of three solutions.
Using Taylor expansion to the third order, a first approximation is given by $$y_*= \sqrt{3\frac{a-b}{a}}$$