Hello,

write f without absolute values:

Now you can calculate the derivative

Since x has the coefficient 1 in your original equation the derivative could be only 1 or -1. You only have to determine the point where the slope is changing: The zeros of the absolute value.