Given the piecewise function:
So, for the given function, we will graph it as follows:
1) graph the line (-0.5x-4) as x less than or equal to -2
To graph the line, we need two points
We will substitute with two values less than -2 and calculate the corresponding values of f(x)
When x = -4, f(x) = -0.5 * -4 - 4 = -2
When x = -6, f(x) = -0.5 * -6 - 4 = -1
So, the line will pass through the points ( -4, -2) and ( -6, -1)
The line will start from the point ( -2, -3)
The dot at x = -2 will be closed.
2) Graph the line (y = 5) as x between -2 and 4
The line will be horizontal at this interval
the dot at x = -2 will be open
The dot at x = 4 will be closed
3) Graph the line ( -x + 5 ) as x greater than 4
As in (1), substitute with 2 values of x greater than 4
When x = 5, f(x) = -5 + 5 = 0
When x = 6, f(x) = -6 + 5 = -1
So, the line will pass through the points ( 5, 0 ) and ( 6, -1 )
The graph of the function will be as shown in the following picture: