def second_order_difference(t, y):
    """ Calculate the second order difference.

    Args:
        t: ndarray, the list of the three independent variables
        y: ndarray, three values of the function at every t

    Returns:
        double: the second order difference of given points
    """
    # claculate the first order difference
    first_order_difference = (y[1:] - y[:-1]) / (t[1:] - t[:-1])
    return (first_order_difference[1] - first_order_difference[0]) / (t[2] - t[0])