I am kind stuck with finding the inverse function of following function.
$$f:x\mapsto\log_2(x^2-3x-4)$$
Let $y =f(x)=\log_2 (x^2 - 3x-4)$. After I simplify the function, I end up with: $2^x = y^2 - 3y -4$. But literally what is the next step to do, but the answer surprisingly looks like this:
$$\begin{split} f^{-1}(x)&=\frac{3+\sqrt{25+2^{x+2}}}{2}\quad\text{if }x>4\\ f^{-1}(x)&=\frac{3-\sqrt{25+2^{x+2}}}{2}\quad\text{if }x<-1\\ \end{split}$$
which seems like making quadratic formula, but have no clue on how the answer being derived.
Any help will be really appreciated.
The folloiwng can be tried always, though not always you get a nice output:
$$y=\log_2(x^2-3x-4)\implies2^y=x^2-3x-4\implies x^2-3x-(4+2^y)=0\;(*)$$
After we wrote the function as $y\;$ function of $\,x\;$ , we try the other way around: $\;x\;$ as function of $\;y\;$ . The above quadratic's discriminant:
$$\Delta=9+4(4+2^y)=25-4\cdot2^y=25+2^{y+2}$$
and the solutions are
$$x_{1,2}=\frac{3\pm\sqrt{25+2^{y+2}}}2\;\ldots$$
Now just interchange $\;x\leftrightarrow y\;$ to write the inverse in the usual way, and we're done.