In[]:=
eqns={x^2/4+y^2/21,y(1/2)x+1};​​polyex=Apply[Subtract,eqns,{1}]​​polys=Numerator[Together[Apply[Subtract,eqns,{1}]]]​​xpoly=Resultant[polys[[1]],polys[[2]],y]​​discx=Factor[Discriminant[xpoly,x]]​​slope=-CoefficientList[polyex[[2]],x][[2]]​​coeffs=CoefficientList[xpoly,x]​​(*{rootproduct,rootsum}=Together[Most[coeffs]/Last[coeffs]]*)​​{rootsum,rootproduct}={-CoefficientList[xpoly,x][[2]]/Last[coeffs],CoefficientList[xpoly,x][[1]]/Last[coeffs]}​​Chordlength=Simplify[Sqrt[1+slope^2]Sqrt[rootsum^2-4rootproduct]]
Out[]=
-1+
2
x
4
+
2
y
2
,-1-
x
2
+y
Out[]=
{-4+
2
x
+2
2
y
,-2-x+2y}
Out[]=
-8+8x+6
2
x
Out[]=
256
Out[]=
1
2
Out[]=
{-8,8,6}
Out[]=
-
4
3
,-
4
3

Out[]=
4
5
3
In[]:=
rootsum=-CoefficientList[xpoly,x][[2]]/Last[coeffs]
Out[]=
-
2
2
a
km
2
b
+
2
a
2
k
In[]:=
rootproduct=CoefficientList[xpoly,x][[1]]/Last[coeffs]
Out[]=
-
2
a
2
b
+
2
a
2
m
2
b
+
2
a
2
k