Prove this square's edge has length 6. 

In square $ABCD$, $E$ is the midpoint of $[AD]$. $F\in{[AB]}$ and $\measuredangle{FCE}=45^{\circ}$. $|AF|=4$.

How can i prove $|AB|=6$? In other words how can i find the length of $[AB]$?
1) I drew the line $FE$ and defined some varibles for $ED, DC$ and $FB$, then i wrote the lengths of $EC$ and $FC$ in terms of varible that i've defined. It is possible to find $|FE|$ via Cosinus theorem in terms of the varible, again. An equation can be written from perpendicular triangle $\triangle{AEF}$ to find this varible exactly but, it gets so complicated.
2) By defining same varible, it is possible to find $\tan(\measuredangle{ECD})$. Then it is also possible to find $\tan(\measuredangle{FCB})$ by using trigonometric addition formulas but again it gets so complicated.
I guess we will get similar triangles by drawing a line that does it, because the angle $\measuredangle{ECD}$ is given. It should be transported somewhere.
 A: A proof without trigonometry:
Let $M = AB \cap CE$ and $N = DA \cap CF$. Triangles $CDE$ and $MAE$ are congruent because $E$ is the midpoint of $DA$. Thus $$MA = DA = AB = BC = CD$$ Since $\measuredangle \, DAM = 90^{\circ}$ the triangles $ADM$ is right isosceles. Hence $\measuredangle \, MDA = 45^{\circ}$.

Since $$\measuredangle \, MDN = \measuredangle \, MDA = 45^{\circ} = \measuredangle \, ECF = \measuredangle \, MCN$$ the quad $CDMN$ is inscribed in a circle and $$\measuredangle \, MNC = 180^{\circ} - \measuredangle \, CDM =  180^{\circ} - (\measuredangle \, CDA  + \measuredangle \, ADM)  =  180^{\circ} - (90^{\circ} + 45^{\circ}) = 45^{\circ}$$ Therefore triangles $CMN$ is right isosceles triangle with $MC = MN$. Consequently triangles $BCM$ and $AMN$ are congruent hence $NA = BM = 2 \, AB = 2 \, CD$. Finally by the intercept theorem (or by the similarity between the triangles $CDN$ and $FAN$ if you prefer) $$\frac{CD}{AF} = \frac{ND}{NA} = \frac{3 \, CD}{2 \, CD} = \frac{3}{2}$$ Hence $$AB = BC = CD = DA =  \frac{3}{2} \, AF = 6$$
A: Denote $|AB|=x$.


*

*$\measuredangle ECD = \arctan \frac{1}{2}$

*$\measuredangle FCB = \frac{\pi}{2}-\frac{\pi}{4}-\arctan \frac{1}{2}=\frac{\pi}{4}-\arctan \frac{1}{2}$

*$\frac{x-4}{x}=\tan(\frac{\pi}{4}-\arctan \frac{1}{2})=\frac{1-\frac{1}{2}}{1+1\cdot \frac{1}{2}}=\frac{1}{3}\\
x-4=\frac{x}{3}\\
x=6$

