David W. answered 04/05/19
Experienced Prof
First, recognize that f(x) must be defined as a piecewise functiion. This is because the absolute value of a number is always positive. When graphing this function, all of the points (except at x=0) will be above the x-axis; the point (0,0) is on the x-axis (and is the y-intercept of both line segments).
Seond, since f(x) is a function, it may have only one value at the point x=0. so the piecewise definition must indicate which single condition specifies this.
Third, since the domain is given (-2 < x ≤ 1),
for -2 < x < 0, the range will be -4 < y < 0 [let's exclude f(0) on this part of the definition];
for 0 ≤ x ≤ 1, the range will be 0 ≤ x ≤ 2 [let's include f(0) on this part of the definition.
The slope-intercept form of the equation of a line is quite useful; so is the fact that 2 points determine a line (or line segment).
f(x) =
-2x for x in -2 < x < 0 this line segment is drawn as o----• with end-points at (-2,-4) and (0,0)
2x for x in 0 ≤ x ≤ 1 this line segment is drawn as •-----• with end-points at (0,0) and (1,2)
undefined for other values of x
Simply "connect the dots" (but don't go beyond them) to plot this function. The plot will look like a large "V".