def RK4(f, y, t, h):
    """
    One step of the numerical solution to the DE  (dy/dt = f).
    
    :param f:  Time-derivative of  y
    :param y:  Previous value of y, used in finding the next
    :param t:  Time
    :param h:  Time-step length
    
    :return:  Value of  y  at time  t+h
    """
    k1 = h*f(t,y)
    k2 = h*f(t+0.5*h, y+0.5*k1)
    k3 = h*f(t+0.5*h, y+0.5*k2)
    k4 = h*f(t+h, y+k3)
    return y + (1.0/6)*(k1 + 2*k2 + 2*k3 + k4)