I understand that the graph of a real-valued function $g$ where $g(x)=f(x-h)$ is a horizontal translation of the graph of $f$. But is this true for certain piecewise-defined functions?
In particular, I'm thinking of something like
$ f(x) = \left\{ \begin{array}{lr} x-2, \;\;\; x≥0\\ -2x,\;\;\;\; x<0 \end{array} \right.$
Now consider the function $g(x) = f(x + 3)$. Normally I would feel comfortable substituting $x + 3$ for $x$ in $f(x)$ to get a rule for $g$, but I'm not totally sure how to do that here. Is $g$ given by
$ g(x) = \left\{ \begin{array}{lr} x+1, \;\;\;\;\;\;\; x≥0\\ -2x - 6,\;\;\; x<0 \end{array} \right.$ or by $ g(x) = \left\{ \begin{array}{lr} x+1, \;\;\;\;\;\;\; x≥-3\\ -2x - 6,\;\;\; x<3 \end{array} \right.$ The second is a horizontal translation of $f$, but the first is not. I feel slightly queasy about substituting $x+3$ for $x$ in the intervals used in the piecewise definition in the second case above. I'm not sure why I'd be justified in doing this, though it's the only way to get the expected translation out of $g(x) = f(x + 3)$.
So, which one is correct, and why?