3

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.

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

  • 1
    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
  • @G-man: Thanks. I had a glance at the linked page but didn't see dates, then some time later started to wonder when (seemingly) the same question got asked again. (Separately, I do appreciate your checking, but it's the OP's responsibility to make this type of issue clear.) – Andrew D. Hwang Jan 17 '16 at 16:19
  • @apoorvasomani Is the edit ok? I had put in constant slant length. If not ok, feel free to change or delete. – Narasimham Jan 17 '16 at 20:26

2 Answers2

1

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$

0

If the constant slant height and base radius are $s, r$ respectively and the variable angle which the slanting face makes with the vertical is $\theta$ then the height and top radius of the frustum are $$h=s\cos\theta, R=r+s\sin\theta$$

The volume of the frustum is $$V=\frac13 \pi h (R^2+Rr+r^2)$$ Now $$\frac{dh}{d\theta}=-s\sin\theta, \frac{dR}{d\theta}=s\cos\theta$$ Volume is maximum when $$\frac{dV}{d\theta}=\frac13 \pi [\frac{dh}{d\theta}(R^2+Rr+r^2)+h(2R\frac{dR}{d\theta}+r\frac{dR}{d\theta})=0$$ $$-s\sin\theta (R^2+Rr+r^2)+s\cos\theta(2Rs\cos\theta+rs\cos\theta)=0$$ $$-s\sin\theta (3r^2+3rs\sin\theta+s^2\sin^2\theta)+s^2(1-\sin^2\theta)(3r+2s\sin\theta)=0$$ $$- (3r^2\sin\theta+3rs\sin^2\theta+s^2\sin^3\theta)+(3rs+2s^2\sin\theta-3rs\sin^2\theta-2s^2\sin^3\theta)=0$$ $$3x+(2-3x^2)y-6xy^2-3y^3=0$$ where $x=r/s$ and $y=\sin\theta$.

In general the cubic equation will have to be solved numerically. In the special case $s=r$ so that $x=1$ we have $3-y-6y^2-3y^3=0$. The only real root is $y=\sin\theta\approx 0.56298, \cos\theta\approx 0.82647$. Then the maximum volume is $V\approx 4.33$ as found in the link. Whereas for the cylinder $V=\pi\approx 3.14$.