On the 14 September 2020 episode of
Car Talk
, Tom and Ray posed the following puzzler. (A transcript, available
here
, is well worth reading). I like this puzzler because the proposed answer, though incorrect, has a certain playful appeal. It also gives an excuse to play with Integrate, Region, and ProbabilityDistribution.
The fuel tank of a truck has the shape of a cylinder on it’s side, with a filler hole on top. When the tank is half full of fuel, a broomstick inserted through the filler opening will be marked at half the tanks’s diameter. Where is the stick marked when the tank is 1/4 full?
The proposed answer involves a circular cardboard disk, as typically found under a pizza. The circular disk is sliced precisely in half, and the point where the half-disk balances on a pencil point is found. This point is said to indicate the fuel level when the tank is 1/4 full.
This figure will help clarify ideas and notation.
Plot[{1-Sqrt[1-
2
x
],​​Callout[If[1-Sqrt[1-
2
x
]<0.45,0.45,None],"Fuel Level h",Scaled[0.2]]},{x,-1,1},​​Epilog{Text["Area Beneath\nChord (ABC)",{0.3,0.3}]},​​Filling{1{2}},​​ImageSize400,​​FrameTrue,​​FrameLabel{x,Rotate[y,-π/2]},​​PlotLabel"Cross section of fuel in a cylindrical tank (partial view)\n\t Blue curve is y=1-Sqrt[1-x^2]"​​]
Out[]=
The figure represents half the fuel tank along with some fuel; clearly, a stick inserted vertically through the filler cap will be wetted to a level
h
. The shaded two-dimensional area serves as a proxy for fuel volume, and we’ll attempt to reduce verbiage by referring to it as the Area Beneath Chord, or ABC. Our unit circle has total area
π
2
r
=π
, and so
ABC=π
when
h=2
,
ABC=π/2
when
h=1
, etc. The challenge is to find
h
that makes
ABC=π/4
.
The point along
x=0
on which a cardboard semicircle will balance is proposed as the correct value of
h
. This is plausible: after all, a cardboard shape balanced on a point has “equal stuff” all around, right? Unfortunately, what’s equal is the torques, and not necessarily the masses (though this approach would work for a rectangular tank). A remedy is possible with a balance scale: the cardboard can be sliced along a candidate fuel level, and the problem is solved when the two pieces put the scale in equilibrium. The only disadvantage is that trial and error, and perhaps a lot of cardboard, is required.
Fortunately, cardboard-free solutions are possible.

A Solution using Integrate

Our fuel tank is represented by a unit circle centered at (0,1). We’ll need
x
as a function of
y
for Integrate, and again below in ProbabilityDistribution.
Solve[
2
x
+
2
(y-1)
1,x]
Out[]=
x-
2y-
2
y
,x
2y-
2
y

The amount of fuel in the tank is related to
h
as follows.
Clear[abc];​​abc=Integrate[1,{y,0,h},{x,-Sqrt[2y-
2
y
],Sqrt[2y-
2
y
]},Assumptions0<h<2]
Out[]=
-
(2-h)h
+
-(-2+h)
3
h
+2ArcSin
h
2

This plot shows how ABC goes from 0 to π as
h
goes from 0 to 2.
Plot[abc,{h,0,2},​​FrameTrue,​​FrameLabel{"h","ABC"},​​PlotLabel"Area Beneath Chord as a function of h"]
Out[]=
It turns out that Solve can express
h
as a Root.
Solve[abcπ/4,h,Reals];​​{%,N@%}//Flatten
Out[]=
h
0.596
…
,h0.596027
This result passes a basic dummy check.
Column[{π/4,abc/.First[%7]}//N[#,24]&]
Out[]=
0.785398163397448309615661
0.785398163397448309615661
The point
p
about which the semicircle of cardboard will balance is slightly less than
h
.
Equal​​Integrate(p-y)
2y-
2
y
,{y,0,p},Assumptions0<p<1,​​Integrate(y-p)
2y-
2
y
,{y,p,1},Assumptions0<p<1;​​Solve[%,p];​​{%,N@%}//Flatten
Out[]=
p
-4+3π
3π
,p0.575587

A Solution using Region, Area, and RegionCentroid

These results can be checked with RegionCentroid and RegionMeasure.
As expected, RegionCentroid gives the
p
we found above.
{Region[#],RegionCentroid[#]}&@ImplicitRegion[
2
x
+
2
(y-1)
<1&&y<1,{x,y}]
Out[]=

,0,
-4+3π
3π

I’ve had no luck finding
h
using Area or RegionMeasure with Solve, NSolve, or FindRoot. It seems that Solve cannot “see inside” ImplicitRegion, though a little voice inside my head says I may be overlooking something…
Solve[​​RegionMeasure[ImplicitRegion[
2
x
+
2
(-1+y)
<1&&y<h,{x,y}]]π4,h,Reals]
Out[]=
{}
The following is a bit clunky, but at least it gives an
h
close to what we found above.
areaInterpolation=Interpolation[​​Table[{h,RegionMeasure[ImplicitRegion[
2
x
+
2
(y-1)
<1&&y<h,{x,y}]]},{h,0,1,0.01}]];​​FindRoot[areaInterpolation[h]π/4,{h,0.5}];​​{%,(h/.First[%7])-(h/.%)}//Flatten
Out[]=
{h0.596027,-1.46245×
-9
10
}

A Solution using Mean and Median

Mean and Median give the
h
and
p
found above, and do so with the most concise, and perhaps most transparent, code. Here mass is represented as probability, with mean and median summarizing the PDF as discussed above.
ProbabilityDistribution"PDF",
2y-
2
y
,{y,0,1},Method"Normalize";​​{Mean[%],Median[%]}
Out[]=

-4+3π
3π
,
0.596
…


A Crazy Thought

It’s been said that every problem-solving mistake is either an error, or a blunder [3]. Though most would--with some justification--disagree, I argue that the mistake discussed here is only an error, and a mild one at that. Any solution to any problem has many facets, and being correct (or not) is sometimes the least interesting of a suggested solution's many personality characteristics.

References

[1] https://en.wikipedia.org/wiki/Car_Talk
[2] https://www.cartalk.com/radio/puzzler/truck-box-and-more-8th-grade-mathematics-0
[3] Householder, Alston S., Principles of Numerical Analysis. Dover Publications, 1981.