13. (20 points) As shown in Figure 2, planes $M$ and $N$ intersect at line $l$. Points $A$ and $D$ are on line $l$, ray $DB$ is in plane $M$, and ray $DC$ is in plane $N$. Given that $\angle BDC = \alpha$, $\angle BDA = \beta$, $\angle CDA = \gamma$, and $\alpha$, $\beta$, $\gamma$ are all acute angles. Find the cosine of the dihedral angle $M-l-N$ (expressed in terms of the trigonometric values of $\alpha$, $\beta$, $\gamma$).
13. In planes $M$ and $N$, draw a perpendicular from point $A$ to $DA$, intersecting rays $DB$ and $DC$ at points $B$ and $C$ respectively.
Given $DA=1$. Then
\[
\begin{array}{l}
AB=\tan \beta, DB=\frac{1}{\cos \beta}, \\
AC=\tan \gamma, DC=\frac{1}{\cos \gamma},
\end{array}
\]

and $\angle BAC=\varphi$ is the plane angle of the dihedral angle $M-l-N$.
In $\triangle DBC$ and $\triangle ABC$, using the cosine rule we get
\[
\begin{array}{l}
BC^{2}=\frac{1}{\cos ^{2} \beta}+\frac{1}{\cos ^{2} \gamma}-\frac{2 \cos \alpha}{\cos \beta \cdot \cos \gamma} \\
=\tan ^{2} \beta+\tan ^{2} \gamma-2 \tan \beta \cdot \tan \gamma \cdot \cos \varphi .
\end{array}
\]

Thus, $2 \tan \beta \cdot \tan \gamma \cdot \cos \varphi$
\[
\begin{aligned}
= & \tan ^{2} \beta+\tan ^{2} \gamma-\frac{1}{\cos ^{2} \beta}-\frac{1}{\cos ^{2} \beta}+ \\
& \frac{2 \cos \alpha}{\cos \beta \cdot \cos \gamma} \\
= & \frac{2(\cos \alpha-\cos \beta \cdot \cos \gamma)}{\cos \beta \cdot \cos \gamma} .
\end{aligned}
\]

Therefore, $\cos \varphi=\frac{\cos \alpha-\cos \beta \cdot \cos \gamma}{\sin \beta \cdot \sin \gamma}$.