// Define the id of your board in BOARDID
const board = JXG.JSXGraph.initBoard(BOARDID, {
axis: true,
boundingbox: [-3, 3, 50, 0.5]
});
var line = board.create('line', [
[-10, Math.E],
[100, Math.E]
], {
strokeColor: 'red',
strokeWidth: 2,
layer: 4
});
var seq = board.create('curve', [
[0],
[1]
], {
strokeColor: 'blue',
strokeWidth: 2
});
var seq_add = function() {
var n = seq.dataX.length,
val = Math.pow(1 + 1 / n, n);
seq.dataX.push(n);
seq.dataY.push(val);
};
var series = board.create('curve', [
[0],
[1]
], {
strokeColor: 'black',
strokeWidth: 2
});
var series_add = function() {
var n = series.dataX.length,
val = series.dataY[n - 1] + 1 / JXG.Math.factorial(n);
series.dataX.push(n);
series.dataY.push(val);
};
var txt1 = board.create('text', [15, 1.6, function() {
return 'n=' + (seq.dataX.length - 1) + ': value = ' + seq.dataY[seq.dataY.length - 1];
}], {
strokeColor: 'blue',
fixed: true
});
var txt2 = board.create('text', [15, 1.8, function() {
return 'n=' + (series.dataX.length - 1) + ': value = ' + series.dataY[series.dataY.length - 1];
}], {
strokeColor: 'black',
fixed: true
});
var approx = function() {
seq_add();
series_add();
board.update();
if (seq.dataX.length <= 50) {
setTimeout(approx, 500);
}
}
approx();
This example is licensed under a Creative Commons Attribution 4.0 International License.
Please note that you have to mention The Center of Mobile Learning with Digital Technology in the credits.
/*
This example is licensed under a
Creative Commons Attribution 4.0 International License.
https://creativecommons.org/licenses/by/4.0/
Please note that you have to mention
The Center of Mobile Learning with Digital Technology
in the credits.
*/
const BOARDID = 'your_div_id'; // Insert your id here!
const board = JXG.JSXGraph.initBoard(BOARDID, {
axis: true,
boundingbox: [-3, 3, 50, 0.5]
});
var line = board.create('line', [
[-10, Math.E],
[100, Math.E]
], {
strokeColor: 'red',
strokeWidth: 2,
layer: 4
});
var seq = board.create('curve', [
[0],
[1]
], {
strokeColor: 'blue',
strokeWidth: 2
});
var seq_add = function() {
var n = seq.dataX.length,
val = Math.pow(1 + 1 / n, n);
seq.dataX.push(n);
seq.dataY.push(val);
};
var series = board.create('curve', [
[0],
[1]
], {
strokeColor: 'black',
strokeWidth: 2
});
var series_add = function() {
var n = series.dataX.length,
val = series.dataY[n - 1] + 1 / JXG.Math.factorial(n);
series.dataX.push(n);
series.dataY.push(val);
};
var txt1 = board.create('text', [15, 1.6, function() {
return 'n=' + (seq.dataX.length - 1) + ': value = ' + seq.dataY[seq.dataY.length - 1];
}], {
strokeColor: 'blue',
fixed: true
});
var txt2 = board.create('text', [15, 1.8, function() {
return 'n=' + (series.dataX.length - 1) + ': value = ' + series.dataY[series.dataY.length - 1];
}], {
strokeColor: 'black',
fixed: true
});
var approx = function() {
seq_add();
series_add();
board.update();
if (seq.dataX.length <= 50) {
setTimeout(approx, 500);
}
}
approx();
<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>
<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 that you have to mention
The Center of Mobile Learning with Digital Technology
in the credits.
*/
const BOARDID = 'board-0';
const board = JXG.JSXGraph.initBoard(BOARDID, {
axis: true,
boundingbox: [-3, 3, 50, 0.5]
});
var line = board.create('line', [
[-10, Math.E],
[100, Math.E]
], {
strokeColor: 'red',
strokeWidth: 2,
layer: 4
});
var seq = board.create('curve', [
[0],
[1]
], {
strokeColor: 'blue',
strokeWidth: 2
});
var seq_add = function() {
var n = seq.dataX.length,
val = Math.pow(1 + 1 / n, n);
seq.dataX.push(n);
seq.dataY.push(val);
};
var series = board.create('curve', [
[0],
[1]
], {
strokeColor: 'black',
strokeWidth: 2
});
var series_add = function() {
var n = series.dataX.length,
val = series.dataY[n - 1] + 1 / JXG.Math.factorial(n);
series.dataX.push(n);
series.dataY.push(val);
};
var txt1 = board.create('text', [15, 1.6, function() {
return 'n=' + (seq.dataX.length - 1) + ': value = ' + seq.dataY[seq.dataY.length - 1];
}], {
strokeColor: 'blue',
fixed: true
});
var txt2 = board.create('text', [15, 1.8, function() {
return 'n=' + (series.dataX.length - 1) + ': value = ' + series.dataY[series.dataY.length - 1];
}], {
strokeColor: 'black',
fixed: true
});
var approx = function() {
seq_add();
series_add();
board.update();
if (seq.dataX.length <= 50) {
setTimeout(approx, 500);
}
}
approx();
</script>
<jsxgraph width="100%" aspect-ratio="1 / 1" title="Approximation of e" description="This construction was copied from JSXGraph examples database: http://jsxgraph.uni-bayreuth.de/share/" useGlobalJS="false">
/*
This example is licensed under a
Creative Commons Attribution 4.0 International License.
https://creativecommons.org/licenses/by/4.0/
Please note that you have to mention
The Center of Mobile Learning with Digital Technology
in the credits.
*/
const board = JXG.JSXGraph.initBoard(BOARDID, {
axis: true,
boundingbox: [-3, 3, 50, 0.5]
});
var line = board.create('line', [
[-10, Math.E],
[100, Math.E]
], {
strokeColor: 'red',
strokeWidth: 2,
layer: 4
});
var seq = board.create('curve', [
[0],
[1]
], {
strokeColor: 'blue',
strokeWidth: 2
});
var seq_add = function() {
var n = seq.dataX.length,
val = Math.pow(1 + 1 / n, n);
seq.dataX.push(n);
seq.dataY.push(val);
};
var series = board.create('curve', [
[0],
[1]
], {
strokeColor: 'black',
strokeWidth: 2
});
var series_add = function() {
var n = series.dataX.length,
val = series.dataY[n - 1] + 1 / JXG.Math.factorial(n);
series.dataX.push(n);
series.dataY.push(val);
};
var txt1 = board.create('text', [15, 1.6, function() {
return 'n=' + (seq.dataX.length - 1) + ': value = ' + seq.dataY[seq.dataY.length - 1];
}], {
strokeColor: 'blue',
fixed: true
});
var txt2 = board.create('text', [15, 1.8, function() {
return 'n=' + (series.dataX.length - 1) + ': value = ' + series.dataY[series.dataY.length - 1];
}], {
strokeColor: 'black',
fixed: true
});
var approx = function() {
seq_add();
series_add();
board.update();
if (seq.dataX.length <= 50) {
setTimeout(approx, 500);
}
}
approx();
</jsxgraph>
/*
This example is licensed under a
Creative Commons Attribution 4.0 International License.
https://creativecommons.org/licenses/by/4.0/
Please note that you have to mention
The Center of Mobile Learning with Digital Technology
in the credits.
*/
const BOARDID = 'your_div_id'; // Insert your id here!
const board = JXG.JSXGraph.initBoard(BOARDID, {
axis: true,
boundingbox: [-3, 3, 50, 0.5]
});
var line = board.create('line', [
[-10, Math.E],
[100, Math.E]
], {
strokeColor: 'red',
strokeWidth: 2,
layer: 4
});
var seq = board.create('curve', [
[0],
[1]
], {
strokeColor: 'blue',
strokeWidth: 2
});
var seq_add = function() {
var n = seq.dataX.length,
val = Math.pow(1 + 1 / n, n);
seq.dataX.push(n);
seq.dataY.push(val);
};
var series = board.create('curve', [
[0],
[1]
], {
strokeColor: 'black',
strokeWidth: 2
});
var series_add = function() {
var n = series.dataX.length,
val = series.dataY[n - 1] + 1 / JXG.Math.factorial(n);
series.dataX.push(n);
series.dataY.push(val);
};
var txt1 = board.create('text', [15, 1.6, function() {
return 'n=' + (seq.dataX.length - 1) + ': value = ' + seq.dataY[seq.dataY.length - 1];
}], {
strokeColor: 'blue',
fixed: true
});
var txt2 = board.create('text', [15, 1.8, function() {
return 'n=' + (series.dataX.length - 1) + ': value = ' + series.dataY[series.dataY.length - 1];
}], {
strokeColor: 'black',
fixed: true
});
var approx = function() {
seq_add();
series_add();
board.update();
if (seq.dataX.length <= 50) {
setTimeout(approx, 500);
}
}
approx();
<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>
<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 that you have to mention
The Center of Mobile Learning with Digital Technology
in the credits.
*/
const BOARDID = 'board-0';
const board = JXG.JSXGraph.initBoard(BOARDID, {
axis: true,
boundingbox: [-3, 3, 50, 0.5]
});
var line = board.create('line', [
[-10, Math.E],
[100, Math.E]
], {
strokeColor: 'red',
strokeWidth: 2,
layer: 4
});
var seq = board.create('curve', [
[0],
[1]
], {
strokeColor: 'blue',
strokeWidth: 2
});
var seq_add = function() {
var n = seq.dataX.length,
val = Math.pow(1 + 1 / n, n);
seq.dataX.push(n);
seq.dataY.push(val);
};
var series = board.create('curve', [
[0],
[1]
], {
strokeColor: 'black',
strokeWidth: 2
});
var series_add = function() {
var n = series.dataX.length,
val = series.dataY[n - 1] + 1 / JXG.Math.factorial(n);
series.dataX.push(n);
series.dataY.push(val);
};
var txt1 = board.create('text', [15, 1.6, function() {
return 'n=' + (seq.dataX.length - 1) + ': value = ' + seq.dataY[seq.dataY.length - 1];
}], {
strokeColor: 'blue',
fixed: true
});
var txt2 = board.create('text', [15, 1.8, function() {
return 'n=' + (series.dataX.length - 1) + ': value = ' + series.dataY[series.dataY.length - 1];
}], {
strokeColor: 'black',
fixed: true
});
var approx = function() {
seq_add();
series_add();
board.update();
if (seq.dataX.length <= 50) {
setTimeout(approx, 500);
}
}
approx();
</script>
<jsxgraph width="100%" aspect-ratio="1 / 1" title="Approximation of e" description="This construction was copied from JSXGraph examples database: http://jsxgraph.uni-bayreuth.de/share/" useGlobalJS="false">
/*
This example is licensed under a
Creative Commons Attribution 4.0 International License.
https://creativecommons.org/licenses/by/4.0/
Please note that you have to mention
The Center of Mobile Learning with Digital Technology
in the credits.
*/
const board = JXG.JSXGraph.initBoard(BOARDID, {
axis: true,
boundingbox: [-3, 3, 50, 0.5]
});
var line = board.create('line', [
[-10, Math.E],
[100, Math.E]
], {
strokeColor: 'red',
strokeWidth: 2,
layer: 4
});
var seq = board.create('curve', [
[0],
[1]
], {
strokeColor: 'blue',
strokeWidth: 2
});
var seq_add = function() {
var n = seq.dataX.length,
val = Math.pow(1 + 1 / n, n);
seq.dataX.push(n);
seq.dataY.push(val);
};
var series = board.create('curve', [
[0],
[1]
], {
strokeColor: 'black',
strokeWidth: 2
});
var series_add = function() {
var n = series.dataX.length,
val = series.dataY[n - 1] + 1 / JXG.Math.factorial(n);
series.dataX.push(n);
series.dataY.push(val);
};
var txt1 = board.create('text', [15, 1.6, function() {
return 'n=' + (seq.dataX.length - 1) + ': value = ' + seq.dataY[seq.dataY.length - 1];
}], {
strokeColor: 'blue',
fixed: true
});
var txt2 = board.create('text', [15, 1.8, function() {
return 'n=' + (series.dataX.length - 1) + ': value = ' + series.dataY[series.dataY.length - 1];
}], {
strokeColor: 'black',
fixed: true
});
var approx = function() {
seq_add();
series_add();
board.update();
if (seq.dataX.length <= 50) {
setTimeout(approx, 500);
}
}
approx();
</jsxgraph>