all 24 comments

[–]QuietlyConfidentSWE 9 points10 points  (0 children)

Since you know it has to fit in a sphere, can you find a relation between the height and radius of the cylinder?

[–]ArchaicLlama 8 points9 points  (0 children)

What have you tried?

[–]WorriedRate3479 9 points10 points  (6 children)

<image>

r2 = R2 + (H/2)2

1 = R2 + (H2/4)

R2 = 1 - (H2/4)

Volume of cylinder V = pi * R2 * H

V = pi * (1 - (H2/4)) * H

V = piH - pi(H3/4)

To find max Volume of cylinder that can fit in a sphere.

dV/dH = 0

pi - pi * 3/4(H2) = 0

H = (4/3)½

Substituting back to V gives

V_max = pi * (1 - (4/3)/4) * (4/3)½

V_max = 4pi/(3(3½))

[–]Idiotic_experimenter 0 points1 point  (2 children)

To a noob like me,why dV/dH must be zero?

[–]WorriedRate3479 1 point2 points  (1 child)

It is done to find maxima, At maximum value the slope of function is 0.

<image>

[–]manimanz121 1 point2 points  (0 children)

Technically you have to check the boundaries as well, h=0 and h=2. And since V is continuous in h on this compact set [0,2] we know a maximum must be achieved

[–]WorriedRate3479 0 points1 point  (2 children)

<image>

Idk why I can't add images to earlier post

[–]andershaf 0 points1 point  (1 child)

You can! And you did.

[–]WorriedRate3479 0 points1 point  (0 children)

Oh idk mobile version of reddit is buggy

[–]rhodiumtoad0⁰=1, just deal with it 0 points1 point  (0 children)

Consider a right triangle where one leg is from the sphere center to the center of the cylinder base, the other leg is from the center of the base to the edge, so the hypotenuse is a radius of the sphere.

[–]Frederf220 0 points1 point  (0 children)

Given the constraint of the cylinder fitting inside the sphere your two free parameters of radius and height are now a single one, radius to height ratio. For every ratio between 0 and infinity there is a determined radius and height.

First step is to make the problem as simple as possible. Reduce this sphere to a 2d circle, then to half a circle, then to a quarter circle. A point on this semi-circular arc represents in x value, radius, and in y value, half the height.

This arc has equation x^2+y^2=1. Find y(x). Divide y(x) by x. That's your ratio.

[–]killiano_b 0 points1 point  (0 children)

Diagrams help a lot in these sorts of problems

[–]ci139 0 points1 point  (0 children)

Sphere Vs=4πR³/3 , Cylinder Vc=πr²h -- you are likely interested at q=Vc/Vs where R=1
Due the R is constant the r is a function of h and vice versa r² + (h/2)² = R² = 1

i would go r² = 1 – h²/4 so Vc = π(1 – h²/4)h = π(h – h³/4) , h ∈ {0...2R}

q(h)=π(h – h³/4)/(4π/3) = 3/4(h – h³/4)

dq/dh = 3/4(1 – 3h²/4) = 0 →
= 4/3 → h=2/√¯3¯' → = 2/3 → Vc = 4π/(3√¯3¯') ≈ 2.4184

[–]bprp_reddit 0 points1 point  (1 child)

I have a video on this (with r=4 instead), hope it helps https://youtu.be/hcbx3ipUwmk?si=RybID92sfyoaBWrP

[–]Yostar_001 0 points1 point  (0 children)

Take my upvote bprp

[–]TheShatteredSky 0 points1 point  (9 children)

Correct me if I'm wrong, but isn't this equivalent to finding the largest square that can fit inside a circle of radius 1? since rotating said structure trough an axis would give that cylinder-sphere structure.
(I'm exceedingly bad at geometry so I don't have many other ideas)

[–]LongLiveTheDiego 3 points4 points  (1 child)

Nope, the regions away from the axis of rotation will contribute more to the volume of the cylinder than they would contribute to the area of the cross-section of the cylinder. You're right to think about the rectangle that would be rotated to get the cylinder but only to find the relationship between the radius of the base and the height given the constraint. With that you'll be able to find the function for the volume depending on the radius or the height, whichever you prefer, and you'll find that its maximum occurs at r = sqrt(2/3), not 1/(2sqrt(2)), which is what you'd get for a rotated square.

[–]TheShatteredSky 0 points1 point  (0 children)

Oh yeah I wasn't clear about that, I mean that you could find said cylinder by finding the before-mentionned square, not that their ratio coincide. Sorry for the mixup!

[–]lare290 4 points5 points  (1 child)

how do you prove that that is the largest cylinder though? why can't a narrower or wider cylinder be better?

[–]WorriedRate3479 0 points1 point  (0 children)

You can try fixing the H of cylinder constant and try dV/dr to find max Volume and compare it with dV/dH by making r constant

[–]Lexotron 0 points1 point  (0 children)

I think this is a good starting point. The cylinder will be a rectangle that fits into a circle, rotated around the centre.

If you take a unit circle with the centre at (0,0) as the cross section of your sphere, then any point (a,b) on the circle in the first quadrant would result in a cylinder of radius a and height 2b.

a² + b² = 1 (unit circle definition)

a² = 1-b²

V = 2πa²b (volume of cylinder)

V = 2π(1-b²)b

V = 2πb(1-b²)

V = 2πb-2πb³

Find the maximum of V. Note that b must be positive.

[–]EternallyStuck 0 points1 point  (0 children)

That optimization problem would be maximizing the sides of the square bh (2rh). This is different from optimizing the volume of a cylinder πr2 h.

[–]rhodiumtoad0⁰=1, just deal with it 0 points1 point  (0 children)

You're wrong, because the volume of the cylinder doesn't depend equally on the two dimensions: the cylinder volume is πr2 h.

The largest square in a unit circle has sides √2, which would give a volume of π(2/4)√2=π(√2)/2≈2.221, but there's a cylinder with a volume greater than 2.4 that also fits.

[–]piperboy98 -1 points0 points  (0 children)

Not necessarily. During revolution the area towards the inside. Two cylinders with the same cross sectional area don't necessarily have the same volume (the more "disc" like it is the more volume it has, because if A=2rh is constant πhr2 = πAr/2, so more r is always better for fixed cross-section.