Given complex $|z_{1}| = 2\;\;,|z_{2}| = 3\;\;, |z_{3}| = 4\;\;$ : when and what is $\max$ of $|z_{1}-z_{2}|^2+|z_{2}-z_{3}|^2+|z_{3}-z_{1}|^2$

Since $$\begin{align} |z_1 - z_2|^2 + |z_2-z_3|^2 + |z_3-z_1|^2 = & 2(|z_1|^2 + |z_2|^2 + |z_3|^2) - 2\Re\left(z_1\bar{z}_2 + z_{2}\bar{z}_3 + z_{3}\bar{z}_1\right)\\ = & 3(|z_1|^2 + |z_2|^2 + |z_3|^2) - |z_1+z_2+z_3|^2\\ = & 3(2^2+3^2+4^2)-|z_1+z_2+z_3|^2\\ = & 87 - |z_1+z_2+z_3|^2 \end{align}$$ LHS is bounded from above by $87$. To see $87$ is the actual maximum, let's look at the set of 3 numbers $2, 3, 4$. They satisfy

$$\begin{cases} 2 < 3+4\\ 3 < 2+4\\ 4 < 2+3 \end{cases}$$ Classical geometry tell us we can realize them as the side lengths of a triangle. Let's say we have a triangle $ABC$ with side $|AB| = 2, |BC| = 3, |CA| = 4$. Identify the euclidean plane $\mathbb{R}^2$ with $\mathbb{C}$ and use the same symbol $A$, $B$, $C$ to represent the complex numbers corresponds to corresponding vertices. If we define

$$\begin{cases} z_1 &= B-A\\ z_2 &= C-B\\ z_3 &= A-C \end{cases}$$ We will have $|z_1| = 2$, $|z_2| = 3$, $|z_3| = 4$ and $z_1 + z_2 + z_3 = 0$. This means the upper bound $87$ is reachable and hence is the desired maximum.


The maximum is $87$.

First we note that by a simple compactness argument, the maximum must be attained for some choice of $z_1$, $z_2$, $z_3$.

Assume first that $z_1$ and $z_2$ are fixed and we let $z_3$ vary. Let $y_3$ be the midpoint of the segment between $z_1$ and $z_2$. The loci on which $Q = |z_3 - z_2|^2 + |z_3 - z_1|^2$ is constant are circles centred at $y_3$. The larger the radius, the larger $Q$ is. Thus $Q$ is maximized when $z_3$ is taken as far away from $y_3$ as possible while keeping $|z_3| = 4$. This occurs when $z_3$ is chosen so that the origin $O$ lies on the median $y_3 z_3$ of triangle $z_1 z_2 z_3$.

Similar arguments can be made for $z_1$ and $z_2$. Therefore, when $z_1$, $z_2$ and $z_3$ are chosen optimally, either $O$ must be the centre of gravity of the triangle $z_1$, $z_2$, $z_3$, or the triangle must be degenerate. Assume first that it is the former.

If we let $a = |z_1 - z_2|$, $b = |z_2 - z_3|$ and $c = |z_3 - z_1|$, and we let $m_a$, $m_b$, $m_c$ be the corresponding medians, then we have $m_a = (3/2)|z_3| = 6$, $m_b = (3/2)|z_1| = 3$, and $m_c = (3/2)|z_2| = 9/2$. Now using $4m_a^2 + a^2 = 2b^2 + 2c^2$ (valid in any triangle, proved using the parallelogram law) and the analogous identities for $m_b$ and $m_c$, we get the system $$\begin{align*} 144 + a^2 &= 2b^2 + 2c^2, \\ 36 + b^2 &= 2c^2 + 2a^2, \\ 81 + c^2 &= 2a^2 + 2b^2. \end{align*}$$ Adding the equalities, we find $a^2 + b^2 + c^2 = 87$. This calculation is also valid in a degenerate triangle, so long as $z_1 + z_2 + z_3 = 0$.

Thus the maximum value is realized either when $z_1$, $z_2$ and $z_3$ are chosen so that $z_1 + z_2 + z_3 = 0$, in which case the value attained is $87$, or when the triangle is degenerate, in which case the maximum value is $86$. (The only degenerate configuration in which $z_i$ and $y_i$ are on opposite sides of $O$ for $i = 1, 2, 3$ is when $z_3$ is on one side of $O$ and $z_1, z_2$ on the other.) Thus the only question is whether a configuration with $z_1 + z_2 + z_3 = 0$ can be realized. But for $|z_1| = 2$ and $|z_2| = 3$, the value of $|z_1 + z_2|$ ranges between $1$ and $5$. Therefore $|z_1 + z_2| = 4$ can indeed be realized.


$$\dfrac S4=3\cos(A-B)+6\cos(B-C)+4\cos(C-A)$$

$$=\cos A(3\cos B+4\cos C)+\sin A(3\sin B+4\sin C)+6\cos(B-C)$$

$$=\sqrt{25+24\cos(B-C)}\cos\left(A-\arccos\dfrac{3\cos B+4\cos C}{3\sin B+4\sin C}\right)+6\cos(B-C)$$

$$\le\sqrt{25+24\cos(B-C)}+6\cos(B-C)$$

If $\sqrt{25+24\cos(B-C)}=y, 1\le y\le7$ and $\cos(B-C)=\dfrac{y^2-25}{24}$

$$S\le4y+24\cdot\dfrac{y^2-25}{24}=4y+y^2-25=(y+2)^2-29\le-29$$

$$\implies f(\alpha+\beta+\gamma)\ge58+29$$

The equality occurs if $y=2$ and $A-\arccos\dfrac{3\cos B+4\cos C}{3\sin B+4\sin C}=2n\pi$ where $n$ is any integer