a(x-x1)(x-x2)=ax^2-a(x1+x2)x+ax1x2
又a(x-x1)(x-x2)=ax^2+bx+c
故ax^2-a(x1+x2)x+ax1x2=x^2+bx+c
经x^2的系数要相等(a=a),x的系数要相等(-a(x1+x2)=b),常数项系数要相等(ax1x2=c)
整理即得:
x1+x2=-b/a
x1x2=c/a
a(x-x1)(x-x2)=ax^2-a(x1+x2)x+ax1x2
又a(x-x1)(x-x2)=ax^2+bx+c
故ax^2-a(x1+x2)x+ax1x2=x^2+bx+c
经x^2的系数要相等(a=a),x的系数要相等(-a(x1+x2)=b),常数项系数要相等(ax1x2=c)
整理即得:
x1+x2=-b/a
x1x2=c/a