Unimodular reduction of a discriminant-minus-four form to two squares
= Unimodular reduction of a discriminant-minus-four form to two squares
The identity
$$
5x^2+16xy+13y^2=(x+2y)^2+(2x+3y)^2
$$
comes from an <integer> change-of-variable <matrix> of <determinant> $-1$. It therefore preserves the set of <integers> represented and reduces the form to $u^2+v^2$.