JSXGraph logo
JSXGraph
JSXGraph share

Share

Discontinuous derivative
QR code
<iframe
src="http://jsxgraph.uni-bayreuth.de/share/iframe/discontinuous-derivative"
style="border: 1px solid black; overflow: hidden; width: 550px; aspect-ratio: 55 / 65;"
name="JSXGraph example: Discontinuous derivative"
allowfullscreen
></iframe>
This code has to
<div id="board-0-wrapper" class="jxgbox-wrapper " style="width: 100%; ">
<div id="board-0" class="jxgbox" style="aspect-ratio: 1 / 1; width: 100%;" data-ar="1 / 1"></div>
</div>
<div id="board-1-wrapper" class="jxgbox-wrapper " style="width: 100%; ">
<div id="board-1" class="jxgbox" style="aspect-ratio: 1 / 1; width: 100%;" data-ar="1 / 1"></div>
</div>
<script type = "text/javascript">
/*
This example is licensed under a
Creative Commons Attribution 4.0 International License.
https://creativecommons.org/licenses/by/4.0/
Please note you have to mention
The Center of Mobile Learning with Digital Technology
in the credits.
*/
const BOARDID0 = 'board-0';
const BOARDID1 = 'board-1';
const BOARDID = BOARDID0;
(function() {
const board = JXG.JSXGraph.initBoard(BOARDID0, {axis:true, boundingbox:[-1/2, 1/2, 1/2, -1/2]});
var g = board.create('functiongraph', ["2*x*sin(1/x) - cos(1/x)"], {strokeColor: 'red'});
var f = board.create('functiongraph', ["x^2*sin(1/x)"], {strokeWidth:2});
})();
(function() {
const board = JXG.JSXGraph.initBoard(BOARDID1, {axis:true, boundingbox:[-1/2, 0.08, 1.5, -0.02]});
var g_der = board.create('functiongraph', [
"(0 < x && x < 1) ? ((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))))) : 0"],
{strokeColor: 'red'});
var g = board.create('functiongraph', ["(0 < x && x < 1) ? x^2*(1-x)^2*sin(1/(PI* x*(1-x))) : 0"],
{strokeWidth:2});
})();
</script>
/*
This example is licensed under a
Creative Commons Attribution 4.0 International License.
https://creativecommons.org/licenses/by/4.0/
Please note you have to mention
The Center of Mobile Learning with Digital Technology
in the credits.
*/
const BOARDID0 = 'your_div_id_0'; // Insert your 1st board id here!
const BOARDID1 = 'your_div_id_1'; // Insert your 2nd board id here!
(function() {
const board = JXG.JSXGraph.initBoard(BOARDID0, {axis:true, boundingbox:[-1/2, 1/2, 1/2, -1/2]});
var g = board.create('functiongraph', ["2*x*sin(1/x) - cos(1/x)"], {strokeColor: 'red'});
var f = board.create('functiongraph', ["x^2*sin(1/x)"], {strokeWidth:2});
})();
(function() {
const board = JXG.JSXGraph.initBoard(BOARDID1, {axis:true, boundingbox:[-1/2, 0.08, 1.5, -0.02]});
var g_der = board.create('functiongraph', [
"(0 < x && x < 1) ? ((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))))) : 0"],
{strokeColor: 'red'});
var g = board.create('functiongraph', ["(0 < x && x < 1) ? x^2*(1-x)^2*sin(1/(PI* x*(1-x))) : 0"],
{strokeWidth:2});
})();
<jsxgraph width="100%, 100%" aspect-ratio="1 / 1, 1 / 1" numberOfBoards="2" title="Discontinuous derivative" description="This construction was copied from JSXGraph examples database: BTW HERE SHOULD BE A GENERATED LINKuseGlobalJS="false">
/*
This example is licensed under a
Creative Commons Attribution 4.0 International License.
https://creativecommons.org/licenses/by/4.0/
Please note you have to mention
The Center of Mobile Learning with Digital Technology
in the credits.
*/
(function() {
const board = JXG.JSXGraph.initBoard(BOARDID0, {axis:true, boundingbox:[-1/2, 1/2, 1/2, -1/2]});
var g = board.create('functiongraph', ["2*x*sin(1/x) - cos(1/x)"], {strokeColor: 'red'});
var f = board.create('functiongraph', ["x^2*sin(1/x)"], {strokeWidth:2});
})();
(function() {
const board = JXG.JSXGraph.initBoard(BOARDID1, {axis:true, boundingbox:[-1/2, 0.08, 1.5, -0.02]});
var g_der = board.create('functiongraph', [
"(0 < x && x < 1) ? ((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))))) : 0"],
{strokeColor: 'red'});
var g = board.create('functiongraph', ["(0 < x && x < 1) ? x^2*(1-x)^2*sin(1/(PI* x*(1-x))) : 0"],
{strokeWidth:2});
})();
</jsxgraph>

Discontinuous derivative

Examples of continuous, differentiable functions with discontinuous derivative.

First example

Consider the function (blue curve)

f:R→R,x↦{x2sin(1/x),x≠00,x=0. fff is a continuous and differentiable function. The derivative of fff is the function (red curve)

f′:R→R,x↦{2xsin(1/x)−cos(1/x),x≠00,x=0. We observe that f′(0)=0f'(0) = 0f​′​​(0)=0, but limx→0f′(x)\lim_{x\to0}f'(x)lim​x→0​​f​′​​(x) does not exist.

Therefore, f′f'f​′​​ is an example of a derivative which is not continuous.

Second example

g:R→R,x↦{x2(1−x)2sin(1πx(1−x)),0<x<10,otherwise.

Here, the derivative is not continuous for x=0x=0x=0 and x=1x=1x=1.

JSXGraph v1.11.1 Copyright (C) see https://jsxgraph.org0.10.20.30.4−0.1−0.2−0.3−0.40.10.20.30.4−0.1−0.2−0.3−0.4
0,0
–o+←↓↑→
JSXGraph v1.11.1 Copyright (C) see https://jsxgraph.org0.20.40.60.811.21.4−0.2−0.40.010.020.030.040.050.060.07−0.01
0,0
–o+←↓↑→
// Define the ids of your boards in BOARDID0, BOARDID1,...
(function() {
const board = JXG.JSXGraph.initBoard(BOARDID0, {axis:true, boundingbox:[-1/2, 1/2, 1/2, -1/2]});
var g = board.create('functiongraph', ["2*x*sin(1/x) - cos(1/x)"], {strokeColor: 'red'});
var f = board.create('functiongraph', ["x^2*sin(1/x)"], {strokeWidth:2});
})();
(function() {
const board = JXG.JSXGraph.initBoard(BOARDID1, {axis:true, boundingbox:[-1/2, 0.08, 1.5, -0.02]});
var g_der = board.create('functiongraph', [
"(0 < x && x < 1) ? ((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))))) : 0"],
{strokeColor: 'red'});
var g = board.create('functiongraph', ["(0 < x && x < 1) ? x^2*(1-x)^2*sin(1/(PI* x*(1-x))) : 0"],
{strokeWidth:2});
})();

license

This example is licensed under a Creative Commons Attribution 4.0 International License.
Please note you have to mention The Center of Mobile Learning with Digital Technology in the credits.