Hauptsatz der Differential- und Integralrechnung: Unterschied zwischen den Versionen

Zeile 40: Zeile 40:
</head>
</head>
<body>
<body>
     <div id="box2" style="width:15%; aspect-ratio:3/2; margin-top:20px;""></div>
     <div id="box2" style="width:15%; aspect-ratio:3/2; margin-top:20px;"></div>
     <script type="text/javascript">
     <script type="text/javascript">
         // Zweites JSXGraph-Board
         // Zweites JSXGraph-Board
Zeile 81: Zeile 81:
         });
         });


        // 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 92: Zeile 93:
             label: {
             label: {
                 fontSize: 16,
                 fontSize: 16,
                 offset:[0, 50],
                 offset: [0, 50],
                 digits: 4,
                 digits: 4,
                 intl: {
                 intl: {
                     enabled: false,
                     enabled: false,
                     options: {
                     options: {}
 
                    }
                 }
                 }
             },
             },
             baseLeft: {    // Start point
             baseLeft: {    // Start point
              visible: true,
                visible: true,
              fixed: false,
                fixed: false,
              withLabel: true,
                withLabel: true,
              name: 'a'
                name: 'a'
             },
             },
             baseRight: {    // Start point
             baseRight: {    // End point
              visible: true,
                visible: true,
              fixed: false,
                fixed: false,
              withLabel: true,
                withLabel: true,
              name: 'b'
                name: 'b'
             }
             }
         });
         });
         var intval = document.getElementById('output').value = integral.Value() + ' ' + integral.label.plaintext;
 
         // Integral-Label anpassen
        i1.label.setText(() => {
            const a = i1.baseLeft.X().toFixed(2);
            const b = i1.baseRight.X().toFixed(2);
            return `\\[\\int_{${a}}^{${b}} f(x) \\, dx\\]`;
        });
 
         // Beschriftung der Funktion mit f
         // Beschriftung der Funktion mit f
         board.create('text', [3.5, 3, 'f'], {
         board.create('text', [3.5, 3, 'f'], {
          fontSize: 16,
            fontSize: 16,
          fixed: true,
            fixed: true,
          anchorX: 'left',
            anchorX: 'left',
          anchorY: 'bottom',
            anchorY: 'bottom',
          color: 'blue'
            color: 'blue'
         });
         });
     </script>
     </script>