Let $f$ be defined as $$f(x)=\begin{cases}x-1&-1\le x \le0\\x^2&0 \le x \le 1\end{cases}$$ and $$g(x)=sin x$$ Then find $$h(x) = f(|g(x)|) + |f(g(x))|$$
I have drawn $f(x)$:
How do I draw $h(x)$ from here?
Let $f$ be defined as $$f(x)=\begin{cases}x-1&-1\le x \le0\\x^2&0 \le x \le 1\end{cases}$$ and $$g(x)=sin x$$ Then find $$h(x) = f(|g(x)|) + |f(g(x))|$$
I have drawn $f(x)$:
How do I draw $h(x)$ from here?
Copyright © 2021 JogjaFile Inc.

I assume that $g(x)$ is also defined in the interval $[-1,1]$.
Take at first the interval $[-1,0]$. Then $g(x)= \sin(x) \le 0$ but $|\sin(x)| \ge 0$. Therefore
$$x\in [-1,0] \quad \to \quad h(x) = f(|\sin(x)|) + |f(\sin(x))| = \sin^2(x) + |\sin(x) - 1| \\ = \sin^2(x) + |1-\sin(x) | = \sin^2(x) + 1-\sin(x), $$ In the last line I used the fact that $(1-\sin(x)) \ge 0\to |1-\sin(x)|=1-\sin(x))$.
Now for the second part of interval, $[0,1]$,
$$x\in [0,1] \quad \to \quad h(x) = f(|\sin(x)|) + |f(\sin(x))| = \sin^2(x) + \sin^2(x) = 2\sin^2(x).$$