I have tried to derive a general formula for an inverse function, but the formula does not produce correct results. Here is my thought process, so I hope you can help me and spot any mistakes. Thank you!
$f(x)=y$
$f^{-1}(f(x)) = x$
$f^{-1}(x) = ?$
Let $\frac{f^{-1}(x)}{f(x)} = k,\,k\in \mathbb{R}\;$ (in the general case, assuming $f(x) \neq 0$)
Therefore $f^{-1}(x) = k * f(x)$
Then, let's plug in $f(x)$ into $f^{-1}(x)$:
$f^{-1}(f(x)) = k * f(f(x))$
$f^{-1}(f(x)) = x\;$ (by definition). So,
$f^{-1}(f(x)) = k * f(f(x)) = x$
Therefore: $\;k = \frac{x}{f(f(x))}$
Thus, the general formula of the inverse function should be:
$f^{-1}(x) = \frac{x}{f(f(x))} * f(x)$
All is well and beautiful! Except that it doesn't work, at all. Please help me find and correct this broken piece of math! Thanks in advance.