# Math Help - derivative of absolute function

1. ## derivative of absolute function

I can use Wolfram to derive abs(cos x) and abs(x+2) and abs(ln x) etc. but is there a general derivative for this?

2. ## Re: derivative of absolute function

If f(x) positive, lf(x)l = f(x)
If f(x) negative, lf(x)l = -f(x)

3. ## Re: derivative of absolute function

The absolute function is differentiable everywhere except x = 0. This is trivially provable.

$\displaystyle u = |x|,\ and\ x < 0 \implies u(x) = - x \implies u'(x) = \lim_{h \rightarrow 0}\dfrac{u(x + h) - u(x)}{h} = \lim_{h \rightarrow 0}\dfrac{- (x + h) - (- x)}{h} = \lim_{h \rightarrow 0}\dfrac{- x - h + x}{h} = - 1.$

$\displaystyle u = |x|,\ and\ x > 0 \implies u(x) = x \implies u'(x) = \lim_{h \rightarrow 0}\dfrac{u(x + h) - u(x)}{h} = \lim_{h \rightarrow 0}\dfrac{x + h - x}{h} = + 1.$

But $\displaystyle \lim_{h \rightarrow 0^+}\dfrac{|0 + h| - |0|}{h} = \dfrac{h}{h} = 1 \ne -1 = \dfrac{-h}{h} = \lim_{h \rightarrow 0^-}\dfrac{|0 + h| - |0|}{h}$. The limit does not exist at x = 0.

So, by the chain rule, $y(x) = u(v(x)) \implies y'(x) = u'(v) * v'(x)$ unless v(x) = 0.

4. ## Re: derivative of absolute function

There is a good explanation of the general derivative here: [SOLVED] Derivative of function involving absolute values

5. ## Re: derivative of absolute function

cos x at x=0 is no problem.
anywhere f(x) changes sign may be a discontiuity in derivative of absolute value. usually it's obvious by inspection.

6. ## Re: derivative of absolute function

Hartlw makes an important clarification to my post. The key point is whether the limit of the Newton quotient exists at a when v(a) = 0, not whether v(a) = 0.