The problem is as follows:
The figure from below shows two triangles intersected on point $E$. Assume $AE=3\,m$ and $ED=1\,m$. Find the maximum value of $AB+EC$
The given choices in my book are as follows:
$\begin{array}{ll} 1.&\sqrt{10}\,m\\ 2.&\4\,m\\ 3.&\sqrt{5}\,m\\ 4.&\4\,m\\ \end{array}$
The official solution for this problem according to my book is shown below:
Let $M=AB+EC$
Notice on the figure:
$AB=3\sin x$
and $EC=\cos x$
$M=3\sin x+\cos x$
$M=\sqrt{10}\left(\frac{3}{\sqrt{10}}\sin x+\frac{1}{\sqrt{10}}\cos x\right)$
$\tan \alpha =\frac{1}{3}$
$M=\sqrt{10}\left(\sin (x+\alpha)\right)$
Also notice that $x$ and $\alpha$ are acute angles.
Therefore:
$0<x+\alpha<\pi$
$\sin (x+\alpha)\leq 1$
Thus the maximum $M$ is $\sqrt{10}$.
There is where it ends the official solution.
But I am confused, where exactly is that alpha that is being talking about?, how did the author came up with the idea of $\sqrt{10}$ and the use of $\frac{1}{3}$.
Could someone please explain me, the logic that the author used and offer an alternate solution, perhaps easier to understand and less to guess what it was meant?.
I appreciate a step by step solution so I can understand.



Any expression in the form $a\sin x+b\cos x$ can be written as $\sqrt{a^2+b^2}\left(\frac{a}{\sqrt{a^2+b^2}}\sin x+\frac{b}{\sqrt{a^2+b^2}}\cos x\right)$. Note that $\left(\frac{a}{\sqrt{a^2+b^2}}\right)^2+\left(\frac{b}{\sqrt{a^2+b^2}}\right)^2=1$ which means that we can interpret these two expressions as cosine and sine of some angle $\alpha$. Think of a right triangle with legs $3$ and $1$ and you will understand what $\alpha$ is.