Hauptsatz der Differential- und Integralrechnung: Unterschied zwischen den Versionen
Zeile 34: | Zeile 34: | ||
* Liegt der Graph von <math>f</math> sowohl unterhalb als auch oberhalb der x-Achse, ist das bestimmte Integral die Differenz aus dem oberen Flächeninhalt und dem unteren Flächeninhalt. | * Liegt der Graph von <math>f</math> sowohl unterhalb als auch oberhalb der x-Achse, ist das bestimmte Integral die Differenz aus dem oberen Flächeninhalt und dem unteren Flächeninhalt. | ||
<jsxgraph> | <html> | ||
<head> | |||
JXG.Options.text.useMathJax = true; | <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jsxgraph/1.4.6/jsxgraphcore.js"></script> | ||
</head> | |||
<body> | |||
<div id="box2" style="width: 90vw; max-width: 600px; aspect-ratio:3/2; margin-top:20px;"></div> | |||
<script type="text/javascript"> | |||
JXG.Options.text.useMathJax = true; | |||
// JSXGraph-Board erstellen | |||
</ | var board = JXG.JSXGraph.initBoard('box2', { | ||
boundingbox: [-5, 5, 10, -5], // Angepasste Boundingbox für die Skalierung | |||
axis: true, | |||
showCopyright: false, | |||
showNavigation: true, | |||
grid: true, // Gitternetz aktivieren | |||
defaultAxes: { | |||
x: { | |||
withLabel: true, | |||
name: 't', | |||
label: { | |||
position: 'rt', | |||
offset: [-5, 15], | |||
fontSize: 16, | |||
anchorX: 'right' | |||
}, | |||
ticks: { | |||
ticksDistance: 1, | |||
minorTicks: 0 | |||
} | |||
}, | |||
y: { | |||
withLabel: true, | |||
name: 'f(t)', | |||
label: { | |||
position: 'rt', | |||
offset: [15, 5], | |||
fontSize: 16, | |||
anchorY: 'right' | |||
}, | |||
ticks: { | |||
ticksDistance: 1, | |||
minorTicks: 0 | |||
} | |||
} | |||
} | |||
}); | |||
// Funktion erstellen | |||
var c1 = board.create('functiongraph', [function(t) { | |||
return (Math.pow(t, 5) / 24 - Math.pow(t, 3) / 2 + t); | |||
}]); | |||
// Integral erstellen | |||
var i1 = board.create('integral', [ | |||
[-2.0, 2.0], c1 | |||
], { | |||
withLabel: true, | |||
label: { | |||
fontSize: 16, | |||
offset: [0, 50], | |||
digits: 4, | |||
intl: { | |||
enabled: false, | |||
options: {} | |||
} | |||
}, | |||
baseLeft: { // Start point | |||
visible: true, | |||
fixed: false, | |||
withLabel: true, | |||
name: 'a' | |||
}, | |||
baseRight: { // End point | |||
visible: true, | |||
fixed: false, | |||
withLabel: true, | |||
name: 'b' | |||
} | |||
}); | |||
// Integral-Label anpassen | |||
i1.label.setText(() => { | |||
const a = i1.baseLeft.X().toFixed(2); // Untere Grenze | |||
const b = i1.baseRight.X().toFixed(2); // Obere Grenze | |||
const value = i1.Value().toFixed(4); // Wert des Integrals | |||
return `\\[\\int_{${a}}^{${b}} f(x) \\, dx = ${value}\\]`; | |||
}); | |||
// Beschriftung der Funktion mit f | |||
board.create('text', [3.5, 3, 'f'], { | |||
fontSize: 16, | |||
fixed: true, | |||
anchorX: 'left', | |||
anchorY: 'bottom', | |||
color: 'blue' | |||
}); | |||
</script> | |||
</body> | |||
</html> | |||
==Integralfunktion== | ==Integralfunktion== |