Inverse of f(x)= e^x/e^x+1

1. Sep 16, 2012

Dramen

1. The problem statement, all variables and given/known data

I'm having problems with finding the inverse equation for this function $$e^x/(e^x-1)$$

3. The attempt at a solution

Currently, I have done about 2 methods to solve it and hitting dead-ends on each one:

Attempt 1. $$x=e^y/(e^y-1)$$ then multiply both sides by $$(e^y-1)$$ so that I have $$xe^y-x=e^y$$, then subtract $$xe^y$$ from both sides to then get $$x=e^y-xe^y$$ after which I factor out $$e^y$$ and then my final solution to this attempt is: $$f(x)^-1= ln(x/(1-X))$$

Attempt 2. I took the reciprocal of the equation so I have $$1/x= (e^y+1)/e^y$$ then split up the fraction to $$1/x= 1+(1/e^y)$$, then multiplied both sides by $$e^y$$ to get $$e^y/x = 1+1$$ then multiplied it by $$x$$ so that my solution was $$f(x)^-1= ln(2x)$$

Obviously by looking at the final solutions neither of them actually work. I would really appreciate any enlightenment on this problem.

2. Sep 16, 2012

vela

Staff Emeritus
You made a sign error here. This attempt, otherwise, is fine.
X and x are two different variables. Don't mix cases. Also, you want the superscript -1 on the f, not after (x). f-1 denotes the inverse of f, but f(x)-1 means 1/f(x).

3. Sep 16, 2012

vela

Staff Emeritus
You have to multiply everything by $e^y$:
\begin{align*}
\frac{1}{x} &= 1+\frac{1}{e^y} \\
e^y \times \frac{1}{x} &= e^y \times \left(1+\frac{1}{e^y}\right) \\
\frac{e^y}{x} &= e^y + 1
\end{align*}

4. Sep 17, 2012

Dramen

I see the mathematical errors now because when I was first typing it on my home computer the connection was bad and had problems typing it out and previewing it before posting.

However, it seems that even with your assistance I'm still having problems with finding the inverse function as my solution now:

1) $$f-1(x)=ln(x/1-x)$$ which doesn't work when x≥1

5. Sep 17, 2012

dextercioby

I get it differently

$$y^{-1} (x) = \ln\left|\frac{x}{x-1}\right|$$

for certain values of x which you have to figure out yourself.

6. Sep 17, 2012

SammyS

Staff Emeritus
Don't use tags, etc in LaTeX.

You need Parentheses for the denominator.

7. Sep 17, 2012

SammyS

Staff Emeritus
Dramen ,

I suggest writing $\displaystyle f(x)=\frac{e^x}{e^x-1}\ \text{ as }\ f(x)=\frac{1}{1-e^{-x}}\ .$

It should be easy from there.

8. Sep 17, 2012

Dramen

I must be an idiot or still suffering from my high school senioritis because even with all your help (which is very appreciated). I still can't get a decent answer as my calculator gets me error values, low decimals (to check against f(x)), or the numbers are negative.

@SammyS this is what I get from your hint $$x= (1)/(1+e^{-1})$$ multiply by $$1+e^{-1}$$ to get
$$x+xe^{-1}=1$$ then subtract x then divide by x to get $$e^{-y}=\frac{1-x}{x}$$ natural log it to finally get $$y= -\ln (\frac {1-x}{x})$$

@dextercioby I'm not sure if I follow you since I have no idea how you switched the denominator x and 1 positions and also when I check the values through $$f(x)*f^{-1}(x)$$ it doesn't come out to 1

9. Sep 17, 2012

dextercioby

e^x = p. You get nice algebra afterwards: p = (p-1)y => p(1-y)=-y => p=y(y-1)^(-1). Thus x=ln|y/(y-1)| or y^(-1)(x)= what I wrote in post 5.

10. Sep 17, 2012

Bohrok

One more possible route to take is$$\frac{e^x}{e^x-1} = \frac{e^x-1+1}{e^x-1} = 1 + \frac{1}{e^x-1}$$
However,
That's not true in general for the product of a function and its inverse. What is true is that f(f-1(x)) = f-1(f(x)) = x

11. Sep 17, 2012

Dramen

@dextercioby okay I was able to get my answer though I would like to know if the steps I made to recreate your answer are right $$x=\frac{e^y}{e^y+1}$$ multiply the denominator on both sides to get $$xe^y+x=e^y$$ multiply both sides by -1? $$-e^y+xe^y=-x$$ factor out the ey to then get $$e^y(x-1)=-x$$ divide both sides by (x-1) $$e^y=\frac{-x}{x-1}$$ then natural log it to get your answer of $$f^{-1}(x)=\ln \vert \frac {-x}{x-1}\vert$$

@bohrok seems that I'm starting to lose my grasp of math, that I'm thinking that the check for reciprocals is the same as the check for inverses

12. Sep 17, 2012

SammyS

Staff Emeritus
Why are you using the absolute value in that result?

Last edited: Sep 17, 2012
13. Sep 17, 2012

Dramen

Yeah I have no idea why I have it either only put it there because dextercioby had one. Also if your talking about the $$e^y+1$$ then its alright because somehow I fudged typing the equation right and accidentally turned it from an addition sign to a subtraction one.

14. Sep 17, 2012

SammyS

Staff Emeritus
So you should get

$\displaystyle f^{-1} (x) = \ln\left(\frac{x}{x-1}\right)\ .$

I think it's probably easiest to get to this using rewriting f(x) in the manner Bohrok suggested.

15. Sep 20, 2012

Dramen

Okay I finally got it thanks for all the help, however my answer differs from yours in that mine is: $$f^{-1}(x)=\ln \frac {-x}{x-1}$$
Thing is though when I run mine through the checks it still works, but when I used yours I just get errors.

16. Sep 20, 2012

vela

Staff Emeritus
Which function are you finding the inverse of? The one in the thread title, which is
$$\frac{e^x}{e^x+1}$$ or the one in your original post, which is
$$\frac{e^x}{e^x-1}?$$