How do you use the definition of a derivative to find the derivative of f(x) = |x|f(x)=|x|?

1 Answer
Nov 24, 2016

f'(x) = { (-1, x<0), ("undefined",x=0), (1,x>0) :}

Explanation:

By definition of the derivative f'(x)=lim_(h rarr 0) ( f(x+h)-f(x) ) / h
So with f(x) = |x| we have;

f'(x) = lim_(h rarr 0) ( |x+h| - |x| ) / h
:. f'(x) = lim_(h rarr 0) (( |x+h| - |x| )) / h (( |x+h| + |x| ))/(( |x+h| + |x| ))
:. f'(x) = lim_(h rarr 0) ( (|x+h|)^2 -(|x|)^2) / ( h( |x+h| + |x| ))
:. f'(x) = lim_(h rarr 0) ( (x+h)^2 -x^2) / ( h( |x+h| + |x| ))
:. f'(x) = lim_(h rarr 0) ( x^2+2hx+h^2 -x^2) / ( h( |x+h| + |x| ))
:. f'(x) = lim_(h rarr 0) ( 2hx+h^2 ) / ( h( |x+h| + |x| ))
:. f'(x) = lim_(h rarr 0) ( 2x+h ) / ( |x+h| + |x| )
:. f'(x) = ( 2x + 0) / ( |x+0| + |x| )
:. f'(x) = ( 2x ) / (2 |x| )
:. f'(x) = x / |x|

Which if you think about it for a moment, we can write as;
f'(x) = { (-1, x<0), ("undefined",x=0), (1,x>0) :}

The above maths is actually a lot easier if you go straight to the definition of |x|, as in:

|x| = { (-x, x<0), (0 , x=0), (x, x>0) :}

And if we graph y=|x|, the result should be obvious, as is the reason for f'(x) being undefined at x=0 (despite y=|x| being continuous when x=0)

graph{|x| [-10, 10, -5, 5]}

As, { ("differentiability" ,rArr, "continuity"), ("continuity", !rArr, "differentiability") :}