I'm trying to find the inverse of the function $$ f(x)=1+x|x| $$
I tried to do this: $$ y=1+x|x| \\x=1+y|y| \\y|y|=x-1 \\(y|y|)^2=(x-1)^2 \\y^4=(x-1)^2 \\y=\sqrt{x-1}$$
which I believe is wrong because the domain of the function includes negative numbers, while $\sqrt{x-1}$ is always positive.
What is the correct inverse of the function and how to find it?
$\endgroup$ 52 Answers
$\begingroup$Your calculations are valid for $x>1$
Note that $$f(x)=1+x|x|=\begin {cases} 1+x^2 \text{, if x>0}\\1-x^2 \text {, if $x\le 0$}\end {cases}$$
therefore, $$ f^{-1}(x) = =\begin {cases} \sqrt {x-1} \text{, if x>1}\\\sqrt {1-x} \text {, if $x\le 1$}\end {cases}$$
$\endgroup$ $\begingroup$A bit of detail:
Let $D_f= \mathbb{R}$.
1) Check if $f(x) = 1+x|x|$ has an inverse.
$f_{\ge}(x):= f(x) = 1+x^2$ , for $x\ge 0$, strictly increasing .
$f_{\lt}(x)=f(x) = 1-x^2$ , for $x\lt 0$ , strictly decreasing.
2) Now you invert $f_{\ge}$ and $f_{\lt}$,
(User Mohammad).
$\endgroup$