i am making the riemann sum with x**3 but it needs to bo done with dx**3 , for example b - a / n
(5/8)**3 + 10/8**3 + 15/8**3 and this 5 times more because n is 8.
i have made this program so far , it is working with the calculation right now , but it needs to be changed to the example above. With a loop for n.
#formula to calculate dx
dx = float ((b-a)/n)
xi=a
Sum = dx
#loop
for i in range(0,n,n):
xi = a + dx
sum = Sum + f(xi)
print("the surface under the line is ", (sum*dx))