def rk4(f, t, y, dt):
    """
    Runge-Kutta explicit 4-stage scheme - 1 step.

    :param f:  function defining ODE dy/dt = f(t,y), two arguments
    :param t:  time
    :param y:  solution at t
    :param dt: step size
    :return: approximation of y at t+dt.
    """
    k1 = f(t, y)
    k2 = f(t + dt / 2, y + dt * k1 / 2)
    k3 = f(t + dt / 2, y + dt * k2 / 2)
    k4 = f(t + dt, y + dt * k3)
    return y + dt / 6 * (k1 + 2 * k2 + 2 * k3 + k4)