Professional Documents
Culture Documents
ASG Scientific Computer: Import As Import
ASG Scientific Computer: Import As Import
Scientific Computer
import numpy as np
import math
def right_riemann(f, a, b, n):
h = (b - a) / (n - 1)
x = np.linspace(a, b, n)
y = 0
for i in x[1::]:
y += h * f(i)
return y