The function in the graph is:
f(x) = x + 2 -----> in (-∞, -1)
f(x) = 1 -----> in (-1, 1)
f(x) = 2x - 1 -----> in (1, ∞)
How to find the equation?
A piecewise function is a function that behaves differently in different parts of its domain.
The first part is a line that goes from (-∞, -1).
The slope of the line is 1, so we can write:
y = x + b
To find the value of b, we use the fact that it passes through (-2, 0)
0 = -2 + b
2 = b
So this equation is y = x + 2
Then we have a constant in (-1, 1) at y = 1
Finally we have other linear equation, the slope is 2, and it passes through (1, 1) then we get:
1 = 2*1 + b
1 - 2 = b
-1 = b
The line is:
y = 2x - 1
So the piecewise function is:
f(x) = x + 2 -----> in (-∞, -1)
f(x) = 1 -----> in (-1, 1)
f(x) = 2x - 1 -----> in (1, ∞)