The maximum is 40. First, notice that
i=1∑60xi2(xi+1−xi−1)=i=1∑60xi2xi+1−i=1∑60xi2xi−1=i=1∑60xi2xi+1−i=1∑60xi+12xi=i=1∑60xixi+1(xi−xi+1).
Since 3xy(x−y)=x3−y3−(x−y)3 for any real numbers x,y, we have
i=1∑60xi2(xi+1−xi−1)=31i=1∑60(xi3−xi+13−(xi−xi+1)3)=31i=1∑60(xi+1−xi)3.
On one hand, if x3k+1=1, x3k+2=0, x3k+3=−1 (k=0,1,…,19),
i=1∑60(xi+1−xi)3=40⋅(−1)3+20⋅23=120;
On the other hand, for a∈[−2,2], (a+1)2(a−2)≤0, or a3≤3a+2, and hence
i=1∑60(xi+1−xi)3≤i=1∑60(3(xi+1−xi)+2)=120.
In conclusion, the maximum of ∑i=160(xi+1−xi)3 is 120, and the maximum of ∑i=160xi2(xi+1−xi−1) is 40 (when {xn}={1,0,−1,1,0,−1,…,1,0,−1}). □