In $\triangle A B C$, the sides opposite to $\angle A, \angle B, \angle C$ are $a, b, c$ respectively, and
$$
a=5, b=4, \cos (A-B)=\frac{31}{32} \text {. }
$$

Then the area of $\triangle A B C$ is $\qquad$
8. $\frac{15 \sqrt{7}}{4}$.

By the Law of Sines, we have
$$
\begin{array}{l}
\frac{a}{\sin A}=\frac{b}{\sin B}=\frac{a+b}{\sin A+\sin B}=\frac{a-b}{\sin A-\sin B} \\
\Rightarrow 9(\sin A-\sin B)=\sin A+\sin B \\
\Rightarrow 18 \sin \frac{A-B}{2} \cdot \cos \frac{A+B}{2}=2 \sin \frac{A+B}{2} \cdot \cos \frac{A-B}{2} \\
\Rightarrow \tan \frac{A+B}{2}=9 \tan \frac{A-B}{2} . \\
\text { Note that, } \cos (A-B)=\frac{1-\tan ^{2} \frac{A-B}{2}}{1+\tan ^{2} \frac{A-B}{2}} .
\end{array}
$$

Given $a>b$, we know $\angle A>\angle B$.
Then $\tan \frac{A-B}{2}=\frac{\sqrt{7}}{21}$
$\Rightarrow \tan \frac{A+B}{2}=\frac{3 \sqrt{7}}{7}$
$\Rightarrow \tan \frac{C}{2}=\cot \frac{A+B}{2}=\frac{\sqrt{7}}{3}$
$\Rightarrow \sin C=\frac{3 \sqrt{7}}{8}$
$\Rightarrow S_{\triangle A B C}=\frac{1}{2} a b \sin C=\frac{15 \sqrt{7}}{4}$.