# The sum of roots of equation x^2+px+q=0 is equal to sum of their squares, then prove that: p(p+1)=2q

*print*Print*list*Cite

Let a and b be the roots of the equation. Hence,

`a^2 + ap + q = 0` and

`b^2 +pb + q = 0`

We know that `a + b = a^2 + b^2` . Adding the two equations yield:``

`a^2 + ap + q + b^2 + pb + q = 0`

Hence,

`a^2 + b^2 + (a + b)p + 2q = 0`

But `a + b = a^2 + b^2` and we simply let this sum be represented by `S` such that:

`S + Sp + 2q = 0`

Manipulating the equation (to make it look like what we want to prove):

`-S-Sp = 2q`

`-S ( p + 1) = 2q`

Using Viete's formula, we know that the sum of the roots of an equation is just the negative of the coefficient of `x` , in this case:

`a + b = -p`

We know that `S = a + b = a^2 + b^2` . Hence:

`-(-p)(p+1) = 2q`

`p (p+1) = 2q` QED

(Note that I only used S for compactness of expression, and since `a+b = a^2 + b^2` I just used it to represent both.)

You have given an equation

`x^2+px+q=0`

assume , s and t are roots of the given equation. Then

`s+t=-p`

`st=q`

But it is given that

`s+t=s^2+t^2`

But

`s^2+t^2=(s+t)^2-2st`

`-p=(-p)^2-2q`

`-p=p^2-2q`

`2q=p^2+p`

`2q=p(1+p)`

Hence proved