弦所在的直线设为y=kx+b
y1+y2=kx1+b+kx2+b=k(x1+x2)+2b
y1y2=(kx1+b)(kx2+b)=k^2x1x2+kb(x1+x2)+b^2
将x1+x2,x1x2代入即可.