I am solving the following question on quadratic equation and I always get $p = -6$ as answer but the answer in book is $p = 3$.
Question
What am I missing in my solution or is the answer mentioned in book incorrect?
Problem
For the equation $3x^{2}+ px + 3 = 0$, $p > 0$, if one of the roots is square of the other, then what is the value of p?
My Solution
Let $x_{1}$ and $x_{2}$ be the roots of this equation.
So, $x_{1} + x_{2} = -\frac{p}{3}$
Also, $x_{1}. x_{2} = 1 =>x_{1}^{3} = 1 => x_{1} = 1$
Therefore, substituting in first equation we get
$1 + 1^{2} = -\frac{p}{3} => p = -6$
Let the roots be $x_{1,2}$ and assume $x_2=x_1^2$. Then by Vieta's formulas $x_1x_2=1=x_1^3$.
The equation $x_1^3=1 \iff x_1^3-1=0 \iff (x_1 -1)(x_1^2+x_1+1) = 0$ has $3$ roots:
$x_1=1\,$, but substituting this back into the equation gives $3 + p + 3 = 0$ i.e. $p=-6 \lt 0\,$ which doesn't satisfy the requirement $p \gt 0$.
$x_1 = (-1 \pm i \sqrt{3}) / 2\,$, otherwise known as the complex cube roots of unity, which satisfy $x_1^2+x_1+1=0 \iff x_2+x_1+1=0 \iff x_1+x_2=-1 \iff p=3\,$.