# Inverse of a function with exponent variable

Consider a function $f(x)$ such as $x\mapsto 2e^x-\frac1{e^x}$. How do you find $f^{-1}(x)$?

I have tried, logarithms, squaring, substitution, but I wasn't able to isolate $x$. The correct answer, according to Wolfram Alpha is $f^{-1}(x) = \log{\left(\frac14\left(x+\sqrt{x^2+8}\right)\right)}$.

-

$$x=2e^y-e^{-y}$$

and multiply both sides by $e^y$, you get

$$x e^y=2e^{2y}-1$$

which you can treat as a quadratic equation in $e^y$. Use the quadratic formula to solve for $e^y$ (be careful in choosing roots!), undo the exponential with the logarithm, and you have your needed result.

-
Right, I actually tried that! But this solved to $y=0$ (choosing the right root, like you said), hence eliminating all $y$-terms. What am I doing wrong? – Milosz Wielondek May 4 '11 at 20:22
BTW, you can figure out why the minus sign in your original question is wrong... – J. M. May 4 '11 at 20:23
BTW, what do you mean?? – Milosz Wielondek May 4 '11 at 20:27
As another way of thinking about it: is $x$ always bigger than $\sqrt{x^2+8}$? Having thought about it, which of $+$ or $-$ should you choose in the quadratic equation? – J. M. May 4 '11 at 20:27
Right, it should be $\pm$. Is that what you mean? – Milosz Wielondek May 4 '11 at 20:34