# Inverse Function (and WolframAlpha gives different Result)

I wanted to calculate the inverse function of $$f(x) = \frac{1}{x} + \frac{1}{x-1}$$ Quite simple I thought, put $$y = \frac{1}{x} + \frac{1}{x-1} = \frac{2x-1}{x(x-1)}$$ rearrange and solve $$y(x(x-1)) - 2x + 1 = 0$$ which give the quadratic equation $$yx^2 - (y + 2)x + 1 = 0$$ Using the Solution Formula we got $$x = \frac{(y+2) \pm \sqrt{y^2+4}}{2y}$$ So the inverse function is $$f^{-1}(x) = \frac{(x+2) \pm \sqrt{x^2+4}}{2x}$$ Just to confirm I put in WolframAlpha and it gives me $$\frac{-x-2}{2x} \pm \frac{\sqrt{x^2+4}}{2x}$$ (just click on the link to start WolframAlpha with this parameter), which is different up to a sign in the first summand, can not see an error, do you (or is WolframAlpha wrong...)?

EDIT: If the link is not working for you:

-
WolframAlpha? Wrong? Blasphemy! –  2012ssohn Jan 9 at 18:17
Do y9ou know a way to check whether the answer is wrong? (Other than just re-computing it, of course.) –  GEdgar Jan 9 at 18:23

Nothing wrong with your answer! Actually Wolfram's answer is wrong! Just check it by $x=3/2$ in wolfram's inverse.

-

Your error is in the solution formula. You have $(y+2)^2 - 4\cdot y\cdot 1 = y^2+4 \neq (y+2)(y-2)$. It would be $y^2-4 = (y+2)(y-2)$.

-
yes, that was wrong! but this is not the issue, still the sign in the first summand is different: $-x-2$ vs. $(x+2)$! but thanks for pointing this out –  Stefan Jan 9 at 18:19