def derivative1_forward_h2(target, y):
    """
    Implements the taylor approach to calculate derivatives, giving the point of interest.
    The function used is y=f(target), where len(y)-2 > target >= 0
    :param target: the position to be derived
    :param y: an array of points with the values
    :return: the derivative of the target with the given values
    """
    if len(y) - 3 < target or target < 0:
        raise(ValueError("need two more points to calculate the derivative"))
    return (-y[target+2] + 4*y[target+1] - 3*y[target])/2