This function involves absolute values. To find the slope on the
slide use different equations to define the function in different
parts of its domain.
A point moves on a line segment. A function depends on the position
of the point. Where do you expect the point to be for a minimum of
this function to occur.