Answer
$x=40$ and $p(40)=4$ dollars.
Work Step by Step
Step 1. With the given law $p=[3-\frac{x}{40}]^2$, we have the total revenue as $r(x)=xp=x[3-\frac{x}{40}]^2$ dollars.
Step 2. Take the derivative to get $\frac{dr}{dx}=[3-\frac{x}{40}]^2+2x[3-\frac{x}{40}](-\frac{1}{40})=[3-\frac{x}{40}][3-\frac{x}{40}-\frac{x}{20}]=[3-\frac{x}{40}][3-\frac{3x}{40}]=3[3-\frac{x}{40}][1-\frac{x}{40}]$
Step 3. Letting $\frac{dr}{dx}=0$, we get $x=40$ and $x=120\gt60$. Discard the second one as it exceeds the limit.
Step 4. Thus, we have $x=40$ and $p(40)=4$ dollars.