# Which Has a Larger Volume a Cylinder or a Truncated Cone?

The following link describes a programming problem. However, I am unable to work out the maths for the problem.

We are given $r$ – radius of lower base and $s$ – slant height. The figure can be cylinder or truncated cone. You have to find as largest volume as possible to carry oil respect to given information.

You are given two numbers that less than 100: radius $r$ of lower base and slant height $s$. The slant height is the shortest possible distance between the edges of two bases.

EDIT suggested :

Given $\sqrt{(R-r)^2 + h^2 }$ and $r,$ find $h/r$ ratio.

$~~~~~~~~~~~~~~~~$

• Seems like a simple optimization problem. But you should include the problem in the body of your post because link-only posts are frowned upon in this community. – najayaz Jan 17 '16 at 13:41
• Could you please say more about where you can't make progress? Do you know how to find the volume of a cylinder/truncated cone given appropriate dimensions? Can you calculate those dimensions in terms of the information given in the question? – Andrew D. Hwang Jan 17 '16 at 14:23
• The problem here is that the area of the truncated cone requires 2 values for radius but only one value is given. The resulting volume will have those 2 variables whereas in the case of a cylinder, you have 1 value only. I guess you have to use the fact that the upper circle in the cone is smaller than the lower circle and build an inequality. However, it would look complex. – NoChance Jan 17 '16 at 14:33
• @apoorvasomani: Could you please clarify whether this contest problem is still "live"? – Andrew D. Hwang Jan 17 '16 at 16:12
• @AndrewD.Hwang the site says the competition was from Nov 24, 2013, 11:00:02 AM to Nov 24, 2013, 4:00:02 PM – najayaz Jan 17 '16 at 16:14

See on comparing volume we get to see that volume of cylinder $<$ volume of truncated cone as $r^2<(r^2+R^2-rR)$. Thus from here you can setup equations and differentiate it with radius and then put it to be $0$ for maxima and the condition for maxima is $f''(x)<0$