Let $f:\mathbb{R}\to\mathbb{R}$ be a function defined as follows:

$$f(x) = \begin{cases} x^2 : x>0\\ 1-x : x\leq0\\ \end{cases}$$

I have to calculate the pre-image of the interval $[-2,3)$

We know that the function's image are the positive real numbers, then we can simplify the interval this way:

$$f^{-1}([-2,3))=f^{-1}((0,3))\cup f^{-1}([-2,0])=f^{-1}((0,3))$$

Because negative images don't exist.

To calculate $f^{-1}((0,3))$ I did this:

For the positive part of the function, $f(x)=x^2$


For the negative part of the function, $f(x)=1-x$


$f(x)=1-x$ is defined only for negative numbers and 0, then:


Finally, the pre-image of the function should be the sum of the two intervals:

$f^{-1}([-2,3)) = (0,\sqrt3)\cup (-2,0]=(-2,\sqrt3)$


$f^{-1}(0) = a \longrightarrow f(a)=0 \longrightarrow \begin{cases} 0 = 1-a \rightarrow a=1 \\ 0 = a^2 \longrightarrow a=0\\ \end{cases}$

$a=1$ is not a pre-image as $1>0$ then the interval $1-x$ of the function is not applied.

$a=0$ is not a pre-image as $f(0)=1$

From this I get that $f^{-1}(0)$ does not exist.

Then: $$f^{-1}([-2,3))=(-2,\sqrt3)-\{0\}$$

red = f(x), black = f^{-1}(x)

In the image it is shown the inverse of the function in the interval $-2\leq f(x)\leq 3$ which is in fact what I got, but the 0 is what I'm not sure about.


Yes you way is right but we need also to include the $x=0$ value in the preimage indeed

$$f(0)=1 \in [-2,3)$$

  • $\begingroup$ So $f^{-1}(0)$ exists? $\endgroup$ – user605734 MBS Nov 10 '18 at 13:35
  • $\begingroup$ @user605734MBS Yes I agree $f^{-1}(\{0\})=\emptyset$ (note that we need to use set notation inside) but $f(0)=1$ therefore $0$ is in the preimage and thus $$f^{-1}([-2,3))=(-2,\sqrt3)$$ $\endgroup$ – gimusi Nov 10 '18 at 13:40
  • $\begingroup$ This is because the function is continuous, right? $\endgroup$ – user605734 MBS Nov 10 '18 at 13:43
  • 1
    $\begingroup$ @user605734MBS No the finction is not continuous at $x=0$ but for $x=0$ the value for the function $f(0)=1$ is within the interval $[-2,3)$ and therefore also \${0\}$ is in the preimage of that interval. Revise careully the definition. $\endgroup$ – gimusi Nov 10 '18 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.