4. Let $a, b, c$ be the sides of a triangle, and their opposite angles be $2 \varphi, 3 \varphi, 4 \varphi$, respectively. $\cos \varphi$ can be expressed in terms of $a, b, c$ as $\cos \varphi=$ $\qquad$.
4. $\frac{a+c}{2 b}$.

By the Law of Sines, we have $\frac{a}{\sin 2 \varphi}=\frac{b}{\sin 3 \varphi}=\frac{c}{\sin 4 \varphi}=2 R, a+c=2 R(\sin 2 \varphi+\sin 4 \varphi)=2 R \cdot 2 \cos \varphi \cdot$ $\sin 3 \varphi=2 b \cos \varphi$, so $\cos \varphi=\frac{a+c}{2 b}$.