Concept:
For a cone,
\[
V=\frac13\pi r^2h
\]
and the slant height \(l\), radius \(r\), and height \(h\) satisfy
\[
l^2=r^2+h^2.
\]
Use the given slant height to express the volume in one variable and then maximize it.
Step 1: Use the relation between \(r\), \(h\), and slant height.
Given
\[
l=3.
\]
Therefore,
\[
r^2+h^2=9.
\]
\[
r^2=9-h^2.
\]
Step 2: Express volume as a function of \(h\).
\[
V
=
\frac13\pi r^2h.
\]
Substituting
\[
r^2=9-h^2,
\]
\[
V(h)
=
\frac{\pi}{3}(9h-h^3).
\]
Step 3: Differentiate and find the critical point.
\[
\frac{dV}{dh}
=
\frac{\pi}{3}(9-3h^2).
\]
For maximum volume,
\[
\frac{dV}{dh}=0.
\]
\[
9-3h^2=0.
\]
\[
h^2=3.
\]
\[
h=\sqrt3.
\]
Step 4: Verify maximum value.
\[
\frac{d^2V}{dh^2}
=
\frac{\pi}{3}(-6h).
\]
At
\[
h=\sqrt3,
\]
\[
\frac{d^2V}{dh^2}\lt 0,
\]
hence the volume is maximum.
Step 5: Find the maximum volume.
\[
r^2
=
9-3
=
6.
\]
Therefore,
\[
V_{\max}
=
\frac13\pi(6)(\sqrt3).
\]
\[
=
2\sqrt3\,\pi.
\]
Hence,
\[
\boxed{V_{\max}=2\sqrt3\,\pi}
\]
\[
\boxed{\text{Answer = (D)}}
\]