# Image of Subset under Mapping/Examples/Image of 1 to 2 under x^2-x-2

## Example of Image 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 image of the closed interval $\closedint {-3} 2$ is:

$f \closedint 1 2 = \closedint {-2} 0$

## Proof

Trivially, by differentiating $x^2 - x - 2$ with respect to $x$:

$f' = 2 x - 1$

It is seen that, on $\closedint 1 2$, $f$ is strictly increasing.

Hence it suffices to inspect the images of the endpoints $1$ and $2$.

Thus:

$\map f 1 = 1^2 - 1 - 1 = -2$
$\map f 2 = 2^2 - 2 - 2 = 0$

The result follows.

$\blacksquare$