I was working on a question out a GRE math prep book:
"Find the inverse of $f(x) = \frac{x}{1-x^2}$ that works for all $x \in \mathbb{R}$ where $f$ is defined over $(-1,1)$"
(works meaning is well defined I'm guessing).
So the process is very routine for any precalculus student, we solve
$$ x = \frac{f^{-1}}{1 - f^{{-1}^2}} \rightarrow f^{-1} = \frac{-1 \pm \sqrt{1 + 4x^2}}{2x}$$
And then observing the range of the two branches, versus the domain of our problem $(-1,1)$ we conclude that
$$ f^{-1} = \frac{-1 + \sqrt{1 + 4x^2}}{2x}$$
But this is where things get weird. So this is defined for all $x \in \mathbb{R}$ except $x= 0$ where it is undefined but has a well defined limit point.
Now the book, very mechanically summarizes "whenever this happens, rationalize the numerator" without explanation, and sure enough they do that and arrive at an algebraically equivalent
$$ f^{-1} = \frac{2x}{1 + \sqrt{1 + 4x^2}}$$
Which is indeed "obviously" well defined for $x=0$. So here's my question:
Given a function $F(x)$ expressed as $S(x)$ (so S refers to the actual form of the function written down, where $F$ is the idea of the function itself, independent of how its written) where $S(x)$ has some collection of points $\omega_1 ... \omega_r$ such that $S(\omega_i)$ is undefined BUT $\lim_{x \rightarrow \omega_i} S(x)$ is well defined, how do we algorithmically find the transformation of $T$ $S(x)$ so that this limit becomes "obvious" (meaning the function algebraically simplifies to the desired value at that $\omega_i$). This is in effect a generalization of the question "how did you (the book) know to normalize the numerator in the first place"
Work so far:
So we can look at the space of all algebraic expressions in a single variable $x$ as a starting point, let us consider $\mathbb{C}[x]$. Now over this space of expresison we have "symbolic" transformations $T$ with the property $a = T(a)$. And the question then is, given some algebraic expression $\tau$, how to find a $T$ such that $T(\tau)$ is not undefined at any point, where it's limit exists.
The problem I run into after quantifying this approach is that it's not clear to me how to enumerate through the space of all $T$, but my goal is to show that the $T$ that is "rationalize the numerator" can be derived as the optimal transformation for this particular example of $S = \frac{-1 + \sqrt{1 + 4x^2}}{2x}$
$f^{-1}$ is actually defined at $0$, and $f^{-1}(0) = f^{-1}(f(0)) = 0$. The problem is that you arrived at the expression of $f^{-1}$ under the (implicit) assumption that $y \neq 0$. In fact, $$y = f(x) = \frac{x}{1 - x^2} \iff yx^2 - y+ x = 0$$
This is a quadratic equation in $x$ iff $y \neq 0$, so the obtained expression is valid only when $y \neq 0$. If $y = 0$, then $x = 0$ and we get $f^{-1}(0) = 0$. Otherwise, we get that formula. It is then possible to simplify the expression of $f^{-1}$ and get one that is valid for all values.
P.S. I did not read the rest of the question, but I thought that it would be useful to point out what went wrong.