Answer: Let the roots be \(\alpha\), \(\alpha^{-1}\) and \(\beta\), where \(q\neq 0\). Since the coefficient of \(x^2\) is zero, the sum of the roots is
\(\alpha+\alpha^{-1}+\beta=0.\)
The product of the roots is \(-q\), so
\(\alpha\cdot \alpha^{-1}\cdot \beta=\beta=-q.\)
Now consider the sum of the pairwise products. For \(x^3+px+q=0\), this equals \(p\):
\(\alpha\alpha^{-1}+\alpha\beta+\alpha^{-1}\beta=1+\beta(\alpha+\alpha^{-1})=p.\)
Using \(\alpha+\alpha^{-1}=-\beta\), we get
\(p=1+\beta(-\beta)=1-\beta^2.\)
Since \(\beta=-q\), it follows that \(\beta^2=q^2\). Therefore
\(p=1-q^2,\)
so equivalently
\(p+q^2=1.\)
Let the three roots be \(\alpha\), \(\alpha^{-1}\) and \(\beta\). Because the coefficient of \(x^2\) is zero, Vieta's formula gives
\(\alpha+\alpha^{-1}+\beta=0.\)
Also, for the cubic \(x^3+px+q=0\), the product of the roots is \(-q\). Hence
\(\alpha\cdot\alpha^{-1}\cdot\beta=\beta=-q.\)
Next, the sum of the products of the roots taken two at a time is \(p\):
\(\alpha\alpha^{-1}+\alpha\beta+\alpha^{-1}\beta=p.\)
Since \(\alpha\alpha^{-1}=1\), this becomes
\(1+\beta(\alpha+\alpha^{-1})=p.\)
From \(\alpha+\alpha^{-1}+\beta=0\), we have \(\alpha+\alpha^{-1}=-\beta\). Substituting into the previous expression gives
\(p=1+\beta(-\beta)=1-\beta^2.\)
But \(\beta=-q\), so \(\beta^2=q^2\). Therefore
\(p=1-q^2,\)
which rearranges to
\(p+q^2=1.\)