0

For example, if I have $f(x)= \begin{cases} x & \text{if } x\neq0, \\ 0 & \text{if } x = 0. \end{cases}$ and I take the derivative: $f'(x)= \begin{cases} 1 & \text{if } x\neq0, \\ 0 & \text{if } x = 0. \end{cases}$ then is the derivative of $f$ at $0$ equal to $0$ or $1$? Since evidently, the function is a continuous straight line, but according to the piecewise function, the derivative at $x=0$ is $0$.

Similarly, if I have $f(x)= \begin{cases} |x| & \text{if } x\neq0, \\ 0 & \text{if } x = 0. \end{cases}$, with derivative $f(x)= \begin{cases} \frac{x}{|x|} & \text{if } x\neq0, \\ 0 & \text{if } x = 0. \end{cases}$ then would the derivative at $x=0$ be $0$ or DNE?

Or another case with $f(x) = \begin{cases} x^2 \sin(1/x) &\mbox{if } x\neq 0 \\ 0 & \mbox{if } x=0. \end{cases}$. Does the derivative in this case at $x=0$ equal $0$ or DNE?

2 Answers2

3

Do we have any rule of differentiation that allows us to conclude something like

$$ f(x)=\begin{cases}f_1(x), &x \in E_1, \\ f_2(x), & x\in E_2, \\ \quad \vdots \end{cases} \qquad\color{red}{\stackrel{?}{\implies}}\qquad f'(x)=\begin{cases}f'_1(x), &x \in E_1, \\ f'_2(x), & x\in E_2, \\ \quad \vdots \end{cases} \quad \text{?}$$

Well, the answer is NO, as you have already observed. The best thing we can hope for is that

$$ f'(x)=\begin{cases}f'_1(x), &x \in \operatorname{int}(E_1), \\ f'_2(x), & x \in \operatorname{int}(E_2), \\ \quad \vdots \\ ???, & \text{elsewhere}, \end{cases} $$

where $\operatorname{int}(E)$ denotes the interior of $E$, which is the largest open set contained in $E$. For example,

  • If $E$ is any of the four intervals $[a , b]$, $[a, b)$, $(a, b]$, $(a, b)$), then $\operatorname{int}(E) = (a, b)$.

  • If $E = \{0\}$, then $\operatorname{int}(E) = \varnothing$.

What happens to $f'(x)$, when $x$ does not belong to any of $\operatorname{int}(E_i)$'s, cannot be determined by the rules of differentiation alone. This is one of the cost you have to pay when gluing functions together, and you have to resort to the very definition of the differential coefficient,

$$ f'(x) := \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}, $$

to investigate the existence and value of $f'(x)$, if exists.

Sangchul Lee
  • 181,930
0

In the first two of your examples, there was a main function with one point excluded from its domain, and another point which filled in the gap, making the graph a continuous function. In these cases, the piecewise function is indistinguishable from the implied function. For example, if we have the functions $f(x)$ and $g(x)$ where:

$f(x)= \begin{cases} x^2 \;\; \text{for} \;\; x\neq1 \\ 1 \;\;\;\, \text{for} \;\; x=1 \end{cases}\\ g(x)=x^2$

Then, we can say that $f(x)=g(x)$.

Therefore, $f’(1)=g’(1)=2$.

In your third example, the graph of $y=x^2\sin(\frac1x)$ naturally has a discontinuity at $x=0$. In this case, it is best to approximate the derivative by using the limit, as mentioned by Sangchul Lee and Julio Puerta.

VV_721
  • 799