Prove the following relation between side lengths Let $ABC $ be any triangle , right-angled at $A$ , with $D$ any point on the side $AB$. The line $DE$ is drawn parallel to $BC$ to meet the side AC at the point E. F is the foot of the perpendicular drawn from E to BC. If $AD=x_1$ , $DB=x_2$ , $BF=x_3$, $EF=x_4$ and $AE=x_5$.  Then show that
$$\frac{x_1}{x_5} + \frac{x_2}{x_5} = \frac {x_1x_3  + x_4x_5}{x_3x_5 - x_1x_4}$$
My attempt was finding similar triangles but there are a lot of them and I really can't seem to make any progress
 A: Note that $\tan \angle AEB=\frac{x_1+x_2}{x_5}$
and $\angle AEB = \angle AED +\color{blue}{\angle BED}=\angle AED +\color{blue}{\angle EBF}$ given that lines $DE$ and $BF$ are parallel.
Using the sum of angles formula for the tangent function we have
$$\tan \angle AEB=\frac{\tan\angle AED +\tan\angle EBF}{1-\tan\angle AED\tan\angle EBF}$$
where $\tan \angle AED=\frac{x_1}{x_5}$ and $\tan \angle EBF=\frac{x_4}{x_3}$.
Substituting results in 
$$\frac{x_1+x_2}{x_5}=\frac{\frac{x_1}{x_5}+\frac{x_4}{x_3}}{1-\frac{x_1}{x_5}\frac{x_4}{x_3}}=\frac{x_1x_3+x_4x_5}{x_3x_5-x_1x_4}$$
A: Using the elementary trig functions is a good way to simplify the bookkeeping of this multitude of similar triangles.  Every step in the below proof can be translated into statements using similar triangles, except one, that also requires the pythagorean theorem.
Extend line $FE$ and line $BA$ to meeting point $H$.  Also drop a perpendicular from $D$ meeting line $CB$ at $G$.  Call angle $ABD$ $\theta$. 
Then angle $AEH$ is also $\theta$ and:
$$
x_5 = x_1 \tan \theta \\
x_4 = DG = x_2 \sin \theta \\
AH = x_5 \tan \theta = x_1^2 \tan^2 \theta\\
BH = x_1 + x_2 + x_1 \tan^2 \theta = x_1\sec^2 \theta + x_2
$$
(in that last step we used Pythagorean theorem).
$$
x_3 = BH \cos \theta = x_1 \sec \theta + x_2 \cos \theta\\
x_1x_3 + x_4x_5 = x_1^2 \sec \theta + x_1x_2 \cos \theta + x+1x_2 \frac{\sin^2 \theta}{\cos\theta} =x_1^2 \sec \theta +  x_1 x_2 \sec \theta
$$
where we used Pythagorean in that last line as well.
$$
x_3x_5 - x_1 x_4 = x_1^2 \frac{\sin\theta}{\cos^2\theta} + x_1x_2 \sin\theta - x_1x_2 \sin\theta = x_1^2 \sec \theta \tan \theta
$$
Then the right hand side is 
$$\frac{x_1(x_1+x_2)}{x_1^2}\cot \theta
$$
and the left hand side is
$$
\frac{x_1+x_2}{x_1\tan\theta}
$$
which are equal.
A: I think it's easy to do this using coordinates, as there are many right angles.
So, fix triangle ABC in such a way that A = origin, C = (1, 0), B = (0, b) with b > 0. Let D = (0, d) for some 0 <= d <= b.
Then you can calculate the coordinates of points E and F to get that 
E = (d/b, 0), F = ( (b^3 + d)/(b(b^2 + 1)), (b - d) / (b^2 + 1) ).
And then calculate all the lengths to get the required result.
It involves a bit of nasty algebra, so perhaps it's not a shortest solution, but at least a straightforward way to do without thinking too much, just performing mechanical calculations.
