3. In $\triangle A B C$, it is known that $a, b, c$ are the sides opposite to $\angle A$, $\angle B$, $\angle C$ respectively. If
$$
\frac{a}{b}+\frac{b}{a}=4 \cos C, \cos (A-B)=\frac{1}{6},
$$

then $\cos C=$
3. $\frac{2}{3}$.

From the given and the cosine rule, we know
$$
\begin{array}{l}
\frac{a}{b}+\frac{b}{a}=4 \cdot \frac{a^{2}+b^{2}-c^{2}}{2 a b} \\
\begin{aligned}
\Rightarrow & a^{2}+b^{2}=2 c^{2} \\
\Rightarrow & 2 \sin ^{2} C=\sin ^{2} A+\sin ^{2} B \\
& =\frac{1-\cos 2 A}{2}+\frac{1-\cos 2 B}{2} \\
& =1-\cos (A+B) \cdot \cos (A-B) \\
& =1+\frac{1}{6} \cos C \\
\Rightarrow & 1+\frac{1}{6} \cos C=2\left(1-\cos ^{2} C\right) \\
\Rightarrow & \cos C=\frac{2}{3} \text { or }-\frac{3}{4} .
\end{aligned}
\end{array}
$$

Since $\cos C+\cos (A-B)=2 \sin A \cdot \sin B>0$ $\Rightarrow \cos C=-\frac{3}{4}$ (rejected).
Therefore, $\cos C=\frac{2}{3}$.