## Stewart's Theorem

Consider a Cevian AD from vertex A of the triangle ABC, intersecting the opposite side BC in ratio BD/DC = r/s. Then the length AD2 is:

The proof results by applying the cosine theorem on triangles ABD, ADC.
A question that may arise is if there exists a ratio r/s, such that all corresponding segments AD, BE, CF are equal.
Setting this common length AD2 = BE2 = CF2 = d2, we get the equation

Considering this as a linear system in r2, s2, rs, the determinant of the matrix is W = (a6+b6+c6-3(abc)2). W = 0 when the triangle is equilateral. Then, for every (r,s) we find a solution. When W is nonzero, then the solution is of the form (r2, s2, rs) = m(2, 2, -1), which gives an incompatible system for r,s.
Two instances of the formula are well known: Applying this formula for the median (r=s=1), gives:
ma2 = (2(b2+c2)-a2)/4.
And for the internal bisector of the angle A (r = c, s = b):
u2 = bc(1- (a /(b+c))2), whereas the external bisector satisfies:
v2 = bc((a /(b-c))2-1).
For points D = (1-t)B+tC, BD/DC = t/(1-t) = r/s with r+s=1. The above formula becomes:
AD2 = tb2+(1-t)c2-t(1-t)a2. This can be used to determine the (at most) two values of t, for which the cevian AD has a given length. In particular the minimum value, corresponding to the altitude from A, occurss when 2ta2 + (b2-a2-c2) = 0, and the expresion for the ratio is:
BD/DC = t/(1-t) = (a2+c2-b2)/(a2+b2-c2).
For a fixed t, the corresponding lengths AD2, BE2, CF2 satisfy the equations:

Eliminating t from the equations we find two equations determining AD2, BE2, CF2, once one of the is known.
See the file SquaresCombination.html for a nice application of the theorem of Stewart.