Step 1: Write the volume of the solid.
The solid consists of a cylinder and a hemisphere.
\[ V = \text{Volume of cylinder}+\text{Volume of hemisphere}. \]
Step 2: Use volume formulas.
Radius of both cylinder and hemisphere is \(x\).
Height of cylinder is:
\[ 20-4x. \]
So,
\[ V=\pi x^2(20-4x)+\frac{2}{3}\pi x^3. \]
Step 3: Simplify the volume.
\[ V=20\pi x^2-4\pi x^3+\frac{2}{3}\pi x^3. \]
\[ V=20\pi x^2-\frac{10}{3}\pi x^3. \]
Step 4: Compare with given form.
Given:
\[ V=\frac{1}{3}\pi y. \]
Therefore:
\[ \frac{1}{3}\pi y=20\pi x^2-\frac{10}{3}\pi x^3. \]
Multiplying both sides by \(\frac{3}{\pi}\), we get:
\[ y=60x^2-10x^3. \]
Step 5: Differentiate \(y\) with respect to \(x\).
\[ \frac{dy}{dx}=120x-30x^2. \]
\[ \frac{dy}{dx}=30x(4-x). \]
Step 6: Find critical points.
For maximum or minimum:
\[ \frac{dy}{dx}=0. \]
\[ 30x(4-x)=0. \]
So,
\[ x=0 \quad \text{or} \quad x=4. \]
Since \(x=0\) gives zero volume, we take:
\[ x=4. \]
Step 7: Verify maximum using second derivative.
\[ \frac{d^2y}{dx^2}=120-60x. \]
At \(x=4\):
\[ \frac{d^2y}{dx^2}=120-240=-120<0. \]
Hence, \(y\) is maximum at \(x=4\).
Step 8: Find maximum value of \(y\).
\[ y=60x^2-10x^3. \]
Substitute \(x=4\):
\[ y=60(4)^2-10(4)^3. \]
\[ y=60(16)-10(64). \]
\[ y=960-640=320. \]
Final Answer:
\[ \boxed{320} \]