Let $a, b, c$, and $\alpha, \beta, \gamma$ denote the sides and angles of a triangle, respectively. Simplify the following expression:

$$
\frac{\alpha \cdot \cos \alpha+b \cdot \cos \beta-c \cdot \cos \gamma}{\alpha \cdot \cos \alpha-b \cdot \cos \beta+c \cdot \cos \gamma}
$$
I. solution. Substitute the expressions of the angles of the triangle in terms of the sides based on the cosine theorem into the numerator of $K$ and bring to a common denominator:

$$
\begin{gathered}
a \cos \alpha + b \cos \beta - c \cos \gamma = \\
\frac{1}{2 a b c} \left\{a^{2}\left(b^{2}+c^{2}-a^{2}\right)+b^{2}\left(c^{2}+a^{2}-b^{2}\right)-c^{2}\left(a^{2}+b^{2}-c^{2}\right)\right\} = \\
\frac{c^{4}-\left(a^{4}-2 a^{2} b^{2}+b^{4}\right)}{2 a b c} = \frac{\left(c^{2}-a^{2}+b^{2}\right)\left(c^{2}+a^{2}-b^{2}\right)}{2 a b c} = 2 c \cos \alpha \cos \beta
\end{gathered}
$$

(In the last step, we again used the cosine theorem.)

From our result, by swapping the sides $a b$ and $c$ - and accordingly the angles $\beta$ and $\gamma$ - we find that the denominator of $K$ is equal to $2 b \cos \alpha \cos \gamma$. This implies, on the one hand, that $K$ is only defined if neither $\alpha$ nor $\gamma$ is a right angle, and on the other hand, we get that if $\alpha \neq \frac{\pi}{2}, \gamma \neq \frac{\pi}{2}$, then

$$
K = \frac{c \cos \alpha}{b \cos \gamma} \frac{\beta}{\gamma}
$$

This can be further simplified using the sine theorem:

$$
K = \frac{\operatorname{tg} \gamma}{\operatorname{tg} \beta} = \operatorname{tg} \gamma \operatorname{ctg} \beta
$$

II. solution. Based on $2 r = a / \sin \alpha = b / \sin \beta = c / \sin \gamma$ and known trigonometric identities, by transforming $K$, we get:

$$
\begin{aligned}
& K = \frac{\sin 2 \alpha + \sin 2 \beta - \sin 2 \gamma}{\sin 2 \alpha - \sin 2 \beta + \sin 2 \gamma} = \frac{\sin 2 \alpha + 2 \cos (\beta+\gamma) \sin (\beta-\gamma)}{\sin 2 \alpha + 2 \cos (\beta+\gamma) \sin (\gamma-\beta)} = \\
& \frac{\sin \alpha - \sin (\beta-\gamma)}{\sin \alpha - \sin (\gamma-\beta)} = \frac{\sin (\beta+\gamma) - \sin (\beta-\gamma)}{\sin (\beta+\gamma) - \sin (\gamma-\beta)} = \frac{\cos \beta \sin \gamma}{\sin \beta \cos \gamma} = \frac{\operatorname{tg} \gamma}{\operatorname{tg} \beta}
\end{aligned}
$$

In the process, we used the fact that $\alpha + \beta + \gamma = \pi$, and thus $\cos (\beta+\gamma) = -\cos \alpha$ and $\sin \alpha = \sin (\beta+\gamma)$. Since we simplified by $\cos \alpha$ in the third form, our transformation is valid if $\alpha \neq \frac{\pi}{2}$, and the final form of $K$ is defined if $\gamma \neq \frac{\pi}{2}$.

It is easily seen that if either $\alpha$ or $\gamma$ is a right angle, then $K$ is also 0 in its original form in the denominator.

Remark. Since both the numerator and the denominator of $K$ are lengths, $K$ itself is just a number, depending only on the angles, and thus on the shape of the triangle. Therefore, it is natural that only two angles appear in the final form, since two angles already determine the shape of the triangle.