import numpy as np
def double_int_approx(c,d,x1,x2,f,n):
xvals = np.linspace(x1,x2,n+1)
#Evaluation points in x direction
yvals = np.linspace(c,d,n+1)
#Evaluation points in y direction
hx = (x2-x1)/n
#Mesh width in x direction
hy = (d-c)/n
#Mesh width in y direction
# ================================================================
### SIMPSON'S RULE WEIGHTS ###
weights = np.ones((n+1))
weights[0] = 3/8
weights[n] = 3/8
for k in range(1,n):
if k % 3 == 0:
w