Prove that the discriminant of the polynomial $X^{n}+pX+q$ is $$D=(-1)^{n(n-1)/2}n^{n}q^{n-1}+(-1)^{(n-1)(n-2)/2}(n-1)^{n-1}p^{n}$$
I found the same exercise here: (From Artin)Prove the general formula of discriminant of $x^n + px + q$ for $n ≥ 2$
But my teacher told me to solve it from the Sylvester matrix (sorry if you consider this a duplicate).
Let $F(X)=X^{n}+pX+q$, then $F'(X)=nX^{n-1}+p$. We compute the discriminant as the determinant of the Sylvester matrix of $F$ and $F'$.
$$D(F)=R_{F,F'}=\det\left(\begin{array}{ccccc|cccccc} 1 & 0 & \cdots & 0 & 0 & p & q & 0 & \cdots & 0 & 0\\ 0 & 1 & \cdots & 0 & 0 & 0 & p & q & \cdots & 0 & 0\\ \vdots & \vdots & \ddots & \vdots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\ 0 & 0 & \cdots & 1 & 0 & 0 & 0 & 0 & \cdots & q & 0\\ 0 & 0 & \cdots & 0 & 1 & 0 & 0 & 0 & \cdots & p & q\\ \hline n & 0 & \cdots & 0 & 0 & p & 0 & 0 & \cdots & 0 & 0\\ 0 & n & \cdots & 0 & 0 & 0 & p & 0 & \cdots & 0 & 0\\ \vdots & \vdots & \ddots & \vdots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\ 0 & 0 & \cdots & 0 & n & 0 & 0 & 0 & \cdots & p & 0\\ 0 & 0 & \cdots & 0 & 0 & n & 0 & 0 & \cdots & 0 & p \end{array}\right)$$
This matrix has size $ (2n-1)\times(2n-1)$.
My teacher told me that there is a special row from which I can start computing the determinant, but I don't know.
Edit2: Using the last row: $$D(F)=(-1)^{n}n\det\left(\begin{array}{ccccc|ccccc} 1 & 0 & \cdots & 0 & 0 & q & 0 & \cdots & 0 & 0\\ 0 & 1 & \cdots & 0 & 0 & p & q & \cdots & 0 & 0\\ \vdots & \vdots & \ddots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\ 0 & 0 & \cdots & 1 & 0 & 0 & 0 & \cdots & q & 0\\ 0 & 0 & \cdots & 0 & 1 & 0 & 0 & \cdots & p & q\\ \hline n & 0 & \cdots & 0 & 0 & 0 & 0 & \cdots & 0 & 0\\ 0 & n & \cdots & 0 & 0 & p & 0 & \cdots & 0 & 0\\ \vdots & \vdots & \ddots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\ 0 & 0 & \cdots & 0 & n & 0 & 0 & \cdots & p & 0 \end{array}\right)+$$ $$+(-1)^{2n-2}p\det\left(\begin{array}{ccccc|ccccc} 1 & 0 & \cdots & 0 & 0 & p & q & 0 & \cdots & 0\\ 0 & 1 & \cdots & 0 & 0 & 0 & p & q & \cdots & 0\\ \vdots & \vdots & \ddots & \vdots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots\\ 0 & 0 & \cdots & 1 & 0 & 0 & 0 & 0 & \cdots & q\\ 0 & 0 & \cdots & 0 & 1 & 0 & 0 & 0 & \cdots & p\\ \hline n & 0 & \cdots & 0 & 0 & p & 0 & 0 & \cdots & 0\\ 0 & n & \cdots & 0 & 0 & 0 & p & 0 & \cdots & 0\\ \vdots & \vdots & \ddots & \vdots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots\\ 0 & 0 & \cdots & 0 & n & 0 & 0 & 0 & \cdots & p \end{array}\right)$$
Where every block is a square of size $n-1$. Then we can use this formula for square blocks: $\det\begin{pmatrix}A & B\\ C & D \end{pmatrix}=\det(AD-BC)$
Then: $$D(F)=(-1)^{n}n\det\left(\begin{array}{ccccc} -nq & 0 & \cdots & 0 & 0\\ p-np & -nq & \cdots & 0 & 0\\ \vdots & \vdots & \ddots & \vdots & \vdots\\ 0 & 0 & \cdots & -nq & 0\\ 0 & 0 & \cdots & p-np & -nq \end{array}\right)+$$ $$+(-1)^{2n-2}p\det\left(\begin{array}{ccccc} p-np & -nq & \cdots & 0 & 0\\ 0 & p-np & \cdots & 0 & 0\\ \vdots & \vdots & \ddots & \vdots & \vdots\\ 0 & 0 & \cdots & p-np & -nq\\ 0 & 0 & \cdots & 0 & p \end{array}\right)$$
$$=(-1)^{n}(-1)^{n-1}nn^{n-1}q^{n-1}+(-1)^{2n-2}pp^{n-1}(1-n)^{n-1}=$$ $$=(-1)^{2n-1}n^{n}q^{n-1}+(-1)^{3n-1}(n-1)^{n-1}p^{n}$$ But the result must be $$(-1)^{\frac{n(n-1)}{2}}n^{n}q^{n-1}+(-1)^{\frac{(n-1)(n-2)}{2}}(n-1)^{n-1}p^{n}$$
I did something wrong with the exponents of the $(-1)$ terms in all this process.