$g(x) = f (|x|)$ versus $g(x) = | f(x)|$ ( image of absolute value of$ x$ versus absolute value of the image of $x$ )

664 Views Asked by At

In this post :

Help me understand $y=f(x)$ vs. $y=f(|x|)$ intuitively

a question double question was asked

(1) what is the difference betwee f(x) and f( |x| )

(2) and what is the difference between f(|x|) and |f(x)|.

It seems to me that answers concentrate on the first part of the question and do not offer detailed explanations relatively to the second part.

Hence my question : what is the difference between f(|x|) and |f(x)|? Are there possible cases where there is no difference ( at least extensionnaly) between the two functions?

3

There are 3 best solutions below

1
On BEST ANSWER

Graphically, $f(|x|)$ is obtained from $f(x)$ by drawing $f(x)$ for $x \geq 0$, and then also reflecting that graph across the $y$-axis.

$|f(x)|$ is obtained from $f(x)$ by drawing $f(x)$ and then reflecting any part that is below the $x$-axis so that it is above the $x$-axis.

You cannot always go from one to the other because both functions "forget" some information about $f(x)$ that might be necessary to construct the other. However, for any $a \in \mathbb{R}$ such that $a \geq 0$ and $f(a) \geq 0$, we have $f(|a|)=|f(a)|$.

0
On

If $f(x) \ge 0$ over the entire $\mathbb{R}$ and in addition $f(x)$ is an even function over $\mathbb{R}$, then $f(|x|) = |f(x)|$.

Consider, for example, $f(x) = -x^3$ over $\mathbb{R}$. You have $$ f(|x|) = -|x|^3 = \begin{cases} -x^3, & x \ge 0 \\ x^3. & x < 0 \end{cases}. $$ In addition, $$ |f(x)| = |-x^3| = x^3, \quad \forall x \in \mathbb{R}. $$

Another interesting example where $f(|x|) = |f(x)|$ is $f(x) = x^3$. Think about why that is (thinking of $f$ being odd will help).

0
On

$f(|x|)=\begin{cases}f(x)&\text{ if }x\geqslant 0\\f(-x)&\text{ otherwise.}\end{cases}$

and

$|f(x)|=\begin{cases}f(x)&\text{ if }f(x)\geqslant 0\\-f(x)&\text{ otherwise.}\end{cases}$

$f(|x|)$ and $|f(x)|$ are equal if $f(x)$ is always non-negative and it should also be even