I want to prove that $f(x) = x\cdot|x|+1$ is injective, and if it is; find the inverse of the function.
$f(a) = f(b) \iff a|a|+1 = b|b|+1 \iff a|a| = b|b|$
$\begin{cases} -a^2 = b^2 \quad undefined \\ a^2 = b^2\iff ±a = ±b\\ \end{cases}$
It's frustrating to me; I understand the definition behind injectivity; but I suck at proving functions which aren't linear.
So my results were wrong, and I went to try and find the inverse directly instead. Again I divided the absolute value into different cases:
$y = x|x|+1$
If $x<0:\quad -x^2+1=y\iff x=\pm\sqrt{1-y}$
If $x\ge 0:\quad x^2+1=y \iff x=\pm\sqrt{y-1}$
However, according to Wolfram, $f^{-1}(x) = \pm\sqrt{x-1}$. They don't even mention the part when $x\ge0$.
I feel so helpless; the only information I find on the Internet and in my books are for simple equations, such as $y=3x+1$, which doesn't really help me at all.
I need to add that I prefer to learn how to handle it algebraically, as with graphical aid, there's no confusion for me.
Well the trick here is that only one of the roots to the equations you give is valid; in particular, you found that, for $x<0$, it holds that $$-x^2+1=y$$ and therefore that $x=\pm \sqrt{1-y}$, which is correct. However, remember that this is that case when $x<0$, and it happens that $\sqrt{1-y}$ is positive, so that's definitely not a solution, since $f(\sqrt{1-y})=\sqrt{1-y}|\sqrt{1-y}|+1=2-y\neq y$. So, it happens that the only valid solution is $x=-\sqrt{1-y}$. When $x\geq 0$, similarly, you accurately find the inverse to be one of two values, but it happens to be $x=\sqrt{y-1}$, since it must be possible. In particular, just by refining the work you've already done a bit, we find that the inverse function is: $$g(x)=\begin{cases}\sqrt{y-1} && \text{if }y\geq 1 \\ -\sqrt{1-y} && \text{if }y<1\end{cases}$$ which you could quickly check satisfies $f(g(x))=x$, if you wished.