TITLE: Maximum Modulus Exercise
QUESTION [10 upvotes]: Using the maximum modulus theorem in complex analysis, what is a good technique for finding the maximum of $|f(z)|$ on $|z|\le 1$, when $f(z)=z^2-3z+2$?
Got some really nice answers below, so I thought I'd share an image showing some contours of $|z^2-3z+2|$. Note that the magnitude does increase as we move "as far as possible" from the zeros  (phrase used in answer below). And, at $z=-1$, note how the contour $|z^2-3z+2|=6$ is tangent to the circle $|z|=1$.

REPLY [13 votes]: By the maximum modulus principle, the maximum is on the unit circle $|z| = 1$. Since $f$ has zeroes at $1$ and $2$, we would expect the maximum to be "as far as possible" away from those, i.e. at $x = -1$. Indeed, we have $f(-1) = 6$, and by the triangle inequality
$$|f(z)| = |z^2-3z+2| \leq |z|^2+3|z|+2 = 6$$
on the unit circle. So $x=-1$ gives a maximum, but we still have to show that there are no other maxima.
Identifying $\mathbb C$ with $\mathbb R^2$, writing $z = x+yi$, the function becomes
$$f(x,y) = (x^2-y^2-3x+2) +  (2xy-3y)i$$
and we want to maximize
$$|f(x,y)|^2 = (x^2-y^2-3x+2)^2 + (2xy-3y)^2$$
subject to the condition $x^2+y^2 = 1$. We can express $|f(x,y)|^2$ in terms of $x$ only, using $y^2=1-x^2$:
\begin{align*}|f(x,y)|^2 &= (2x^2-3x+1)^2 + (2x-3)^2(1-x^2)\\
&= 8x^2-18x+10.
\end{align*}
The only maximum of this in $[-1,1]$ is at $x = -1$ .