def Bk(Y2d, k):
    """
    Calculate Bk for Sk(x)

    Parameters
    ----------
        Y2d : list
            list of y values with the second derived
        k : int
            index from Y2d

    Returns
    -------
        float
            Bk from cubic spline 
    """
    return Y2d[k] / 2