Inscribe in a given cone, the height of which is equal to the radius of the base, a cylinder whose volume is a maximum.
I'm stuck. The answer key says the cylinder's height should be $\frac23$ the radius of the base of the cone, but the answer I'm getting is $\frac13$.
The volume of a cylinder is $\pi r^2h$, where $h$ is the height and $r$ is the radius of its base. Since the inscribing cone in this example has height equal to the radius of its own base, we know by similar triangles that any unit of height "added" to the cylinder is "taken" from the the radius of its base. Therefore, the volume $V$ of the inscribed cylinder is $$ \pi h(r-h)^2,$$ where $r$ is the radius of the cone and $h$ is the height of the inscribed cylinder. By the product rule,
$$\frac{dV}{dh} = \pi(r-h)^2 - 2\pi h(r-h).$$
Setting $\frac{dV}{dh}$ equal to 0, we get
$$0 = \pi(r-h)^2 - 2\pi h(r-h)$$ $$2\pi h(r-h) = \pi(r-h)^2$$ $$2h = r - h$$ $$h = \frac13r.$$
Please help!