<s>[INST] Analyzing quadratic forms $x^2-3xy+y^2$, $2xy+yz-3xz$ and $x^2+y^2+2xy-xt+2yt$. Positive, negative or indefinite? 
By means of successive coordinate changes, write each one of the
  quadratic forms below as a sum of terms of the type $\pm u^2$ and
  decide wich ones are positive, negative or indefinite:
$$A(x,y) = x^2-3xy+y^2$$
$$B(x,y,z) = 2xy+yz-3xz$$
$$C(x,y,z,t) = x^2+y^2+2xy-xt+2yt$$

For $A$ I did $A(x,y) = x^2-3xy+y^2 = x^2-2xy+y^2-xy = (x-y)^2-xy$ which is indefinite.
For $B(x,y) = 2xy+yz-3xz$ I remembered that $(x+y+z)^2 = x^2 + 2 x y + y^2 + 2 x z + 2 y z + z^2$ so $2xy+yz-3xz = (x+y+z)^2 -x^2-y^2-z^2-yz+xz$ which won't help anything.
For $C(x,y,z,t)$ there's too much terms, how should I do it?
 [/INST] There is an algorithm for solving $P^T A P = D,$ where $A$ is some given symmetric matrix, $D$ is diagonal, while $\det P = 1.$ See reference for linear algebra books that teach reverse Hermite method for symmetric matrices
In this case we get
$$
P =
\left(
\begin{array}{rr}
1 & \frac{3}{2} \\
0 & 1
\end{array}
\right)
$$
 and
$$
\left(
\begin{array}{rr}
1 & 0 \\
\frac{3}{2} & 1
\end{array}
\right)
\left(
\begin{array}{rr}
1 & -\frac{3}{2} \\
-\frac{3}{2} & 1
\end{array}
\right)
\left(
\begin{array}{rr}
1 & \frac{3}{2} \\
0 & 1
\end{array}
\right) =
\left(
\begin{array}{rr}
1 & 0 \\
0 & -\frac{5}{4}
\end{array}
\right)
$$
Since the determinant is $1,$ it is fairly quick to find the inverse of $P.$ Let us call it
$$
Q =
\left(
\begin{array}{rr}
1 & -\frac{3}{2} \\
0 & 1
\end{array}
\right)
$$
The outcome is
$$ Q^T D Q = A.  $$ The diagonal entries of $D$ and the rows of $Q$ give
$$ \left(x - \frac{3}{2} y \right)^2 -\frac{5}{4} y^2 \; \; \; = \; \; \; x^2 - 3xy + y^2 $$
</s>