How do you differentiate #f(x) = abs(5x-2)#?

2 Answers
Jun 21, 2015

This graph has two derivatives, and an undefined one at its corner. The two derivatives are simply the positive and the negative slope, so the graph's right half has a derivative of #5# and its left half, #-5#. Its corner would be where #5x - 2# and #-5x + 2# meet.

#5x - 2 = -5x + 2#
#10x = 4#
#x = 2/5#

#pm(5(2/5) - 2) = 2 - 2 = 0#

Therefore, the two halves meet at #(2/5, 0)#, and the derivative is defined for #(-oo, 2/5) uu (2/5, oo)#. At #(2/5, 0)#, there are two different derivatives depending on which side you approach the limit, and so it is considered undefined.

graph{|5x - 2| [-1, 2, -1.215, 4]}

Jun 21, 2015

I rewrite it as a piecewise defined function and differentiate each piece.

Explanation:

#f(x) = abs (5x-2) =# # {(5x-2," if ",5x-2 >= 0),(0, " if ", 5x-2 =0),(-(5x-2), " if ", 5x-2 < 0):}#

# = {(5x-2," if ",x >= 2/5),(0, " if ", x =2/5),( -5x+2, " if ", x < 2/5):}#

For #x>2/5#, we get #f'(x) = 5#

For #x < 2/5#, we get #f'(x) = -5#

Because the left and right derivatives are different at #x = 2/5#, the (two-sided) derivative, #f'(2/5)#, does not exist.
(In fact, there is a corner (cusp) at that point.)