# 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...

-
Yes, it’s called the range (or by some the image). – Brian M. Scott Dec 2 '12 at 10:33

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$.

-

A more analytic approach: $f$ is continuous and so the range of $f$ is $R=[f_{\min},f_{\max}]$. $f^{\prime}(x)>0\Leftrightarrow 4-2x>0\Leftrightarrow x<2$ and $f^{\prime}(x)<0\Leftrightarrow 4-2x<0\Leftrightarrow x>2$.

$f$ is increasing in $[0,2]$ and then decreasing in $[2,3]$. Therefore, since $f(0)=-1<2=f(3)$ and $f(2)=3$, $R=[-1,3]$. To make $f$ surjective you need to take $B=[-1,3]$. $f$ is not injective in $[0,3]$ but it is injective in the intervals $[0,2]$ and $[2,3]$. Therefore a parabola may be injective depending on the choice of your domain for $f$

-