Preimage of Subset under Mapping/Examples/Preimage of -2 to 0 under x^2-x-2

Example of Preimage of Subset under Mapping
Let $f: \R \to \R$ be the mapping defined as:


 * $\forall x \in \R: \map f x = x^2 - x - 2$

The preimage of the closed interval $\closedint {-2} 0$ is:


 * $f^{-1} \closedint {-2} 0 = \closedint {-1} 0 \cup \closedint 1 2$

Proof
Trivially, by differentiating $x^2 - x - 2$ $x$:
 * $f' = 2 x - 1$

and equating $f'$ to $0$, the minimum of $\Img f$ is seen to occur at $\map f {\dfrac 1 2} = -\dfrac 9 4$.

We see that $\closedint {-2} 0$ is well within the codomain of $f$.

Hence we should be able to solve for $\map f x = -2$ and $\map f x = 0$ and get two values for each.

So:

Then:

The result follows.