Let $f$ be defined on $[-2,2]$ as $$f(x)=\begin{cases}-1&-2\le x\le0\\x-1&0\le x\le2\end{cases}$$ If $g(x)=f(|x|)+|f(x)|$, then find g(x).
I have drawn $f(x)$:
How do I draw $g(x)$ from here?
Let $f$ be defined on $[-2,2]$ as $$f(x)=\begin{cases}-1&-2\le x\le0\\x-1&0\le x\le2\end{cases}$$ If $g(x)=f(|x|)+|f(x)|$, then find g(x).
I have drawn $f(x)$:
How do I draw $g(x)$ from here?
On
for $f(|x|)$, it's simply to remove the portion of negative $x- axis$ and mirror the remaining graph along y axis. Thus $f(|x|)=|x|-1$ (you can see it via your function too. $-1$ becomes irrelevant as $|x|\notin[-2,0]$.
for $|f(x)|$ simply remove the negative y- axis portion of graph and mirror the remaining about x- axis. this graph have , surprisingly no contribution towards net result as at each $x$ there present a corresponding $y$, $-y$ pair which will cance out each other.
Therefore the required graph is nothing but $y=|x|-1$
I think that a picture will be the clearest possible answer, but if you need more explanations just ask!