<s>[INST] 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$ 
If $z_{1},z_{2},z_{3}$ are three complex number Such that $|z_{1}| = 2\;\;,|z_{2}| = 3\;\;, |z_{3}| = 4\;\;$
Then $\max$ of $|z_{1}-z_{2}|^2+|z_{2}-z_{3}|^2+|z_{3}-z_{1}|^2$

$\bf{My\; Try::}$ Let $z_{1}=2\left(\cos \alpha+i\sin \alpha\right)$ and $z_{2}=3\left(\cos \beta+i\sin \beta\right)$ and $z_{3}=4\left(\cos \gamma+i\sin \gamma\right)$
So $$f(\alpha,\beta,\gamma) = 58-\left[12\cos(\alpha-\beta)+24\cos(\beta-\gamma)+16\cos(\gamma-\alpha)\right]$$
Now How can I calculate $\max$ of $f(\alpha,\beta,\gamma)$
Help me
Thanks
 [/INST] 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. 
</s>