A piecewise function is one that has different operations, depending on the values of the input
The piecewise function is;
[tex]g(x) = \begin{cases} -\left | x + 2 \right |&\mathbf{ \text{ if } -5 \leq x < 0 }\\ 2 \cdot x - 2 &\mathbf{ \text{ if } 0 < x \leq 2}\\ 2 &\mathbf{ \text{ if } 2 \leq x \leq 5}\end{cases}[/tex]
Reason:
The general form of the absolute value function is presented as follows;
[tex]f(x) = \mathbf{a \left | x - h \right | + k}[/tex]
The function given in the graph are;
Domain; -5 ≤ x < 0
Function; [tex]g(x) = -\left | x + 2 \right |[/tex]
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;
[tex]g(x) = \mathbf{ \begin{cases} -\left | x + 2 \right |& \text{ if } -5 \leq x < 0 \\ 2 \cdot x - 2 & \text{ if } 0 < x \leq 2\\ 2 & \text{ if } 2 \leq x \leq 5\end{cases}}[/tex]
Learn more about piecewise functions here:
https://brainly.com/question/12700276
https://brainly.com/question/3860983
https://brainly.com/question/16855064