Approximation of e: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 8: Line 8:
(function(){
(function(){


  var board = JXG.JSXGraph.initBoard('box', {axis:true, boundingbox: [-1, 3, 50, 0.5]});
  var board = JXG.JSXGraph.initBoard('box', {axis:true, boundingbox: [-3, 3, 50, 0.5]});
  var line = board.create('line', [[-10, Math.E], [100, Math.E]], {strokeColor: 'green', strokeWidth: 1});
  var line = board.create('line', [[-10, Math.E], [100, Math.E]], {strokeColor: 'green', strokeWidth: 1});
  var seq = board.create('curve', [[0], [1]], {strokeColor: 'blue'});
  var seq = board.create('curve', [[0], [1]], {strokeColor: 'blue'});

Revision as of 22:11, 6 January 2019

This little animation approximates [math]\displaystyle{ e }[/math] (displayed by the horizontal green line) by the sequence (blue line)

[math]\displaystyle{ (1+\frac{1}{n})^n }[/math]

and by the series (black line)

[math]\displaystyle{ \sum_{n=0}^\infty \frac{1}{n!} }[/math]