I've got a function
$$f(x)=(x_1-1)^2+\sum_{i=2}^n (x_i-x_{i-1})^2\quad \text{with $x\in \mathbb{R}^n$}$$
I want to show that this is (strictly) convex, so I thought the best approach might be to look at $\nabla f^2(x)$ because $\nabla f^2(x)$ positive semidefinite/pos. def. iif $f(x)$ is convex/strictly convex.
It's pretty clear that the Hessian must be like this: \begin{align*} H_f = \begin{pmatrix} 4 & -2 & 0 & 0 &... & 0&0 &0\\ -2 & 4 & -2 & 0 &... & 0&0&0\\ 0 & -2 & 4 & -2 &... & 0&0&0\\ ...&...&...&...&...&...&...&...\\ 0 & 0 & 0 & 0 &... & -2&4&-2\\ 0 & 0 & 0 & 0 &... & 0&-2&4\\ \end{pmatrix} \end{align*}
I can prove fast that this matrix is pos. semidef. (Using diagonal dominance). But I suspect that it's also pos. def.. My "slow" way would be to look at the minors and prove by induction.
Is there a fast way to prove it? Or should I use another method to prove convexity of $f$?