def f(x):
    return 8.0 - x**2

x0 = 1.0
x1 = 2.0
for aantal_rh in range (100,100000,100):
    oppervlakte = 0
    h = (x1-x0)/aantal_rh
    for i in range(aantal_rh):
        gemiddelde_hoogte = 0.5 * (f(x0 + (i * h)) + f(x0 + ((i + 1) * h)))
        oppervlakte += gemiddelde_hoogte * h  
    print (oppervlakte)