Let $a, b, c$ denote given positive numbers, and $x, y, z$ the angles of a triangle. For every possible triangle, we calculate the value of $a \cos x+b \cos y+c \cos z$. What is the maximum of these values?
Without loss of generality, we can assume that $a \geqq b \geqq c$, and thus $\frac{a b}{c} \geqq \frac{a c}{b} \geqq \frac{b c}{a}$.

Let the distance between points $A$ and $B$ be $\sqrt{a b / c}$, and let $C$ be a point in the plane such that the angles of triangle $A B C$ are exactly $x, y$, and $z$ (Figure 1).

![](https://cdn.mathpix.com/cropped/2024_05_02_b1baf34f32c1fe9d670eg-1.jpg?height=613&width=761&top_left_y=328&top_left_x=671)

Figure 1

Take point $K$ on the ray $A C$ such that $A K = \sqrt{a c / b}$, and point $L$ on the ray $B C$ such that $B L = \sqrt{b c / a}$. It is clear that $K$ lies on the circle centered at $A$ with radius $\sqrt{a c / b}$, and $L$ lies on the circle centered at $B$ with radius $\sqrt{b c / a}$. First, we determine the distance $K L$. For this, note that the vector $\overrightarrow{K L}$ is the sum of the vectors $\overrightarrow{K A}$, $\overrightarrow{A B}$, and $\overrightarrow{B L}$, so

$$
\begin{gathered}
K L^{2}=(\overrightarrow{K A}+\overrightarrow{A B}+\overrightarrow{B L})^{2}=K A^{2}+A B^{2}+B L^{2}+2 \overrightarrow{K A} \cdot \overrightarrow{A B}+ \\
+2 \overrightarrow{K A} \cdot \overrightarrow{B L}+2 \overrightarrow{A B} \cdot \overrightarrow{B L}
\end{gathered}
$$

The values of the three scalar products appearing here can be easily obtained, since the angle between $\overrightarrow{K A}$ and $\overrightarrow{A B}$ is $180^{\circ}-x$, the angle between $\overrightarrow{A B}$ and $\overrightarrow{B L}$ is $180^{\circ}-y$, and the angle between $\overrightarrow{B L}$ and $\overrightarrow{K A}$ is $180^{\circ}-z$, and the lengths of the vectors are also known. Thus,

$$
\begin{array}{r}
K L^{2}=K A^{2}+A B^{2}+B L^{2}-2 K A \cdot A B \cdot \cos x- \\
-2 A B \cdot B L \cdot \cos y-2 B L \cdot K A \cdot \cos z
\end{array}
$$

from which

$$
2 a \cos x+2 b \cos y+2 c \cos z=\frac{a b}{c}+\frac{a c}{b}+\frac{b c}{a}-K L^{2}
$$

Thus, the expression in question attains its maximum when the distance $K L$ is minimized. If now the two circles mentioned above intersect, that is,

$$
\sqrt{\frac{a b}{c}}<\sqrt{\frac{a c}{b}}+\sqrt{\frac{b c}{a}}
$$

or dividing both sides by $\sqrt{a b c}$, $1 / c < 1 / a + 1 / b$, then $K$ and $L$ can both fall on the intersection point, so the minimum distance $K L$ is 0, and according to (2), the maximum of $a \cos x + b \cos y + c \cos z$ is

$$
\frac{1}{2}\left(\frac{a b}{c}+\frac{a c}{b}+\frac{b c}{a}\right)
$$

If, however, (3) is not satisfied, then the distance between points $K$ and $L$ is always greater than $\sqrt{\frac{a b}{c}} - \sqrt{\frac{a c}{b}} - \sqrt{\frac{b c}{a}}$, and thus $a \cos x + b \cos y + c \cos z$ is always greater than

$$
\frac{1}{2}\left(\frac{a b}{c}+\frac{a c}{b}+\frac{b c}{a}-\left(\sqrt{\frac{a b}{c}}-\sqrt{\frac{a c}{b}}-\sqrt{\frac{b c}{a}}\right)^{2}\right)=a+b-c
$$

but this value can be approached arbitrarily closely.

Weisz Ferenc (Mohács, Kisfaludy K. Gymnasium, 4th grade)

Remark. The relationship (1) can also be obtained without referring to vectors. Let $D$ be the point such that $K L B D$ is a parallelogram.

![](https://cdn.mathpix.com/cropped/2024_05_02_b1baf34f32c1fe9d670eg-2.jpg?height=707&width=761&top_left_y=140&top_left_x=671)

Figure 2

Then, by the cosine rule (Figure 2),

$$
\begin{gathered}
2 K A \cdot A B \cdot \cos x=K A^{2}+A B^{2}-K B^{2} \\
2 A B \cdot B L \cdot \cos y=A B^{2}+B L^{2}-A L^{2} \\
2 B L \cdot K A \cos z=2 D K \cdot K A \cdot \cos z=D K^{2}+K A^{2}-A D^{2}
\end{gathered}
$$

Thus, to prove (1), we need to show that

$$
K L^{2}=K B^{2}+A L^{2}+A D^{2}-\left(A B^{2}+K A^{2}+B L^{2}\right)
$$

Let $S$ be the midpoint of the parallelogram $K L B D$. Using the fact that in any parallelogram, the sum of the squares of the sides equals the sum of the squares of the diagonals, and that $A S$ is the median in triangles $K A B$ and $L A D$, we get

$$
\begin{aligned}
4 A S^{2} & =2 A B^{2}+2 A K^{2}-K B^{2} \\
4 A S^{2} & =2 A L^{2}+2 A D^{2}-L D^{2} \\
2 K L^{2}+2 B L^{2} & =L D^{2}+K B^{2}
\end{aligned}
$$

Subtracting the sum of the second and third equations from the first equation, we obtain (4).