0
$\begingroup$

In a document that I've seen, it says that if $f$ is defined on $\mathbb{R}$, then

$$|f(x)| = \begin{cases} f(x), & x \geq 0 \\ -f(x), & x < 0\text{.} \end{cases}$$

This is consistent with the definition of $|x|$ that I've seen, so I had no reason to believe this definition was wrong. But there's one thing that confuses me: if $f(x) = x^2$,

$$|x^{2}| = \begin{cases} x^{2}, & x \geq 0 \\ -x^{2}, & x < 0\text{.} \end{cases}$$ There's a problem here: if $x < 0$, $-x^2$ is clearly negative. Thus, there's something wrong with the definition of $|f(x)|$ I have above since $|f(x)| \geq 0$ for all $x$ (or at least, it should be that way).

What is it?

$\endgroup$
2
  • 3
    $\begingroup$ It should be $$\lvert f(x)\rvert =\begin{cases} f(x) &, f(x) \geqslant 0\\ -f(x) &, f(x) < 0. \end{cases}$$ $\endgroup$ Jun 10, 2014 at 18:14
  • $\begingroup$ Wow, that was simple - surprised I didn't catch that. Thanks! $\endgroup$ Jun 10, 2014 at 18:16

1 Answer 1

2
$\begingroup$

As Daniel Fischer points out, you have the wrong definition. In view of this, your second function is properly written

$$ |x^2| = \begin{cases} x^2, \quad x^2 \geq 0 \\ -x^2, \quad x^2 < 0 \end{cases} $$

and the second condition never applies.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .