Discontinuous derivative
From JSXGraph Wiki
Consider the function
- [math]\displaystyle{ f: \mathbb{R} \to \mathbb{R}, x \mapsto \begin{cases} x^2\sin(1/x),& x\neq 0\\ 0, x=0 \end{cases}\,. }[/math]
[math]\displaystyle{ f }[/math] is a continous and differentiable. But the derivative of [math]\displaystyle{ f\lt /\lt math\gt is the function :\lt math\gt f': \mathbb{R} \to \mathbb{R}, x \mapsto \begin{cases} 2\sin(1/x) - \cos(1/x), &x \neq 0\\ 0, x=0 \end{cases}\,. \lt math\gt We observe that \lt math\gt f'(0) = 0 }[/math] but [math]\displaystyle{ \lim_{x\to0}f'(x) }[/math] does not exist.
Therefore, [math]\displaystyle{ f' }[/math] is an example of a derivative which is not continuous.
The underlying JavaScript code
var board = JXG.JSXGraph.initBoard('jxgbox', {axis:true, boundingbox:[-1/2,1/2,1/2,-1/2]});
var g = board.create('functiongraph', ["2*sin(1/x) - cos(1/x)"], {strokeColor: 'red'});
var f = board.create('functiongraph', ["x^2*sin(1/x)"], {strokeWidth:2});