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?
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)|$.