Riemann sum III: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 26: Line 26:
     {fillColor:'#ffff00', fillOpacity:0.3});
     {fillColor:'#ffff00', fillOpacity:0.3});


brd.createElement('text',[-1,35,function(){ return 'Sum='+(brd.riemannsum(f,s.Value(),document.getElementById('sumtype').value,a.Value(),b.Value())).toFixed(4); }]);
brd.createElement('text',[1,35,function(){ return 'Sum='+(brd.riemannsum(f,s.Value(),document.getElementById('sumtype').value,a.Value(),b.Value())).toFixed(4); }], {fontsize:20});


</jsxgraph>
</jsxgraph>

Revision as of 15:26, 2 February 2010

Appromximate the integral of [math]\displaystyle{ f: R\to R, x\mapsto x^2 }[/math]

Riemann sum type:

The underlying JavaScript code

<jsxgraph width="800" height="400" box="box">
</jsxgraph>