Discontinuous derivative

From JSXGraph Wiki
Revision as of 11:30, 13 February 2019 by A WASSERMANN (talk | contribs)

Jump to: navigation, search

Consider the function (blue curve)

[math] 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]f[/math] is a continous and differentiable. The derivative of [math]f[/math] is the function (red curve)

[math] 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}\,. [/math]

We observe that [math]f'(0) = 0[/math], but [math]\lim_{x\to0}f'(x)[/math] does not exist.

Therefore, [math]f'[/math] is an example of a derivative which is not continuous.

Here is another example:

[math] g: \mathbb{R} \to \mathbb{R}, x \mapsto \begin{cases} x^2(1-x)^2\sin(1/(\pi x(1-x)),& 0\ltx\lt 1\\ 0,& \mbox{otherwise} \end{cases}\,. [/math]


The underlying JavaScript code

First example:

var board = JXG.JSXGraph.initBoard('jxgbox', {axis:true, boundingbox:[-1/2,1/2,1/2,-1/2]});

var g = board.create('functiongraph', ["((sin((1 / ((PI * x) * (1 - x)))) * ((2 * (x * ((1 - x)^2))) - (2 * ((x^2) * (1 - x))))) - (((x^2) * ((1 - x)^2)) * (cos((1 / ((PI * x) * (1 - x)))) * (((PI * (1 - x)) - (PI * x)) / (((PI * x) * (1 - x))^2)))))"], {strokeColor: 'red'});
var f = board.create('functiongraph', ["x^2*sin(1/x)"], {strokeWidth:2});