# Finding the inverse of $f(x)=((e^x-e^{-x})/(e^x+e^{-x}))+1$

$f$ is a function from $\Bbb R$ to $(0,2)$ defined as $$f(x)=\frac{e^x-e^{-x}}{e^x+e^{-x}}+1.$$ The function $f$ is invertible and I want to find its inverse.

I tried using methods like taking $\ln$ on both sides but they don't seem to work.

• Multiply the numerator and denominator of the fraction by $e^x$. That should leave you with less exponentials to deal with. Clear $e^{2x}$ – rrogerr May 15 '17 at 13:31
• @rrogerr That's a good suggestion. Will keep in mind. – Sashank Sriram May 15 '17 at 14:21

## 2 Answers

Here is my go at it. First, observe that we have the two hyperbolic trig functions $$\mathrm{sinh}(x)=\dfrac{e^{x}-e^{-x}}{2}, \qquad \mathrm{cosh}(x)=\dfrac{e^{x}+e^{-x}}{2}$$ which defines $\mathrm{tanh}(x):=\mathrm{sinh}(x)/\mathrm{cosh}(x)$. It follows form this that your function $f$ may be written as $f(x)=\mathrm{tanh}(x)+1$. From this, one knows that the inverse function of the hyperbolic tangent is well defined and equal to $$\mathrm{artanh}(x)=\frac{1}{2}\ln \left(\frac{1+x}{1-x}\right)$$ with domain $(-1,1)$. Thus, $$\mathrm{tanh}(x)=f(x)-1\qquad\Rightarrow\qquad f^{-1}(x)=\frac{1}{2}\ln \left(\frac{x}{2-x}\right).$$ If your are not satisfied with my use of hyperbolic trig functions, you can always "reverse engineer" the inverse.

I hope this helps!

• Great. I actually do not know hyperbolic trigonometry, but this may be useful once I get to that. – Sashank Sriram May 15 '17 at 14:22
• A good solution for those who have learnt hyperbolic trigo. – Mathxx May 20 '17 at 3:47

$$y=f(x)=\frac{e^x-e^{-x}}{e^x+e^{-x}}+1$$ $$y-1=\frac{e^x-e^{-x}}{e^x+e^{-x}}$$ $$y-1=\frac{e^{2x}-1}{e^{2x}+1}$$ $$ye^{2x} +y -e^{2x}-1=e^{2x}-1$$ $$e^{2x}(y-2)=-y$$ $$e^{2x}=\frac{y}{2-y}$$ Taking log $$2x=\log\left(\frac{y}{2-y}\right)$$ $$x=\frac12\log\left(\frac{y}{2-y}\right)$$ Now$$f^{-1}(x)=\frac12\log\left(\frac{x}{2-x}\right)$$

• That was really useful. I am able to understand your steps. – Sashank Sriram May 15 '17 at 14:24