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>
<jsxgraph>
    JXG.Options.text.useMathJax = true;      
var brd, k;
    // JSXGraph-Board erstellen
JXG.Options.text.useMathJax = true;
    var board = JXG.JSXGraph.initBoard('box2', {
brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-5,20,5,-5], axis:true, showNavigation:true, showCopyright:true});
        boundingbox: [-5, 5, 10, -5], // Angepasste Boundingbox für die Skalierung
k = brd.create('slider',[[-4,-2],[3,-2],[-5,1,5]],{name:'n', snapWidth:1});
        axis: true,
brd.create('functiongraph', [function(t) {return JXG.Math.pow(Math.E,t*k.Value());}],{strokeColor:'#ff0000'});
        showCopyright: false,
brd.create('text',[-4,7,
        showNavigation: true,
  function() {  
        grid: true, // Gitternetz aktivieren
    return '\\[f(x) = e^{' + k.Value() + 'x}\\]';
        defaultAxes: {
  }], {fontSize:24});
            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'
    });
</jsxgraph>
</jsxgraph>