def dydt(t, y, k, m, x_car):
    """First and second derivative of position as
    function of time.
    Args:
        t: time
        y: [x, v]
        k: spring stiffness
        m: brick mass
        x_car: function giving car position as function of time
    Returns:
        [v(t), a(t)]
    """
    dydt2 = -(k/m) * (y[0] - x_car(t))
    return y[1], dydt2