# Given polynomial $x^3+3x^2-7x+1$, and its roots $x_1$, $x_2$, $x_3$. what is $x_1^2+x_2^2+x_3^2$

I'm currently working on another problem: let $x_1,x_2,x_3$ be the roots of the polynomial: $x^3+3x^2-7x+1$, calculate $x_1^2+x_2^2+x_3^2$. Here is what i did: $x^3+3x^2-7x+1=0$ imply $x^2=(7x-x^3-1)/3$. And so $x_1^2+x_2^2+x_3^2= (7x_1-x_1^3-1)+7x_2-x_2^3-1+7x_3-x_3^3-1)/3= 7(x_1+x_2+x_3)/3+(x_1^3+x_2^3+x_3^3)-1$. Then I don't know what to do anymore.

• Do you know about symmetric polynomials? – Pierre-Guy Plamondon Dec 21 '16 at 17:47
• Lookup Vieta's formulas. Hint: $(a+b+c)^2=a^2+b^2+c^2+2(ab+bc+ca)\,$. – dxiv Dec 21 '16 at 17:48
• yes this is right and the solution is $23$ – Dr. Sonnhard Graubner Dec 21 '16 at 17:50
• So by Vieta's formula, I get 3*3-2(-7)=23. Thx! – user 42493 Dec 21 '16 at 18:06

$$(x_1)^2+(x_2)^2+(x_3)^2=(x_1+x_2+x_3)^2-2(x_1x_2+x_1x_3+x_2x_3)$$
You just have to find $x_1+x_2+x_3$ and $x_1x_2+x_1x_3+x_2x_3$ from the coeficients.
Hint: Writing your polynomial as $p(x)$, observe that \begin{align} p(x)p(-x) &=(x-x_1)(x-x_2)(x-x_3)\times -(x+x_1)(x+x_2)(x+x_3)\\ &=-(x^2-x_1^2)(x^2-x_2^2)(x^2-x_3^2). \end{align}