Let $\mathbf{x} = (x_1, \dots, x_n)$ and $\mathbf{y} = (y_1, \dots, y_n)$ be two vectors in $\mathbb{R}^n$. Show that $$\langle \mathbf{x}, \mathbf{y} \rangle = 2\left(\sum_{i=1}^nx_iy_i \right) - \sum_{i=1}^{n-1}(x_iy_{i+1}+x_{i+1}y_i)$$ defines an inner product.
The linearity and conjugate conditions are elementary, but how would I show positive-definiteness? That is, showing that: $$\langle \mathbf{x},\mathbf{x} \rangle = 2 \left(\sum_{i=1}^nx_i^2 \right) - \sum_{i=1}^{n-1}(2x_ix_{i+1}) \ge 0,$$ and $$\langle \mathbf{x},\mathbf{x} \rangle = 0 \iff \mathbf{x}=0. $$ I'm stuck on how to manipulate the expressions.
Please help!
$2 \left(\sum_{i=1}^nx_i^2 \right) - \sum_{i=1}^{n-1}(2x_ix_{i+1})=x_1^2+x_n^2+\sum_{i=1}^{n-1}(x_i-x_{i+1})^2\geq0$