I am trying to understand how to use lagrange method, on the following quadratic form:
$$q(x_1, x_2, x_3, x_4) = 2x_1x_4 - 6x_2x_3$$
I already have the solution for this answer which is:
First, how did they get the following equation? $$ q(x_1, x_2, x_3, x_4) = \frac{1}{2}(x_1+x_4)^2 - \frac{1}{2}(x_1-x_4)^2+\frac{3}{2}(x_2-x_3)^2 - \frac{3}{2}(x_2+x_3)^2 $$
Then they continued and said that $$y_1 = x_1 + x_4 $$ $$y_2 = x_1 - x_4 $$ $$y_3 = x_2 - x_3 $$ $$y_4 = x_2 + x_3 $$ While: $$x_1 = \frac{y_1+y_2}{2}$$ $$ x_4 = \frac{y_1-y_2}{2}$$ $$x_2 = \frac{y_3+y_3}{2} $$ $$x_3 = \frac{-y_3+y_4}{2} $$ and found that: $$q = \frac{1}{2}y_1^2- \frac{1}{2}y_2^2+\frac{3}{2}y_3^2 - \frac{3}{2}y_4^2$$
Now, I'm trying to figure out the steps they did in order to find those equations