<s>[INST] Finding inverse of a function $h(x) = \frac{1-\sqrt{x}}{1+\sqrt{x}}$ I have a function:
$$h(x) = \frac{1-\sqrt{x}}{1+\sqrt{x}}$$
With just pen and paper, how can I determine if there exists an inverse function? Am I supposed to sketch it on paper to see if it can have an invers? Or is there another/simplier way to do it?
How would I go about solving it? This is what I did:
$$h(x) = \frac{1-\sqrt{x}}{1+\sqrt{x}} = y$$
$$y(1 + \sqrt{x}) = 1-\sqrt{x}$$
$$y + y\sqrt{x} = 1-\sqrt{x}$$
$$\text{Cancel out roots:}$$
$$y^2 + y^2x = 1+x$$
$$y^2 + y^2x - x = 1$$
$$y^2 + x(y^2 - 1) = 1$$
$$x(y^2 - 1) = 1 - y^2$$
$$x = \frac{1 - y^2}{y^2 - 1}$$
$$\text{Swap x and y and we get the inverse function:}$$
$$f^{-1}(x) = \frac{1 - x^2}{x^2 - 1}$$
$$\text{But the correct answer is supposed to be:}$$
$$f^{-1}(x) = \frac{(1 - x)^2}{(1 + x)^2},  -1< x \le 1$$
What am I doing wrong?
 [/INST] This is probably conceptually the simplest method.
For $\frac{a}{b}=\frac{c}{d}$, we always have $\frac{a+b}{a-b}=\frac{c+d}{c-d}$, provided that $a-b\not=0$ and $c-d\not=0$.
$$y = \frac{1-\sqrt{x}}{1+\sqrt{x}}$$
$$\frac{y}{1} = \frac{1-\sqrt{x}}{1+\sqrt{x}}$$
$$\frac{y+1}{y-1} = \frac{1-\sqrt{x}+(1+\sqrt{x})}{1-\sqrt{x}-(1+\sqrt{x})}=\frac{2}{-2\sqrt{x}}=\frac{1}{-\sqrt{x}}$$
$$\frac{\sqrt{x}}{1}=\frac{1-y}{1+y}$$
$$x=\frac{(1-y)^2}{(1+y)^2}$$
So
$$f^{-1}(x) = \frac{(1 - x)^2}{(1+x)^2}$$
</s>