Q:

Easy question about surjectivity for $f(x) = 4x-(x^2+1)$

Let $f : [0,3] \rightarrow B$ be defined by $f(x) = 4x-(x^2+1)$. Determine the image domain (or maybe it's called range in English?) B so that the function becomes surjective. Does it become invertible?

How should I approach this? I've been thinking:

By graphing the function, I can see that the lowest
  value is when $f(0) = -1$ and the highest is when $f(2) = 3$.
To make the function surjective, I need to map every value from the domain to the range. Therefore, $B = [-1,3]$.
Since the function is a parabola, it is not invertible.
So, $f : [0,3] \rightarrow [-1,3], f(x) = 4x-(x^2+1)$ is surjective but not invertible.

Am I wrong? I have nothing to compare my answer to so I don't really know...

A:

Even though it’s a parabola, it might be invertible on the domain $[0,3]$, much as $g(x)=x^2$ is invertible on the domain $[0,3]$. However, $f(1)=4-2=2=12-10=f(3)$, so $f$ is not injective on $[0,3]$ and therefore is not invertible on $[0,3]$.
You could probably find this example of non-injectivity by examining the graph of $y=f(x)$. I simply set
$$y=f(x)=4x-(x^2+1)=-x^2+4x-1\;,$$
rearranged that as $x^2-4x+1+y=0$, and used the quadratic formula to find that
$$x=\frac{4\pm\sqrt{16-4y}}2=2\pm\sqrt{4-y}\;.$$
You’d already observed that the extreme values of $y$ are $-1$ and $3$, so I looked at these values of $y$ to get a better idea of what was going on and was fortunate with $y=3$.
I mention this because it’s sometimes quite useful to realize that when $y$ is a quadratic function of $x$, you can solve for $x$ in terms of $y$, though the result isn’t a function on $\Bbb R$.

