Given the square, calculate $\tan{\alpha}.$ Problem: Given the square $ABCD$, let $M$ be the midpoint on the side $|CD|$ and designate $\alpha=\angle AMB$. Calculate $\tan{\alpha}.$
Attempt: We can, without compromising generality, assume that the side of the square is equal to 1. So drawing a figure we get


I know the following: 
1) That $|AM|=|BM|=\sqrt{1^2+\left(\frac{1}{2}\right)^2}=\frac{\sqrt{5}}{2}.$
2) The area of $ABM$ can be expressed in two ways. One way with normal geometry for triangle and another way is by using the areakit involving $\sin{\alpha}$. So: $$\begin{array}{lcl}
A_1 & = & \frac{1\cdot 1}{2} = \frac{1}{2} \\
A_2 & = & \frac{|AM|\cdot|BM|\cdot\sin{\alpha}}{2} = \frac{5}{2}\cdot\sin{\alpha} \\
\end{array}$$
3) I know that $\tan{\alpha}=\frac{\sin{\alpha}}{\cos{\alpha}},$ so finding $\sin{\alpha}$ and $\cos{\alpha}$ and dividing these two will solve this problem.

Setting $A_1=A_2$ yields the equation $$\frac{5}{2}\sin{\alpha}=\frac{1}{2} \ \Longleftrightarrow \ \sin{\alpha} = \frac{1}{5}.$$
Using the law of cosines in the triangle $ABM$ I get 
$$\begin{array}{lcl}
|AB|^2 & = & |AM|^2+|BM|^2 -2|AM||BM|\cos{\alpha} \\
1 & = & \sqrt{5}-\sqrt{5}\cos{\alpha} \ \Leftrightarrow \ \cos{\alpha} = \frac{\sqrt{5}-1}{\sqrt{5}} \\
\end{array}$$
And finally we have $$\tan{\alpha}=\frac{\sin{\alpha}}{\cos{\alpha}}=\frac{\frac{1}{5}}{\frac{\sqrt{5}-1}{\sqrt{5}}} = \frac{5+\sqrt{5}}{20}.$$
But it's not correct. Any idea where I'm making the mistake in my attempt, and is there an easier way of solving this problem?

You've already found the lengths shown below.

Hence
\begin{align}
   u^2 &= \left(\frac{\sqrt 5}{2}\right)^2 -\left(\frac{2}{\sqrt 5}\right)^2 \\
       &= \frac 54 - \frac 45 \\
       &= \frac{9}{20} \\
     u &= \frac{3}{2\sqrt 5}
\end{align}
It follows that
$ \tan \alpha = \dfrac{\frac{2}{\sqrt 5}}{\frac{3}{2\sqrt 5}} = \frac 43$
