completing squares in positive definite matrices n the following question, I had a solution by using determinant test but my instructor wants me to solve this problem by using energy test.

$$B= \begin{bmatrix}
       -1 & \alpha & -1 \\
        \alpha & -4 & \alpha \\
      -1 & \alpha &-1  \\
      \end{bmatrix}$$
Determine, without computing eigenvalues, the interval of $\alpha$ for which they are 
  
  
*
  
*positive definite
  
*negative definite
  
*positive semidefinite
  
*negative semidefinite
  
*indefinite.
First I calculated $x^T Ax$ as following:
$$
x^T Ax = \begin{bmatrix}  x_{1} & x_{2} & x_{3} \\ \end{bmatrix} \cdot B \cdot  \begin{bmatrix}  x_{1}  \\x_{2}  \\x_{3}  \\\end{bmatrix}
$$
Then I get the following;
$-x_{1}^2+2\alpha x_{1}x_{2}-2x_{1}x_{3}-4x_{2}^2+2\alpha x_{2}x_{3}-x_{3}^2$
After this point, I could not complete squares and could not make an evaluation about the definiteness of the matrix. Could you please
  help me about completing squares?

 A: One approach to completing the squares here is to deal with each cross-term individually.  For instance, we can absorb the $x_1x_2$ term into a square as follows:
$$
-x_{1}^2+ \underline{2\alpha x_{1}x_{2}}-2x_{1}x_{3}-4x_{2}^2+2\alpha x_{2}x_{3}-x_{3}^2 =\\
-(x_{1}^2 - 2\alpha x_{1}x_{2})-2x_{1}x_{3}-4x_{2}^2+2\alpha x_{2}x_{3}-x_{3}^2 =\\ 
-(x_{1}^2 - 2\alpha x_{1}x_{2} + \alpha^2 x_2^2) + \alpha^2x_2^2-2x_{1}x_{3}-4x_{2}^2+2\alpha x_{2}x_{3}-x_{3}^2 =\\
-(x_1 - \alpha x_2)^2 + \alpha^2x_2^2-2x_{1}x_{3}-4x_{2}^2+2\alpha x_{2}x_{3}-x_{3}^2 =\\
-(x_1 - \alpha x_2)^2 - 2x_{1}x_{3}+(\alpha^2-4)x_{2}^2+2\alpha x_{2}x_{3}-x_{3}^2
$$
Once you have moved every cross-term into a square in this fashion, you will have a sum of squares.
A: We have
\begin{aligned}
\pmatrix{-1&a&-1\\ a&-4&a\\ -1&a&-1}
&=-\pmatrix{1&-a&1\\ -a&4&-a\\ 1&-a&1}\\
&=-\pmatrix{1\\ -a\\ 1}\pmatrix{1&-a&1}
-(4-a^2)\pmatrix{0\\ 1\\ 0}\pmatrix{0&1&0}
\end{aligned}
and hence $x^TBx=-(x_1-ax_2+x_3)^2 - (4-a^2)x_2^2$. Therefore $B$ is never positive semidefinite, and it is negative semidefinite (resp. negative definite) if and only if $4-a^2$ is nonnegative (resp. negative).
