def integrate(x, y):
    """
    Performs Integral(x[0] to x[-1]) of y dx

    :param x: x axis coordinates (list)
    :param y: y axis coordinates (list)
    :return: integral value
    """
    integral = 0
    for i in range(1, len(x)):
        dx = x[i] - x[i - 1]
        integral += dx * (y[i] + y[i - 1]) / 2
    return integral
