A piecewise function is one that has different operations, depending on the values of the input
The piecewise function is;
Reason:
The general form of the absolute value function is presented as follows;
The function given in the graph are;
Domain; -5 ≤ x < 0
Function;
Domain; 0 < x ≤ 2
Points on the graph are;
(0, -2), and (2, 2)
Slope = (2 - (-2))/(2 - 0) = 2
g(x) - (-2) = 2·(x - 0)
∴ Function; g(x) = 2·x - 2
Domain; 2 ≤ x ≤ 5
Function; g(x) = 2
Therefore, we have the following piecewise function;
Learn more about piecewise functions here: