Solution (source code)

= Solution

For a bounded <entire function>, the preceding result with $n=0$ gives <Liouville's theorem>. If a nonconstant <polynomial> $p$ had no complex root, $1/p$ would be entire. The leading term gives $|p(z)|\to\infty$ at infinity, so $1/p$ is bounded outside a large disc and is also bounded on the remaining compact disc. <Liouville's theorem> would make $1/p$, and hence $p$, constant. This proves the <fundamental theorem of algebra>.

Finally, away from the <zeros> of $\cos z$, the <holomorphic> quotient $h=f/\cos z$ has modulus at most $C$. At each <zero> it therefore has a <removable singularity>. These isolated points have no finite accumulation, so removing all of them gives a bounded <entire function>. <Liouville's theorem> gives a constant $c$ with $|c|\leq C$, and
$$
\boxed{f(z)=c\cos z.}
$$
Conversely every such multiple satisfies the assumed bound.