Does a continuous function on the trace/image of a smooth path from $[a,b]$ to $\mathbb{C}$ have a maximum?

A parameterized smooth curve can be defined (e.g. Ullrich's "Complex Made Simple") as $\gamma: [a,b] \to \mathbb{C}$ that is piecewise continuously differentiable. Let its trace/image be $\gamma^*$.

Suppose $f: \gamma^* \to \mathbb{C}$ is continuous. Does $\max_{z \in \gamma^*} |f(z)|$ always exists?

Attempt: If there is only "one piece", the trace is the continuous image of a compact interval and hence is compact. The complex modulus is a continuous function, which would attains its maximum on a compact set.

But what if there is more than "one piece"? Can we take collect all the max of $|f(z)|$ on each pieces (partitions of $[a,b]$), and I suppose there must be finite number of pieces, so we can get the max of this collection?

• Isn't a "piecewise continuously differentiable function" continuous by definition? – Ulrik Jan 3 '14 at 23:58
• Need not be continous on the entire domain? en.wikipedia.org/wiki/Piecewise#Continuity – Jean Valjean Jan 3 '14 at 23:59
• I don't know which definition is the most standard, but this definition says that $f$ has to be continuous – Ulrik Jan 4 '14 at 0:01
• Oh I see my confusion. I confused "piecewise continuously differentiable" with "piecewise continous"! Thanks! +1 – Jean Valjean Jan 4 '14 at 0:04

Modulus of a continuous function is still continuous. So image of $[0,1]$, which is $\gamma^{*}$ is compact, and thus image of $|f|$ is also compact.
Compact set on $\mathbb{R}$ always have extrema.