Consider the following square of side $1$ divided into right triangles:
Prove that the following equation holds:
I tried first using the Pythagorean theorem, getting 7 equations, one for each triangle, and after combining the equations, I got the following:
$$BI^2=-DE^2-FH^2-HI^2+2(GI)(EG)+2(GI)(CE)+2(EG)(CE).$$
Also, the sum of the areas of the triangles is $1$, and the area of each triangle is the product of the legs divided by $2$, but I know know if this can help (combined with the equation I got), or am I going on the wrong way?


First prove all the triangles are similar. This is easy as all angles are right or supplementary or congruent.
So
$AH = x$. $AB = 1$. $\frac {BI}{x} = \frac 1{\sqrt{1 + x^2}}; BI = \frac x{\sqrt{1+x^2}}$. $HI = \sqrt{ 1+x^2}- \frac x{\sqrt{1+x^2}}$.
$\frac {IG}{HI} = \frac x1; IG = x(\sqrt{ 1-x^2}- \frac x{\sqrt{1-x^2}});\frac {IG}{HG} = \frac {IB}1$. etc.
And so on.
By the end you will get $IG + GE +EC = \frac 1{\sqrt{1 - x^2}}$ and that $EC^2 + ED^2 = 1$.
One assumes putting all in terms of $x$ will yield the equation given.
====
Okay, let's put this together.
What is the scaling factor of each triangle:
$\triangle AHB$ is our basic the triangle with factor of $1$. It's dimensions are: $AH = x; AB= 1; BH = \sqrt{1 + x^2}$
$\triangle BIC$ is proportional ot $\triangle AHB$ and and it's sides are in proportion of $\frac {BI}{AH} = \frac {BC}{BH}=\frac {IC}{AB} = \frac{BI}x = \frac {1}{\sqrt {1 + x^2}} = {IC}$. So scaling factor is $\frac 1{\sqrt{1+x^2}}$. (Note: every scaling factor is the length of the long leg.)
$\triangle HIC$ has scaling factor of $HI= BH - BI = \sqrt{1+x^2} - AH*\frac 1{\sqrt{1+x^2}}= \frac {\sqrt{1+x^2}\sqrt{1+x^2}}{\sqrt{1+x^2}} - \frac x{\sqrt{1+x^2}}=\frac {1 - x +x^2}{\sqrt{1+x^2}}$
$\triangle HFG$ has scaling factor $HG =\frac {1 - x +x^2}{\sqrt{1+x^2}}*HB = 1-x + x^2$.
$\triangle FGE$ has scaling factor $FG = (1-x + x^2)HB = (1-x+x^2)\sqrt{1+x^2}$.
$\triangle FDE$ has scaling factor $FE = (1-x+x^2)\sqrt{1+x^2}*HB = (1-x+x^2)(1+x^2)$.
Finally $\triangle DEC$ has scaling factor $DE = (1-x+x^2)(1+x^2)*HB = (1-x+x^2)(1+x^2)\sqrt{1 + x^2}$.
So $1 = DC = HB* (1-x+x^2)(1+x^2)\sqrt{1 + x^2} = (1-x+x^2)(1+x^2)^2$.
So $(1+x^2)^2(1-x+x^2) - 1 = 0$
$(1 + 2x^2 + x^4)(1 - x +x^2)-1 = (1 + 2x^2 + x^4)- (x + 2x^3 + x^5)+(x^2 + 2x^4 + x^6)-1= x^6-x^5 +3x^4 -2x^3 +3x^2 - x + 1-1 =x(x^5-x^4 +3x^3 -2x^2 +3x - 1)= 0$
So $x^5-x^4 +3x^3 -2x^2 +3x - 1=0$.