cdef extern from "math.h":
    double sqrt(double)
    double sin(double)
    double cos(double)
    
cdef extern from "mymath.h":
    double sinc(double)


def integrate_f(double a, double b, int N):
    cdef double s = 0
    cdef double dx = (b-a)/N
    cdef int i
    for i in range(N):
        s += sinc(a+i*dx)
    return s * dx
