<s>[INST] Maximum and minimum value of $f(z)= |1+z|+|1-z+z^2|$ Let $f(z)= |1+z|+|1-z+z^2|$. Then what is the maximum and minimum value of $f(z)$, if $|z|=1$, where $z$ is a complex number.
Its very difficult to go through the process when we put $z=x+iy$ in the function and then quantify the maximum value. Is there any other method to find out. Any suggestion would be appreciated.
 [/INST] $$\begin{align}z = e^{2it}, f &= |1 + z| + |1-z+z^2|\\ &= |1+z| + \frac{|1 + z^3|}{|1+z|}\\
& = 2\cos t+ \frac{\cos 3t}{\cos t} \\
&= 2|\cos t|+|4\cos^2 t - 3|\\
& = 2|x| + |4x^2-3|, x = \cos t \end{align}$$
we can break $$f(x) = 2|x| + |4x^2 - 3| = \begin{cases} 2x+3-4x^2 & if\, 0 < x < \sqrt 3/2\\ 2x + 4x^2 - 3 & if \, \sqrt 3/2< x < 1\end{cases}$$
$$ \text{the maximum value is } f(1/4) = 3.25 \text{ and the minimum value is } f(\sqrt 3/2) = \sqrt 3.$$
</s>