Hi, wrobel.
But why is it not appropriate or correct to calculate the average velocity in this context from an integration in x (spatial coordinate) of the velocity as a function of the position, ##v(x)##, defined as
$$
v(x) =
\begin{cases}
v_1, & 0 \leq x < L, \\
v_2, & L \leq x \leq 2L...