A question about standing wave equation.
We send a harmonic wave that travels down a rope that is fixed at the end with the equation(like in the picture):
$$y = A\sin(kx-\omega t)$$
The wave that travels down a rope gets reflected at the rope’s end and has the equation:
$$ y = A \sin[k(2l-x) - \omega t + π]$$ where $l$ is the length of the rope.
I don't understand this equation. We add $π$ because the waves get inverted when it is reflected, but I don't understand where the $(2l-x)$ part comes from.