# How does one visualize a function with a discontinuous second derivative?

Let us assume that all functions are continuous. I was teaching my calculus students the other day. We were talking about what points of non-differentiability look like. Two ways a function can fail to be differentiable at a point is if it looks like $y=|x|$ or like a Brownian motion (think of $x\sin x$ for instance), where the derivative oscillates too much. However, I do not have an intuition about $C^1$ functions and how they differ from $C^i$ functions for higher $i$. An example that I know is the function $$f(x)=x^2,x\geq 0\mbox{ and }f(x)=-x^2,x\leq 0.$$ The graph of this actually looks smooth to me. So the question rephrased may be:

how can one visually tell the difference between $C^1$ functions and $C^2$ functions in a straight forward way.

• Daubechies wavelets give examples of functions that are $C^k$ but not $C^{k+1}$. But visually it won't be very easy to tell the difference, when a curve is at least $C^1$. Of course you can also use $f(x)=x^k$ when $x>0$ and $f(x)=0$ otherwise Mar 15, 2013 at 15:58
• In general you’re going to have a hard time doing it visually: there’s little visual difference between your quadratic example and $f(x)=x^3$. Mar 15, 2013 at 15:59
• @BrianM.Scott I was afraid that this could be an answer (or non-answer), but I will hold out some hope. Mar 15, 2013 at 16:02
• Nit-pick: I would replace where the derivative oscillates too much with "where the difference quotient oscillates too much". Differentiability at a point is mostly independent of the behavior of the derivative at nearby points, and besides, the more immediate notion is the behavior of the difference quotients based at the point as you approach the point. Jan 7, 2014 at 15:17

It will be hard to distinguish $C^1$ and $C^2$ functions visually in general. One thought is that if $f'$ is continuous whereas $f''$ has a point of discontinuity then the signed radius of curvature will have so too, the signed radius of curvature being $$R=\frac{\left(1+f'(x)^2\right)^{3/2}}{f''(x)}$$ where normally $|R|$ is referred to as the radius of curvature. In your example this signed radius of curvature jumps from $-\frac{1}{2}$ to $+\frac{1}{2}$ showing that the center of the osculating circle jumps from $(0,-0.5)$ to $(0,+0.5)$ at $x=0$:

For $g(x)=x^3$ something different happens. Though the radius of curvature changes sign at $x=0$ it changes via limits of $-\infty$ and $+\infty$ since $g''(x)=0$. In general, a $C^2$ curve has to 'straighten out any curvature' before curving in a different direction.

Also sudden changes in curvature will not be allowed such as for instance the curve $h(x)=x^4$ for $x<0$ and $h(x)=x^2$ for $x\geq 0$ which has $h''(x)=12x^2$ for $x<0$ and $h''(x)=2$ for $x>0$ so that $h''(x)$ has the ambiguity of choosing between the value $0$ and $2$ for $x=0$.

Nevertheless this is a very subtle property when looking at the curves.

• The animation was very helpful. Thank you. Jan 7, 2014 at 23:21