I have a question, which is motivated by my book's solution to finding the inverse function of $f(x)=\frac{x}{1-x^2}$ with the domain of $f(x)$ restricted the open interval $(-1,1)$. The questions are stated at the bottom, but first is the book's solution:
Solution
$f(x)$ is injective and surjective, and hence it has an inverse, $f^{-1}(x)$.
$y=\frac{x}{1-x^2}$
$x=\frac{y}{1-y^2}$
$xy^2+y-x=0$
$y=\frac{-1\pm\sqrt{1+4x^2}}{2x}$
The negative solution is the right one, and then the book notices that $y=\frac{-1\pm\sqrt{1+4x^2}}{2x}$ excludes $x=0$ from the domain, but it should be in the domain since $0$ is in the image of $f(x)$, namely $f(0)=0$. It fixes this by rationalizing the numerator by multiplying by $1$ as follows:
$y=\frac{-1+\sqrt{1+4x^2}}{2x}\cdot \frac{-1-\sqrt{1+4x^2}}{-1-\sqrt{1+4x^2}} = \frac{2x}{1+\sqrt{1+4x^2}}$
Hence $f^{-1}(x)=\frac{2x}{1+\sqrt{1+4x^2}}$. $\blacksquare$
Question
Why is it that multiplying a function by $1$ will add a value for the graph of $f^{-1}(x)$? I can see why multiplying by $1$ will sometimes remove points on the graph, namely where the denominator is zero (e.g. multiply an equation by $\frac{x}{x}$ and it won't have a value at $x=0$), but how does it work here that multiplying by $1$ adds a point to the graph? Did it just get shifted somewhere else?


It's not quite the "multiplying by $1$" that expands the domain. Note that after doing the multiplication, we actually have $$ y=\frac{4x^2}{2x\left(1+\sqrt{1+4x^2}\right)}. $$ Here we still can't have $x=0$. The magic happens when we declare $\frac{4x^2}{2x}=2x,$ which gets rid of the removable "hole" in the graph. So really, it's like in your own example, just in reverse: We started out with an $\frac xx$ in disguise, which we converted to a $1$. The multiplication is just a clever (and common) algebraic trick to clean up the expression.
As to why we got the hole in the first place, this happened when we used the quadratic formula. The formula is only suited to actual second degree polynomials, so we must assume that the leading term doesn't vanish when we use it. Really, we should split up in cases at that point in the proof: Either $x=0$ (which implies $y=0$), or we can solve for $y$ with the quadratic formula when $x\ne0$. Thus, another way to write the final answer would be simply $$ f^{-1}(x)=\begin{cases}\frac{-1+\sqrt{1+4x^2}}{2x}&x\ne0 \\ 0 &x=0\end{cases} .$$