<s>[INST] Range of $f(z)=|1+z|+|1-z+z^2|$ when $ |z|=1$ 
Find the Range of $f(z)=|1+z|+|1-z+z^2|$ when $z$ is a complex $ |z|=1$

I am able to get some weaker bounds using triangle inequality.
$f(z)< 1+|z|+1+|z|+|z^2|=5$
also $f(z)>|1+z+1-z+z^2|=|z^2+2|>||z^2|-2|=1$,but
these are too weak!.as i have checked  with WA
Is there an elgant solution using minimum calculus?. Substituiting $x+iy$ makes things very complex indeed.
Answer:
$[\sqrt{\frac{7}{2}},3\sqrt{\frac{7}{6}}]$
 [/INST] Let $z=x+yi,$ where $x$ and $y$ are reals.
Thus, $x^2+y^2=1$ and
$$|z+1|+|1-z+z^2|=\sqrt{(x+1)^2+y^2}+\sqrt{(1-x+x^2-y^2)^2+(-y+2xy)^2}=$$
$$=\sqrt{2+2x}+\sqrt{(2x^2-x)^2+(1-x^2)(2x-1)^2}=\sqrt{2+2x}+|2x-1|$$ and we got a function of one variable $-1\leq x\leq 1.$
Can you end it now?
I got that the maximal value it's $\frac{13}{4}$ and occures for $x=\frac{-7}{8}.$
The minimal value it's $\sqrt3$ and occurs for $x=\frac{1}{2}.$
For the minimal value there is the following.
We need to prove that:
$$\sqrt{2x+2}+|2x-1|\geq\sqrt3$$ or
$$|2x-1|\geq\frac{1-2x}{\sqrt3+\sqrt{2+2x}},$$ which is true because
$$|2x-1|\left(\sqrt3+\sqrt{2+2x}\right)\geq|2x-1|\geq-(2x-1)=1-2x.$$
For the maximal value there is the following.
Let $x\geq\frac{1}{2}.$
Thus, $$\sqrt{2x+2}+|2x-1|=\sqrt{2x+2}+2x-1\leq\sqrt{2+2}+2-1=3<\frac{13}{4}.$$
Let $x\leq\frac{1}{2}$ and $\sqrt{2+2x}=y$.
Thus, $$\sqrt{2x+2}+|2x-1|=\sqrt{2x+2}-2x+1=\sqrt{2x+2}-2x-2+3=$$
$$=y-y^2+3=-\left(y-\frac{1}{2}\right)^2+\frac{13}{4}\leq\frac{13}{4}.$$
The equality occurs for $y=\frac{1}{2}$ or $x=-\frac{7}{8}.$
</s>