While practicing problems on functions, I am getting a lot of incorrect answers from the given answers. I am a little confused by this as the problems seem simple else I haven't really understood the underlying principles. Can you guys help me figure if my answers are correct?
$f:x \rightarrow |x| + |x-2|$ ,My Answer: $[2,\infty)$ ,Given:$[0,\infty)$
$f:x \rightarrow |x+1| + |x-3|$ ,My Answer: $[4,\infty)$ ,Given: $[0,\infty)$
$f:x \rightarrow x + |x-4|$ ,My Answer: $\mathbb{R}$ ,Given: $[4,\infty)$
Thanks for your help.
For 3), if $x \leq 4$ then $$ x + |x-4| = x + (4-x) = 4, $$ and if $x > 4$ then $$ x + |x-4| > x. $$ So the given answer is correct for 3), that is the range is $[4,\infty)$, not $\mathbb{R}$.
For 1) and 2), your answers are correct. For 1), it is useful to consider the cases $x \leq 0$, $0 \leq x \leq 2$, and $x \geq 2$, and for 2) the cases $x \leq -1$, $-1 \leq x \leq 3$, and $x \geq 3$.