Wiki-Quellcode von Lösung HDI erklären
Zuletzt geändert von Holger Engels am 2026/09/22 22:02
Zeige letzte Bearbeiter
| author | version | line-number | content |
|---|---|---|---|
| 1 | (%class=abc%) | ||
| 2 | 1. {{formula}}J_a(x){{/formula}} entspricht dem orientierten Flächeninhalt zwischen dem Graphen von {{formula}}f{{/formula}} und der t-Achse im Intervall {{formula}}[a, x]{{/formula}}. | ||
| 3 | {{html clean="false"}} | ||
| 4 | <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/jsxgraph/distrib/jsxgraph.css" /> | ||
| 5 | |||
| 6 | <div id="jxgbox_integral" class="jxgbox" style="width: 100%; max-width: 600px; height: 400px; border: 1px solid #ccc; margin-top: 10px;"></div> | ||
| 7 | |||
| 8 | <script type="text/javascript"> | ||
| 9 | require.config({ | ||
| 10 | paths: { | ||
| 11 | 'jsxgraph': 'https://cdn.jsdelivr.net/npm/jsxgraph/distrib/jsxgraphcore' | ||
| 12 | } | ||
| 13 | }); | ||
| 14 | |||
| 15 | require(['jsxgraph'], function(JXG) { | ||
| 16 | var board = JXG.JSXGraph.initBoard('jxgbox_integral', { | ||
| 17 | boundingbox: [-1, 4, 8, -3], | ||
| 18 | axis: true, | ||
| 19 | showCopyright: false, | ||
| 20 | defaultAxes: { | ||
| 21 | x: {name: 't', withLabel: true, label: {position: 'rt', offset: [-15, -15]}}, | ||
| 22 | y: {name: 'y', withLabel: true, label: {position: 'rt', offset: [-15, -15]}} | ||
| 23 | } | ||
| 24 | }); | ||
| 25 | |||
| 26 | // Die Integrandenfunktion f(t) | ||
| 27 | var f = function(t) { return -0.2 * t * t + t + 1; }; | ||
| 28 | var graph = board.create('functiongraph', [f], { | ||
| 29 | strokeColor: '#336699', strokeWidth: 3, name: 'f', withLabel: true | ||
| 30 | }); | ||
| 31 | |||
| 32 | // Unsere eigenen Gleiter auf der x-Achse | ||
| 33 | var ptA = board.create('glider', [1, 0, board.defaultAxes.x], { | ||
| 34 | name: 'a', withLabel: true, size: 4, color: '#e66224', snapToGrid: true, snapSizeX: 0.5, | ||
| 35 | label: {offset: [-5, -20]} | ||
| 36 | }); | ||
| 37 | var ptX = board.create('glider', [5, 0, board.defaultAxes.x], { | ||
| 38 | name: 'x', withLabel: true, size: 4, color: '#2c3e50', snapToGrid: true, snapSizeX: 0.5, | ||
| 39 | label: {offset: [-5, -20]} | ||
| 40 | }); | ||
| 41 | |||
| 42 | // Das Integral | ||
| 43 | var integral = board.create('integral', [ | ||
| 44 | [function() { return ptA.X(); }, function() { return ptX.X(); }], | ||
| 45 | graph | ||
| 46 | ], { | ||
| 47 | color: '#f39c12', | ||
| 48 | fillOpacity: 0.4, | ||
| 49 | withLabel: false, | ||
| 50 | // Hier schalten wir die automatisch generierten Hilfspunkte des Integrals ab! | ||
| 51 | baseLeft: {visible: false}, | ||
| 52 | baseRight: {visible: false}, | ||
| 53 | curveLeft: {visible: false}, | ||
| 54 | curveRight: {visible: false} | ||
| 55 | }); | ||
| 56 | |||
| 57 | // Dynamischer Text für den Integralwert | ||
| 58 | board.create('text', [0.2, 3.5, function() { | ||
| 59 | var value = integral.Value(); | ||
| 60 | return 'J_a(x) = ' + value.toFixed(2); | ||
| 61 | }], {fontSize: 16, strokeColor: '#d35400'}); | ||
| 62 | }); | ||
| 63 | </script> | ||
| 64 | {{/html}} | ||
| 65 | 1. {{formula}}J_a(a) = 0{{/formula}} | ||
| 66 | Begründung: Obergrenze gleich Untergrenze. Das Intervall {{formula}}[a, a]{{/formula}} hat die Breite 0. | ||
| 67 | 1. {{formula}}J_a{{/formula}} ist eine Stammfunktion von {{formula}}f{{/formula}}. Nach dem Hauptsatz der Differential- und Integralrechnung gilt: {{formula}}J_a'(x) = f(x){{/formula}}. |