Non-Differentiable Functions

Questions on Differentiability, Piecewise Functions, and Graphical Meanings

Questions on the differentiability of functions with emphasis on piecewise functions are presented along with their answers.

Graphical Meaning of Non-Differentiability

Which functions are non-differentiable?

Let \( f \) be a function whose graph is \( G \). From the definition, the value of the derivative of a function \( f \) at a certain value of \( x \) is equal to the slope of the tangent line to the graph \( G \). We can say that \( f \) is not differentiable for any value of \( x \) where a tangent cannot exist, or where a tangent exists but is vertical (a vertical line has an undefined slope, hence an undefined derivative).

Below are graphs of functions that are not differentiable at \( x = 0 \) for various reasons:

Example 1: Sharp Corner (No Tangent)

Function \( f \) below is not differentiable at \( x = 0 \) because there is no unique tangent to the graph at \( x = 0 \) (try to draw a tangent at \( x = 0 \)!)

non differentiable function example 1
Example 2: Cusp / Sharp Point

Function \( g \) below is not differentiable at \( x = 0 \) because there is no tangent to the graph at \( x = 0 \).

non differentiable function example 2
Example 3: Jump Discontinuity

Function \( h \) below is not differentiable at \( x = 0 \) because there is a jump in the value of the function, and the function is not continuous at \( x = 0 \).

non differentiable function example 3
Example 4: Vertical Asymptote

Function \( j \) below is not differentiable at \( x = 0 \) because it increases indefinitely (no limit) on each side of \( x = 0 \), and from its formula is undefined and thus discontinuous at \( x = 0 \).

non differentiable function example 4
Example 5: Vertical Tangent

Function \( k \) below is not differentiable because the tangent at \( x = 0 \) is vertical, and therefore its slope (the value of the derivative at \( x = 0 \)) is undefined.

non differentiable function example 5

Theorem

Theorem: If a function \( f \) is differentiable at \( x = a \), then it is continuous at \( x = a \).

Contrapositive of the theorem: If function \( f \) is not continuous at \( x = a \), then it is not differentiable at \( x = a \).

Common mistakes to avoid: If \( f \) is continuous at \( x = a \), it does not necessarily mean \( f \) is differentiable at \( x = a \).

NOTE: Although functions \( f \), \( g \), and \( k \) (whose graphs are shown above) are continuous everywhere, they are not differentiable at \( x = 0 \).

Examples with Solutions

Analytical Proofs of Non-Differentiability

Example 1: Piecewise Function Non-Differentiability

Problem: Show analytically that function \( f \) defined below is non-differentiable at \( x = 0 \):

\[ f(x) = \begin{cases} x^2 & x > 0 \\ -x & x < 0 \\ 0 & x = 0 \end{cases} \]

Solution:

One way to answer the question is to calculate the derivative at \( x = 0 \) using the limit of the difference quotient. Since function \( f \) is defined using different formulas, we need to evaluate the derivative using left-hand and right-hand limits:

\[ f'(x) = \lim_{h\to 0} \frac{f(x+h) - f(x)}{h} \]

On the left of \( x = 0 \) (\( x < 0 \)), the derivative is calculated as follows:

\[ f'(0) = \lim_{h\to 0^{\mathbf{-}}} \frac{f(0+h) - f(0)}{h} = \lim_{h\to 0^-} \frac{-h - 0}{h} = -1 \]

On the right of \( x = 0 \) (\( x > 0 \)), the derivative is calculated as follows:

\[ f'(0) = \lim_{h\to 0^{\mathbf{+}}} \frac{f(0+h) - f(0)}{h} = \lim_{h\to 0^+} \frac{h^2 - 0}{h} = \lim_{h\to 0^+} h = 0 \]

The limits to the left and to the right of \( x = 0 \) are not equal (\(-1 \neq 0\)), and therefore \( f'(0) \) is undefined. Hence, function \( f \) is not differentiable at \( x = 0 \).

The graph of function \( f \) is shown below, where it is clear that no unique tangent can be drawn at \( x = 0 \):

non differentiable function example 1

More References and Links