1
$\begingroup$

Why is the differentiability of a piecewise defined function often studied using the definition of derivative?

For example, let: $\begin{align*} f(x) &= x\cdot |x-1|\\ &= \left\{ \begin{array}{lcl}x (-x+1)& \text{if} & x < 1 \\ x (x-1) & \text{if} & x \geq 1 \end{array} \right.\\ &= \left\{ \begin{array}{lcl}-x^2+x& \text{if} & x < 1 \\ x^2-x & \text{if} & x \geq 1 \end{array} \right. \end{align*}$

$f$ is continuous in $\mathbb{R} $ except, maybe, when $x=1$: $\begin{align*} \lim_{x \to 1^{-}} f(x) &= \lim_{x \to 1} (-x^2+x) = 0\\ \lim_{x \to 1^{+}} f(x)&= \lim_{x \to 1} (x^2 -x) = 0 \end{align*}$

$f$ is continuous when $x=1$ because: $ \lim_{x \to 1^{-}} f(x) = \lim_{x \to 1^{+}} f(x) = f(1) $

As to the differentiability at that point (by derivative's definition):

$\begin{align*} \lim_{h \to 0^{-}} \frac{f(1+h)-f(1)}{h} &= \lim_{h \to 0} \frac{\left[-(1+h)^2 + (1+h)\right] - \left[-1^2 + 1\right]}{h}\\ &= \lim_{h\to 0} \frac{- h(h+1)}{h} = -1\\ \strut\\ \lim_{h \to 0^{+}} \frac{f(1+h)-f(1)}{h} &= \lim_{h \to 0} \frac{\left[(1+h)^2 - (1+h)\right] - \left[1^2 - 1\right]}{h}\\ &= \lim_{h\to 0} \frac{h(h+1)}{h} = 1 \end{align*}$

$ \lim_{h \to 0^{-}} \frac{f(1+h)-f(1)}{h} \neq \lim_{h \to 0^{+}} \frac{f(1+h)-f(1)}{h} $

so $f$ is not differentiable when $x=0$.

The "second" method is:

f'(x) = \left\{ \begin{array}{lcl} -2x + 1& \text{if} & x < 1 \\ 2x-1 & \text{if} & x > 1 \end{array} \right.

f'(1^{-}) = -1 \neq f'(1^{+}) = 1

Is there any case in which the differentiability study by using the derivative (the second method) would be wrong?

1 Answers 1

4

Consider the function $f(x) = \left\{\begin{array}{ll} x^2\sin\left(\frac{1}{x}\right) &\text{if }x\neq 0,\\ 0 &\text{if }x=0. \end{array}\right.$

The function is differentiable at $0$, with derivative equal to $0$: $\begin{align*} \lim_{h\to 0}\frac{f(h)-f(0)}{h} &= \lim_{h\to 0}\frac{h^2\sin(\frac{1}{h})}{h} \\ &=\lim_{h\to 0}h\sin(\frac{1}{h}) = 0. \end{align*}$ However, using the "second method", we look at the derivative of $x^2\sin(\frac{1}{x})$: \left(x^2\sin\left(\frac{1}{x}\right)\right)' = 2x\sin\frac{1}{x} - \cos\frac{1}{x}. And $\lim_{x\to 0}\left(2x\sin\frac{1}{x}-\cos\frac{1}{x}\right)$ does not exist. Using the method, we would incorrectly conclude that the derivative does not exist at $0$.

In general, a derivative does not have to be continuous; so the second method may yield "false negatives", functions that are differentiable but which the technique suggests are not.

  • 0
    @AlbertT. If you wish you can see the function by [Googling x^2*sin(1/x)](https://www.google.se/search?q=sin%281%2Fx%29&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:sv-SE:official&client=firefox-a#hl=sv&client=firefox-a&hs=pH1&rls=org.mozilla:sv-SE%3Aofficial&sclient=psy-ab&q=x^2*sin%281%2Fx%29&oq=x^2*sin%281%2Fx%29&aq=f&aqi=g-L1g-vCL2g-jCL1&aql=&gs_l=serp.3..0i19j0i15i33i19l2j0i18i33i19.9293l11527l0l12468l4l4l0l0l0l1l217l655l0j3j1l4l0.frgbld.&pbx=1&fp=1&biw=1525&bih=725&bav=on.2,or.r_gc.r_pw.r_qf.,cf.osb&cad=b).2012-03-28