Hauptsatz der Differential- und Integralrechnung: Unterschied zwischen den Versionen
Markierung: Zurückgesetzt |
|||
Zeile 41: | Zeile 41: | ||
</head> | </head> | ||
<body> | <body> | ||
<div id="box2" style="width: | <div id="box2" style="width:15%; aspect-ratio:3/2; margin-top:20px;"></div> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
JXG.Options.text.useMathJax = true; | JXG.Options.text.useMathJax = true; | ||
// | // JSXGraph-Board erstellen | ||
var board = JXG.JSXGraph.initBoard('box2', { | var board = JXG.JSXGraph.initBoard('box2', { | ||
boundingbox: [-5, 5, | boundingbox: [-5, 5, 5, -5], // Angepasste Boundingbox für die Skalierung | ||
axis: true, | axis: true, | ||
showCopyright: false, | showCopyright: false, | ||
Zeile 115: | Zeile 115: | ||
} | } | ||
}); | }); | ||
// Integral-Label anpassen | // Integral-Label anpassen | ||
i1.label.setText(() => { | i1.label.setText(() => { | ||
Zeile 121: | Zeile 121: | ||
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 | // MathJax nach jeder Änderung neu ausführen | ||
i1.label.onUpdate = function() { | i1.label.onUpdate = function() { | ||
MathJax.typesetPromise(); // MathJax neu ausführen | MathJax.typesetPromise(); // MathJax neu ausführen | ||
}; | }; | ||
// Beschriftung der Funktion mit f | // Beschriftung der Funktion mit f | ||
board.create('text', [3.5, 3, 'f'], { | board.create('text', [3.5, 3, 'f'], { |