Verification of solution: Injectivity, surjectivity, preimage of $f(x)=x^2-x$ for $x\geq0$, $f(x)=-x$ for $x\lt 0$

75 Views Asked by At

$$f(x)=\begin{cases} x^2-x &\quad x\geq0\\ -x, &\quad x< 0\\\end{cases}$$ (a) Is $f$ surjective? Find the range of the function. for $x\geq0$: $$x^2-x=x(x-1)$$ $$x=y^2-y=\left(y-\frac12\right)^2-\frac12$$ $$\sqrt{x+\frac12}+\frac12 = f^{-1}$$ $$\text{The domain of the inverse is: }x\geq\frac12\text{ so that is also the range of } f(x) $$

Now for $x<0$: $$-y=x$$ $$-x=f^{-1} $$ So the domain of the inverse of the second function can be anything, so the whole range of $f(x)=y$ would be: $y\in\mathcal R\text{ without the interval: } \left(0,\frac12\right]$

The next question: Is the function injective?

It is not injective since we have: for $x\geq0$: $$x(x-1)\text{ has two zeros, so we have: } x_1=0, \quad x_2 = 1, \quad f(x_1)=f(x_2),\quad x_1\neq x_2$$

Now also for $x<0$: $$y = -x $$ Because function is falling at every single point: $f^{'}(x)=-1$ the function is injective here. We could also say that $f(-x)=-(-x)=x\neq -x$ that's why it also is not injective.

Next question : Find the biggest interval that contains $0$ and that the function is injective. Also find the inverse of this function.

So we already know that when $x<0$ the function is injective. So let's see if $x\leq0$ is also injective. If I understand correctly this means that the function should not have two or more different domain values there, let's see if it does: $$\text{when x = 0 : }\,f(x)=x^2-x\quad \text{when we put $0$ as $x$ we get:}\,0$$

Now how to get inverse of the function that is on this interval? We know that $-x=y$ also has a $y=0$ value. So we can find the inverse of $g(x)=-x$, $x\leq0$ function. We get $g^{-1}(x)=-x$.

The last question: Find the preimage of the function $f^{-1}([0,1])$
I don't quite understand this last one. I am still going to post this under solution verification since I answered all the other questions and maybe made some mistakes.

2

There are 2 best solutions below

0
On BEST ANSWER

a) Is $f: \mathbb{R} \rightarrow \mathbb{R}$ surjective?

No. The global minimum of $f$ is $x^* = 1/2$, where the function takes the value $1/4-1/2 = -1/4$. This is true because the function is decreasing but positive on $-\infty,0)$, strictly increasing and positive on $x>1$, and on the compact interval $[0,1]$, there is a unique critical point and the function is strictly convex. So $f:\mathbb{R} \rightarrow [-1/4,\infty)$.

b) Is $f$ injective?

No. Like you said, $x(x-1)=0$ has two solutions, 0 and 1, so $f$ is not one-to-one.

c) The function is injective on $(-\infty,1/2)$ and $(1/2,\infty)$, since it is strictly decreasing on the first interval and strictly increasing on the second.

d) The preimage of $[0,1]$ is $\{x:f(x) \in [0,1]\}$. That includes $[-1,0]$, but nothing less than $-1$; it does not include $(0,1)$, since those values are mapped to negative numbers. At $1$, the function is increasing and takes the value zero, and at the largest solution of $x(x-1)=1$, $(1+\sqrt{5})/2$, the function takes the value 1. At any value greater than 1, the function is above 1, and strictly increase, so no further values are included. So the preimage is $[-1,0] \cup [1,(1+\sqrt{5})/2]$.

0
On

1) No point in switching variables

The range of $y= f(x)$ is $y =x^2-x; x\ge 0$ is $x^2 - x -y = 0$ so $x=\frac {1\pm\sqrt{1+4y}}2\ge 0$. The requirement for that is $y \ge -\frac 14$ so the range is $(-\frac 14, \infty)$ and if $y< -\frac 14$ there is no $x \ge 0$ so that $f(x) =-\frac 14$.

But for all $y \ge -\frac 14$ there is $x=\frac {1+\sqrt{1+4y}}2> 0$ there is. (And if $\sqrt{1+4y} < 1$ we have $x = \frac {1-\sqrt{1+4y}}2$ as a second possible value).

And if $x < 0$ then $y = -x > 0$ so for all $y > 0$ there is an $x < 0$ so that $f(x) = y$ but for $y< 0$ three are no $x < 0$ so that $f(x) =y$.

putting those together if $y < -\frac 14$ there is no $x$ pos, neg or zero so that $f(x)=y$ so $f$ is not surjective.

2) Injective.

If $f(x) = y$ then either $x\ge 0$ and $x = \frac {1\pm \sqrt{1+4y}}2$ will be so that $f(x)= y$. If $\sqrt{1+4y} < 1$ or if $0< 1+4y < 1$ or $(-\frac 14, 0)$ there will be two such positive $x$ so that $f(x) =y$ so $f$ is not injective.

Furthermore if $y=0$ there are $x=0$ and $x= 1$ so that $f(x) = 0$

ANd if $y > 0$ there if $x = \frac {1+ \sqrt{1+4y}}2$ and $x =-y$ so that $f(x) = y$.

So not injective.

3) Preimage of $[0,1]=\{x| f(x)\in [0,1]\}=$

$\{x \ge 0| 0\le x^2 - x \le 1\} \cup \{x < 0| 0\le -x \le 1}$.

If $x \ge 0$ and $0\le x(x-1) \le 1$. $x(x-1) =0$ if $x=0;x=1$ and $x(x-1)=1$ if $x^2 -x -1 =0$ and $x =\frac {1\pm \sqrt 5}2$ so $x = \frac {1+\sqrt 5}2$. so $f(x)\in [0,1]$. And if $0< x< 1$ then $f(x) < 0$ so if $x\ge 0$ and $f(x) \in[0,1]$ then $1\le x \le \frac {1+\sqrt 5}2$ or $x = 0$.

And if $x< 0$ then $f(x) =-x \in [0,1]$ if and only if $-1\le x< 0$.

So the preimage is $[1,0)\cup\{0\} \cup [1,\frac {1 + \sqrt 5}2]$.