On every interval where has a constant value, we calculate the response to
and to the value that
has at the beginning of this interval (the value that it reached at the end of the previous interval).
The value is obtained taking into account the fact that
.