Step 1: Choose the variables.
Let the base radius be $r$ and the height be $h$. The total surface area $S$ is a fixed number, so $2\pi r^2 + 2\pi r h = S$. We will keep the constraint as it is and use the method of implicit differentiation instead of solving for $h$ first.
Step 2: Differentiate the constraint with respect to $r$.
Treat $h$ as a function of $r$ and $S$ as a constant.
\[ 4\pi r + 2\pi h + 2\pi r \frac{dh}{dr} = 0 \quad\Rightarrow\quad \frac{dh}{dr} = -\frac{2r + h}{r} \]
Step 3: Differentiate the volume.
$V = \pi r^2 h$, so by the product rule
\[ \frac{dV}{dr} = 2\pi r h + \pi r^2 \frac{dh}{dr} \]
Substitute $\frac{dh}{dr}$ from Step 2.
\[ \frac{dV}{dr} = 2\pi r h - \pi r (2r + h) = \pi r h - 2\pi r^2 = \pi r (h - 2r) \]
Step 4: Find the critical point.
Because $\pi r \ne 0$, the derivative is zero only when $h - 2r = 0$, so $h = 2r$.
Step 5: Decide whether it is a maximum.
Look at the sign of $\frac{dV}{dr} = \pi r (h - 2r)$. When $r$ is a little smaller than the critical value, the cylinder is tall and thin, so $h > 2r$ and $\frac{dV}{dr} > 0$. When $r$ is a little larger, the cylinder is short and wide, so $h < 2r$ and $\frac{dV}{dr} < 0$. The sign changes from positive to negative, so $V$ has a maximum at $h = 2r$.
Step 6: Interpret the result.
The diameter of the base is $d = 2r$. At the maximum volume $h = 2r = d$.
Final Answer:
For a given surface area, the cylinder of maximum volume has height equal to the diameter of its base.
\[ \boxed{h = 2r = \text{diameter of the base}} \]