#!/usr/bin/python3
import math
import numpy as np
import matplotlib.pyplot as plt
import myquad as myq


def f(x,y):
    return (x**2)*y

def squad2d(f,a,b,c,d):
    def inty(f,x,c,d):
        return myq.quadz(lambda y : f(x,y),c,d,1e-9)
    return myq.quadz(lambda x : inty(f,x,c,d),a,b,1e-9)

print(squad2d(f,2,0,1,0))
