If one root is square of the other root of the equation x2+px+q=0, then the relation between p and q is
p3−q(3p−1)+q2=0
Let the roots of x2+px+q=0 be α and α2.
⇒α+α2=−p and α3=q⇒α(α+1)=−p⇒α3{α3+1+3α(α+1)}=−p3 [cubing both sides]
⇒q(q+1−3p)=−p3⇒p3−(3p−1)q+q2=0