Hauptsatz der Differential- und Integralrechnung: Unterschied zwischen den Versionen
Markierung: Manuelle Zurücksetzung |
Markierung: Zurückgesetzt |
||
Zeile 41: | Zeile 41: | ||
</head> | </head> | ||
<body> | <body> | ||
<div id="box2" style="width: | <div id="box2" style="width:500px; height:500px;"></div> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
JXG.Options.text.useMathJax = true; | // MathJax in JSXGraph aktivieren | ||
// | JXG.Options.text.useMathJax = true; | ||
var board = JXG.JSXGraph.initBoard('box2', { | |||
boundingbox: [-5, 5, | // JSXGraph-Board erstellen | ||
var board = JXG.JSXGraph.initBoard('box2', { | |||
boundingbox: [-5, 5, 5, -5], // Angepasste Boundingbox für die Skalierung | |||
axis: true, | axis: true, | ||
showCopyright: false, | showCopyright: false, | ||
Zeile 85: | Zeile 87: | ||
// Funktion erstellen | // Funktion erstellen | ||
var c1 = board.create('functiongraph', [function(t) { | var c1 = board.create('functiongraph', [function(t) { | ||
return (Math.pow(t, 5) / 24 - Math.pow(t, 3) / 2 + t | return (Math.pow(t, 5) / 24 - Math.pow(t, 3) / 2 + t; | ||
}]); | }]); | ||
Zeile 115: | Zeile 117: | ||
} | } | ||
}); | }); | ||
// Integral-Label anpassen | // Integral-Label anpassen | ||
i1.label.setText(() => { | i1.label.setText(() => { | ||
Zeile 121: | Zeile 123: | ||
const b = i1.baseRight.X().toFixed(2); // Obere Grenze | const b = i1.baseRight.X().toFixed(2); // Obere Grenze | ||
const value = i1.Value().toFixed(4); // Wert des Integrals | const value = i1.Value().toFixed(4); // Wert des Integrals | ||
return `\\[\\int_{${a}}^{${b}} f( | return `\\[\\int_{${a}}^{${b}} f(x) \\, dx = ${value}\\]`; | ||
}); | }); | ||
// MathJax nach jeder Änderung neu ausführen | |||
i1.label.onUpdate = function() { | |||
// MathJax neu rendern | |||
if (typeof MathJax !== 'undefined' && MathJax.typesetPromise) { | |||
MathJax.typesetPromise(); | |||
} | |||
}; | |||
// Beschriftung der Funktion mit f | // Beschriftung der Funktion mit f | ||
board.create('text', [3.5, 3, 'f'], { | board.create('text', [3.5, 3, 'f'], { |