Python 2 and 3 friendly Call the function by running the program. After the chevron >>> prompt pops up after the blue words, type in integral_approx(a , b , N, func) (a,b,N are values, func is the text of your function). "a" is the lower boundary while "b" is the upper boundary. They can both be Floating Point numbers and should be both positive or both negative. "N" is the number of sections. Must be a positive integer. "func" is the text of the function. For example '(x*x+2*x+1)/(x-1)' or '1/x' The program returns the value obtained from cutting into trapeziums and cutting into rectangles. If there is a common input error, it will return error code.
zhanghuiyuan / tpzm_integration Goto Github PK
View Code? Open in Web Editor NEWEvaluate fixed integrals by cutting it into pieces and approximating the area of each piece
Home Page: https://pypi.python.org/pypi/tpzm_integration