2

Let $f,g:\mathbb{R}\rightarrow\mathbb{R}$ be functions given by $$f(x)=(x-1)^2 \quad \text{and}\quad g(y) \ \begin{cases}0,\qquad \qquad y<0\\\sqrt{y}+1\quad\quad y\geq 0.\end{cases} $$ Show that $g\circ f = \mathfrak{i}_\mathbb{R}$ where $\mathfrak{i}_\mathbb{R}$ is the identity function on $\mathbb{R}$.
Determine $f\circ g$.

I tried doing the first part and seem to not be getting it...
Suppose $x\geq 1$. Then $f(x)\geq 0$.
We have $g(f(x)) = \sqrt{(x-1)^2} + 1 = |x-1| + 1 = x-1+1 = x$
Now suppose $x<1$. Then $f(x)\geq 0$ and so
$g(f(x)) = \sqrt{(x-1)^2}+1 = |x-1|+1 = 1-x + 1 = 2-x$

I don't see how this is the identity function.

Also, I see that the range of $g$ is $[1,\infty]\cup\{0\}$.

Natash1
  • 1,379

1 Answers1

2

You are right, the question is wrong.

$$g(f(0)) = g(1)=\sqrt{1}+1=2 \neq 0.$$

As for $f \circ g$, just consider $y<0$ and $y \geq 0$ and evaluate separately.

Siong Thye Goh
  • 149,520
  • 20
  • 88
  • 149
  • Thank you, and so (assuming that $g\circ f$ was actually the identity function), this is why $f,g$ cannot be inverses of each other right? Because $f\circ g$ is not the identity function in $\mathbb{R}$ (the later question asked why $f,g$ are not inverse of each other) – Natash1 Nov 10 '17 at 06:12
  • Yes, as long as one of them is not the identiy function, they are not inverse of each other. We should not expect $f$ to have an inverse, it is neither injective nor surjective. – Siong Thye Goh Nov 10 '17 at 06:18