Let $q:\mathbb{R}^n\to\mathbb{R}$ be a quadratic form: $$q(x_1,\dots,x_n)=\sum_{i=1}^{n} x_i^2+\sum_{1\leq i < j \leq n} x_i x_j$$
I must find the diagonal form of $q$.
My attempt: I tried rewriting $q$ such that we can obtain symmetry:
$$q(x_1,\dots,x_n)=\sum_{i=1}^{n} x_i^2+\sum_{i \neq j} \frac{1}{2} x_i x_j$$
Then the matrix $[q]_e$ (in the standard basis):
$$[q]_e=\begin{pmatrix} 1 & \frac{1}{2}& \frac{1}{2}& \dots & \frac{1}{2}\\ \frac{1}{2} & 1 & \frac{1}{2}& \dots & \frac{1}{2}\\ \vdots & & \ddots & &\vdots\\ \frac{1}{2} & \dots & \frac{1}{2} & \frac{1}{2} &1 \end{pmatrix}$$
Then what I typically do is some operations both on rows and columns to obtain a congruent diagonal matrix. However it gets very messy here and I fail to recognize any pattern. I also tried working with the polynomial itself using Lagrange method, but again, it got very messy. Maybe I'm missing something simple? Any hints?