This is part of a classic proof in online-gradient descent (for example https://parameterfree.com/2019/09/11/online-gradient-descent/) but for my question only basic calculus is involved.
I am not sure how to proceed in a particular step**:
$$\sum_{t=1}^T\Big(\frac{1}{2\eta_1}||x_t-u||^2 - \frac{1}{2\eta_t}||x_{t+1}-u||^2\Big) = \Big(\frac{1}{2\eta_1}||x_1-u||^2 - \frac{1}{2\eta_2}||x_2-u||^2\Big) + ..+ \Big(\frac{1}{2\eta_2}||x_2-u||^2 - \frac{1}{2\eta_3}||x_3-u||^2\Big)+...$$
To me it seems that this is exactly :
$$\sum_{t=1}^T\Big(\frac{1}{2\eta_1}||x_t-u||^2 - \frac{1}{2\eta_t}||x_{t+1}-u||^2\Big) = \Big(\frac{1}{2\eta_1}||x_1-u||^2 - \frac{1}{2\eta_{T+1}}||x_{T+1}-u||^2\Big)$$
But in the proof we have :
$$\sum_{t=1}^T\Big(\frac{1}{2\eta_1}||x_t-u||^2 - \frac{1}{2\eta_t}||x_{t+1}-u||^2\Big) =\frac{1}{\eta_1}||x_1-u||^2 - \frac{1}{\eta_T}||x_T-u||^2 +\sum_{t=1}^{T-1}\Big(\frac{1}{2\eta_{t+1}} -\frac{1}{2\eta_t}\Big)||x_{t+1}-u||^2$$
The term that I do not know where it comes from is: $$\sum_{t=1}^{T-1}\Big(\frac{1}{2\eta_{t+1}} -\frac{1}{2\eta_t}\Big)||x_{t+1}-u||^2$$
I even tried to rearrange the terms, in case if it comes from some rearrangement but in the original sum there is no term that involves $x_{t+1}$ and $\eta_t$ as far as I am concerned, so I am stuck.