Example 5 In $\triangle ABC$, $AB = BC > AC$, $AH$ and $AM$ are the altitude and median from vertex $A$ to side $BC$, respectively. Given that $\frac{S_{\triangle MH}}{S_{\triangle ABC}} = \frac{3}{8}$. Determine the value of $\cos \angle BAC$. ${ }^{[5]}$
(2009, Beijing High School Mathematics Competition Preliminary (Grade 10))
Solve As shown in Figure 5, let $A B=A C$ $=a, D$ be the midpoint of $A C$.
$$
\begin{array}{l}
\text { From } \frac{S_{\triangle A M H}}{S_{\triangle A B C}}=\frac{3}{8}, \\
B M=M C,
\end{array}
$$

we get $H C=\frac{1}{2} a-\frac{3}{8} a=\frac{1}{8} a$,
$\cos \angle B A C=\cos C$
$$
=\frac{H C}{A C}=\frac{H C}{2 D C}=\frac{H C}{2 a \cos C} \text {. }
$$

Therefore, $\cos ^{2} \angle B A C=\frac{1}{16}$.
Thus, $\cos \angle B A C=\frac{1}{4}$.