Answer: f(x) = 4 if -1 ≤x ≤ 1
f(x) = x - 1 if 3≤ x ≤ 5
Explanation:
if -1 ≤x ≤ 1
We can see that in this range the function is constant, f(x) = 4
if 3≤ x ≤ 5
In this region we can see a linear relationship, with the points (3, 2) and (5, 4)
as the extremes, we can find the slope of this linear equation as:
s = (4 - 2)/(5 - 3) = 2/2 = 1
So our equation is
f(x) = 1*x + b
to find the value of b we can evaluate our function in the first point, we know that when x = 3, y = 2, so we have:
2 = 1*3 + b
b = 2- 3 = -1
then f(x) = 1*x - 1
Then we have:
f(x) = 4 if -1 ≤x ≤ 1
f(x) = x - 1 if 3≤ x ≤ 5