# 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 '14 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 '14 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 '14 at 18:19

this function is not a one by one function , so that have not inverse .
but in some interval is 1-1 function so may have inverse

-
maybe therefore it gives a wrong solution. btw do you know a way to specify the domain in InverseFunction for WolframAlpha? – Stefan Jan 9 '14 at 19:09
can you calculate inverse of y=X^2 in all x ? – Khosrotash Jan 9 '14 at 19:11
but you can restrict x to have inverse function . like this y=x^2 over x<0 or x>=2 or something like that – Khosrotash Jan 9 '14 at 19:13
I suggest that ,apply restricted area of x in it. like x>1 and get the answer from wolfram – Khosrotash Jan 9 '14 at 19:15
how to input that? – Stefan Jan 9 '14 at 19:15