What is the maximum value of $|f(z)|$ on the unit disc $D=\{z \in \mathbb C:|z|\leq 1\}$? I am thinking about the following problem:

Let $f(z)=2z^2-1.$Then what is  the maximum value of $|f(z)|$ on the unit disc $D=\{z \in \mathbb C:|z|\leq 1\}$ ?

I guess i have to use the maximum modulus principle.But  i also notice that $|f(z)|=|2z^2-1|\leq 2|z|^2+1\leq 2+1=3.$  So, is $3$  the maximum value of $|f(z)|?$ Can someone point me in the right direction? Thanks in advance for your time.

As you correctly noted, the maximum modulus principle tells us that the maximum of $|f|$ is on the boundary. Thus we only have to check for $z=e^{i\phi}$ with $\phi\in\mathbb{R}$ and find the maximum among those points.
We can evaluate
$$|f(z)|^2 = |2 e^{2i\phi} -1|^2 =[2 \cos(2\phi) -1]^2 + 4 \sin^2(2\phi).$$
To maximize, we take the derivative with respect to $\phi$ and set it to 0. Some straightforward calculation shows that the function assumes its maximum value for $\phi=\pi/2$. The maximum of $|f(z)|^2$ is 9, thus the maximum of the modulus is 3 as you already expected.
