三个根设为x1,x2,x3
则x^3+px+q=(x-x1)(x-x2)(x-x3)=x^3-(x1+x2+x3)x^2+(x1x2+x2x3+x3x1)x-x1x2x3
比较x^2的系数,有x1+x2+x3=0