system
Given the following post, respond as if you're commenting on Reddit:
human
Does the 3 dimensional shape created when one end of a cylinder is pinched have a name? If so, what is it, and what is the formula for it's volume?

As the title suggests, I have a cylinder that I pinch the end to flatten it, much like a toothpaste tube. Does this shape have a name, and can it's volume be determined based on length and diameter?
gpt
I don't know if that shape has a name.  However, shapes whose volume formula is unknown can have it calculated by integrating over the volume of the shape.  All that's required is knowing equations that describe the boundaries of that shape.  It's worth mentioning that this is how the volume equations of shapes you're familiar with are generally derived.  The following may be a bit confusing if you don't know calculus.  In case you don't, the basic principle of integrating a function is that you add the infinitesimally small heights under a curve to get an area, or the areas under a curve to get a volume.

I'll use the xy plane for the cross section, with the flat surface along x, and z for the length dimension of the shape, and assume that the rate of flattening is linear, and that it tapers to a point.  The easiest way to integrate it, it seems to me, is to break it up into triangles in the yz plane, and integrate along z.

I'll use r as the radius at the un-squished end, and L as the length.  I'll also put the center of the un-squished cross-section at the origin.  Now, on the xy plane, a y coordinate along the boundary can be expressed as y=sqrt(r^2 - x^2 ).  If the squishing of the shape is linear, the yz sections will be triangles with height 2 * sqrt(r^2 - x^2 ) and length L.  The area of each will be L * sqrt(r^2 - x^2 ).  A brief sanity check shows that the areas are 0 at x=r, where the height tapers from zero to zero.

By integrating these areas along x the volume can be determined.  The integral in question is the integral of L * sqrt(r^2 - x^2 ) with respect to x as x goes from -r to r, which is equal to V.

This integral isn't terribly easy to solve, but there's a way around actually doing it out.  By inspection, sqrt(r^2 - x^2) is just the y coordinate of a circle.  The integral of this from -r to r should just be the area of a semicircle, pi * r^2 /2.  And plugging the definite integral into wolframalpha, it is!

Plugging that back in and cancelling the 2, V = 1/2 * L * pi * r^2, or half the area of a cylinder.  And intuitively, that makes sense--each cross-section of it is a triangle with the same base and height as full rectangle.  And that shape made of rectangles is a cylinder.  So the volume will be half that.

An important practical note is that squishing a real-life cylinder will result in something significantly different, because just squishing the end won't produce a constant taper throughout the cylinder.

tl;dr it can be determined by summing all the arbitrarily thin cross-sectional volumes of the shape, each of which is an area times an arbitrarily small increment in the direction we're slicing.  By doing out this calculus, the area is A = 1/2 * L * pi * r^2 , or half the volume of a cylinder.  This makes sense when you think about how a cylinder and this shape differ.