# What are some examples of non differentiable functions?

Mar 13, 2015

There are three ways a function can be non-differentiable. We'll look at all 3 cases.

Case 1
A function in non-differentiable where it is discontinuous.

Example (1a) f$\left(x\right) = \cot x$ is non-differentiable at $x = n \pi$ for all integer $n$.

graph{y=cotx [-10, 10, -5, 5]}

Example (1b) $f \left(x\right) = \frac{{x}^{3} - 6 {x}^{2} + 9 x}{{x}^{3} - 2 {x}^{2} - 3 x}$ is non-differentiable at $0$ and at $3$ and at $- 1$
Note that $f \left(x\right) = \frac{x {\left(x - 3\right)}^{2}}{x \left(x - 3\right) \left(x + 1\right)}$
Unfortunately, the graphing utility does not show the holes at $\left(0 , - 3\right)$ and $\left(3 , 0\right)$

graph{(x^3-6x^2+9x)/(x^3-2x^2-3x) [-10, 10, -5, 5]}

Example 1c) Define $f \left(x\right)$ to be $0$ if $x$ is a rational number and $1$ if $x$ is irrational. The function is non-differentiable at all $x$.

Example 1d) description : Piecewise-defined functions my have discontiuities.

Case 2
A function is non-differentiable where it has a "cusp" or a "corner point".
This occurs at $a$ if $f ' \left(x\right)$ is defined for all $x$ near $a$ (all $x$ in an open interval containing $a$) except at $a$, but ${\lim}_{x \rightarrow {a}^{-}} f ' \left(x\right) \ne {\lim}_{x \rightarrow {a}^{+}} f ' \left(x\right)$. (Either because they exist but are unequal or because one or both fail to exist.)

Example 2a) $f \left(x\right) = \left\mid x - 2 \right\mid$ Is non-differentiable at $2$.
(This function can also be written: f(x)=sqrt(x^2-4x+4))

graph{abs(x-2) [-3.86, 10.184, -3.45, 3.57]}

Example 2b) $f \left(x\right) = x + \sqrt{{x}^{2} - 2 x + 1}$ Is non-differentiable at $1$.

graph{x+root(3)(x^2-2x+1) [-3.86, 10.184, -3.45, 3.57]}

Case 3

A function is non-differentiable at $a$ if it has a vertical tangent line at $a$.
$f$ has a vertical tangent line at $a$ if $f$ is continuous at $a$ and

${\lim}_{x \rightarrow a} \left\mid f ' \left(x\right) \right\mid = \infty$

Example 3a) $f \left(x\right) = 2 + \sqrt{x - 3}$ has vertical tangent line at $1$. And therefore is non-differentiable at $1$.

graph{2+(x-1)^(1/3) [-2.44, 4.487, -0.353, 3.11]}

Example 3b) For some functions, we only consider one-sided limts: $f \left(x\right) = \sqrt{4 - {x}^{2}}$ has a vertical tangent line at $- 2$ and at $2$.

${\lim}_{x \rightarrow 2} \left\mid f ' \left(x\right) \right\mid$ Does Not Exist, but

${\lim}_{x \rightarrow {2}^{-}} \left\mid f ' \left(x\right) \right\mid = \infty$

graph{sqrt(4-x^2) [-3.58, 4.213, -1.303, 2.592]}

Example 3c) $f \left(x\right) = \sqrt{{x}^{2}}$ has a cusp and a vertical tangent line at $0$.

graph{x^(2/3) [-8.18, 7.616, -2.776, 5.126]}