Share JSXGraph: example "Discontinuous derivative"
Share JSXGraph: example "Discontinuous derivative"
This website is a beta version. The official release will be in **2024**.
// 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});
})();