Difference between revisions of "Approximation of e"

From JSXGraph Wiki
Jump to: navigation, search
Line 28: Line 28:
 
  };
 
  };
  
  var txt1 = board.create('text', [5, 1, function() { return 'n=' + (seq.dataX.length-1) + ' value = ' + seq.dataY[seq.dataY.length - 1]; }], {strokeColor: 'blue'});
+
  var txt1 = board.create('text', [15, 1.5, function() { return 'n=' + (seq.dataX.length-1) + ': value = ' + seq.dataY[seq.dataY.length - 1]; }], {strokeColor: 'blue'});
 +
var txt2 = board.create('text', [15, 2, function() { return 'n=' + (series.dataX.length-1) + ': value = ' + series.dataY[series.dataY.length - 1]; }], {strokeColor: 'black'});
  
  

Revision as of 00:10, 7 January 2019

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

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

and by the series (black line)

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