Given that $p,q$ are roots of the equation $x^2+p*x+q=0$. Find values $p$ and $q$. One method of finding a solution is using Viète’s Theorem. So, $p+q=-p$ and $p*q=q$ and there are two solutions $p=0, q=0$ and $p=1, q=-2.$
Another method is substituting $p$ and $q$ into the equation and solve the system of equations:
$p^2+p^2+q=0$, $q^2+p*q+q=0$
There are three solutions for the system:
- $p=0, q=0,$
- $p=1, q=-2,$
- $p=-.5, q=-.5.$
Why does #3 here, p = q = -.5, does not satisfy the Viète’s Theorem?
The problem is that if the equation $\,x^2 + px + q = 0\,$ has the solutions $\,x = p = q,\,$ then
$$ (x - p)(x - q) = x^2 - (p+q)x + (pq) = x^2 - 2px + p^2. $$
But this equation is also $\,x^2 + px + q = 0\,$ which implies $\, -2p = p \,$ and $\, p^2 = q\,$ and hence $\, p = q = 0.$
Your two equations
are actually the same equation if $\,p=q\,$ and in that case, the equations are both equal to
$$p^2 + p^2 + p = p(1 + 2p) = 0$$
with two roots $p = 0$ and $p = -.5$. However,
$$ x^2 -.5x -.5 = (x+.5)(x-1). $$
In both equations "Viète’s Theorem" holds true.
What you do not have is a quadratic with two roots $\,p=q=-.5$