Skip to content

CodePleaseRun/riemann-sum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Riemann Sum

Integral approximation using Riemann sum



Installation

git clone https://github.com/CodePleaseRun/riemann-sum.git
cd riemann-sum

Dependencies:

  • matplotlib
  • numpy
  • sympy

Usage

python main.py

Points to be noted

  • To be specific, the program is calculating Left Riemann sum. If the function f(x) is assumed to be a smooth function, all three Riemann sums (Left, Right, Middle) will converge to the same value as the number of subdivisions goes to infinity.
  • Left Limit & Right Limit are evaluated first. That means input like gamma(3), exp(2) will be evaluated and converted to float before being used.
  • The Points input determines the smoothness of the the function f(x). It is independent from the number of subdivisions used for calculating Riemann sum.

Licence

MIT