To write the for the given graph, we need to find the equation of the line representing each piece and then restrict the accordingly.
The First Piece
Let's begin by finding the and of the first piece of the function.
This line has a slope of
-1 and the
y-intercept is
-1. We can write the equation for this piece in .
y=-1x+(-1)⇔y=-x−1
The Second Piece
Now let's take a look at the second piece.
This line has a slope of
1 and the
y-intercept is
2. We can write the equation for this piece in slope-intercept form.
y=1x+2⇔y=x+2
Combining the Pieces
We can add the equations of these lines to the piecewise .
f(x)={-x−1x+2
Finally, we need to determine the domain for each equation. The
jump
occurs at
x=0, so this will be where the domains are divided. We cannot have an overlap in our domains so we need to take notice of where the closed and open circles are located.
The closed circle at the end of the first piece tells us that its domain includes
0. The open circle at the beginning of the second piece tells us that its domain does not include
0.
f(x)={-x−1,x+2,x≤0x>0