Help trucker Rich measure his gas

If you choose to ignore what I have said, you might leave this driver, who came to Tom and Ray for help, stranded on the side of the road. Taking a chance of doing so out of intellectual laziness wouldn't be very nice.
No, if I choose to ignore you, I won't be doing anything other than that. Perhaps you didn't notice, but in the question posed here by Tom and Ray, they refer to it as a "MATH CONUNDRUM." Accordingly, many here (myself included), have chosen to come at this problem as a mathematical one. If this driver gets stranded because he thinks he can run the tanks until they're completely empty, that's his own problem, and perhaps some lessons need to be learned the hard way.

If you want to come at this from a very simple and practical problem - I assume the driver knows what his normal fuel economy is. I’m also sure that the operator’s manual for his vehicle tells the fuel capacity. He could do what I do (the fuel gauge in my car stopped working a while ago) - reset the trip odometer when I fill up and watch how many miles I put on it.

See attached.
5.971051451"
14.1584623"

I’m 10 (using my Dad’s account), and have no idea what integral calculus even is, so here’s my answer: First, fill both tanks until they’re at 1/4 full ( tank volume divided by 4) and notch the stick at the line of gas. Then, drive around until the tank is empty. Repeat with 1/2, 1,3, 3/4, 2/3, etc.

Take a glass jar and fill it half way. Turn on its side to verify it is half full in profile. Pour out the liquid into a measuring cup. Pour half that volume back into the jar and turn jar on its side. Measure the depth of the liquid in profile.

Calculate the ratio of the depth at quarter full to the full diameter of the jar. Apply this same ratio to the depth of Rich’s full tank and you have the answer for a quarter tank.

Perhaps you didn’t notice, but in the question posed here by Tom and Ray, they refer to it as a “MATH CONUNDRUM.”

I don’t care if it’s a math conundrum or not. Ignoring factors that affect the answer will lead to an incorrect answer, and “trucker Rich” deserves to know you (and this includes Tom and Ray, who, by their own admission, know nothing about semis), have chosen to ignore a factor that could leave to a miscalculation of the amount of remaining usable fuel.

By the way, knowing the amount of unusable fuel each tank holds won’t stop you from solving this problem mathematically. If anything, it will help you arrive at the CORRECT answer instead of an incorrect answer, which is what I thought we all wanted. Evidently, you just want to solve the math problem and don’t care about actually solving this driver’s issue. I think both can be done, but in order to correctly apply the math, you can’t ignore such important factors.

I know you don’t like having one more factor thrown into your hypothetical question, but if you want a useful answer, this factor shouldn’t be ignored.

Here is the solution in terms of dimensionless measurements. Let f be the fraction of the horizontal cylinderical tank’s inner volume that is occupied by fuel. Let x be the fraction of the diameter of the tank that the top level of the fuel is from bottom of the tank. (So x would be the fraction of the 20 inches on the measuring stick that the fuel reaches, neglecting meniscus and capillary wetting effects on the wooden stick.) The relationship between x and f when solved for f in terms of x is easily obtained from doing a little integral calculus. It is:

f = 1/2 - (1/[pi])(arcsin(1-2x) + 2*(1-2*x)sqrt(x(1-x))).

Note that this equation possesses the correct up-down symmetry for the problem by being invariant under the transformation: x --> 1-x and f --> 1-f.

But the problem Rich asked about actually entails inverting this functional relationship to give x in terms of f rather than f in terms of x because he want to know where on the stick to place his graduation marks. This is a tougher problem as the equation is trancendental and not explicitly algebraically solvable as a closed form formula for x in terms of f. But the equation can be written in an implicit form that is easily iterated by fixed-point iteration that converges to the correct value of x. The equation is convertable to this iteratible fixed-point version:

x = sin^2([pi]f/2 + (1-2x)sqrt(x(1-x)))

To find the correct value for x for a given value of f we start with a starting guess/approximation of x_0 = f for whatever f-value we want the corresponding x-value for. Then we then iterate on the fixed point equation:

x_(n+1) = sin^2([pi]f/2 + (1-2x_n)sqrt(x_n(1-x_n)))

to get the next x-value. We then increment our iteration count n : n --> n+1 and iterate again and again until our values for x_n don’t differ from x_(n+1) by any significant amount. The last x-value we get when we quit iterating is our calculated value for x.

In the special case that Rich asked about he specifically wanted to find the height on the stick for when the tank was 1/4 full (and also 3/4 full). This means we set f = 1/4 and therefore iterate on:

x_(n+1) = sin^2([pi]/8 + (1-2*x_n)sqrt(x_n(1-x_n)))

This iteration converges to x = 0.29801362335 (according to my TI-30 solar calculator). Since Rich said that his tank’s diameter is 20 inches we multiply this x-value by that 20 inch diameter (D = 20 in) to get the height, h on the stick, i.e. h = x*D. The result is h = 5.9602724670 inches. By symmetery the x for the 3/4 full mark is 1-x using the 1/4 full x-value (i.e. the 3/4 full x-value is x = 0.70198637665 = 1 - 0.29801362335) and, thus, the h-value for the 3/4 full mark is (20 - 5.9602724670) in = 14.039727533 in up from the bottom of the stick. So placing the 1/4 and 3/4 full marks at 5.96 in and 14.04 in respectively ought to be plenty accurate enough for Rich’s purposes.

But I think Rich mentioned that his stick was wooden. Now I expect that if the stick was made of unfinished wood the low surface tension of the diesel fuel would wet the wood on the stick to such an extent that capillary action along the grain of the wood’s fibers would lift the fuel along the stick a bit and cause the stick to give a falsely fuller reading for the fuel’s level in the tank. So, to prevent this possibility from happening I would recommend that Rich paint his measuring stick with a good epoxy paint that is impervious to diesel fuel. This would cause the stick to read the actual height of fuel in the tank.

Another improvement that Rich could make is to round out or sharpen the bottom of his measuring stick with a radius of curvature no greater than 10 inches. This would allow the stick to properly seat itself on the bottom of the tank and not ride higher up due to the concave curved bottom surface of the tank touching a horizontally flattened stick bottom.

Also, another correction that could be made is for Rich to calculate the Archimedean level increase of the fuel in the tank that takes place because the presence of the stick displaces an amount of fuel equal to the submerged portion of the stick. But I can’t calculate that correction ahead of time until I know more of the dimensions of the problem. In particular, to make this last correction we need to know the inner horizontal length of the cylinderical fuel tank, and we need to know the horizontal cross-sectional area of the stick as it is placed vertically into the tank, and (as mentioned before) we need to know a bit more about the shape of the bottom of the stick as it contacts the curved bottom of the tank. But if the tank is sufficiently big and the cross section of the stick is sufficiently small we can expect that this latter correction would be insignificant for any practical purpose that Rich may have.

I like the geometric solution, too, although I was eager to apply some integral calculus for old time’s sake. Having integrated the little devil I was still stuck with an equation that I don’t know any way to solve: it involved polynomials and inverse tan. So I used a graphing calculator – intersection of two function graphs – and came up with the same 5.96" for the depth of the quarter full tank.

Here is what I would recommend. It is not exactly what he asked for, but I think it will accomplish the task BETTER than giving him a mark on the stick at 1/4 full. First, run the tank all the way down so that there is no more usable fuel. Then, next time you fill up, put in 5 gallons at a time (of USABLE fuel) and put a notch on the stick for 5 gal. then add 5 more gallons, measure with the stick, and put a notch for 10 gal. Keep this up for the bottom half of the tank depth. I think this would actually be more useful. To be able to poke in the stick and know that you have say “15 gallons of usable fuel in the tank.”

Full Tank = 20"

Full Tank = 20"
3/4 Tank = 14.1425"
1/2 Tank = 10"
1/4 Tank = 5.8575"

I used the Pythagorean Theorem.

Here is how I figured it out.

  1. Find the largest square that fits in the 20" circle about 14".

  2. find both the square and the circles square areas.

  3. subtract the squares square area from the circle square area

  4. divide that number by 4 to come up with the area below the square

  5. convert that to percent which is 9% of the area below the square

  6. 20-14=6 / 2 = 3" so 3" to the bottom is 9% of the volume

  7. instead of measuring up a full inch measure across the circle 1/2 inch above the 3" mark this will average the sectors. Convert that to the total percent about 4.5% of area at 4" mark
    Repeat the process measure 1 1/2 inches above the 3" mark about 5% of total area at 5" mark

Repeat again at the 2.5" mark above the 3" line About 6% total area at 6" mark

3" = 9"%
4" = 13%
5" = 18%
6" = 24%

You obviously have a background in math. I however do not. But I applied the pythagorean theorem to try to solve the problem since you have the two sides of a right angle triangle with a 10" radius given. My answer was very close to yours in the end.

You’re right. I did wonder how to handle the x^2 term inside the squareroot. It needs to be integrated as well. I am due a calculus review.

I should have started with the equation (sin x)^2 + (cos x)^2 = r^2 = 1.
Thank you for pointing this out. That would lead to the identity that you used.

The answer is not calculus. If he knows total tank volume - fill until he gets to the 1/2 way point (10") as measured by dipstick. Then add 1/2 the remainder to give it a 3/4 tank full. Now you have the answer for 1/4 tank, aka 20" - inches at 3/4 = 1/4. He could also run a tank nearly or totally dry. - then knowing the total tank volume, simply add 1/4, measure, etc. Too bad this last option sucks all the sludge into the injectors. - replace filters, be done.

Thanks guys - PS the the lady with 8 kids obviously has a stud - but equipping any vehicle with studs does help.

Cheers
fw

Geeze Larry, are you really that dumb? Both tanks on a semi are joined so they function as a single tank. Trying to run one tank dry would leave you stranded, and boy, would you feel stupid when that happens!

The mathematical problem is ill-defined as explained in the next paragraph.

In addition to (probably relatively insignificant) errors already discussed regarding fuel tank end cap shape, volume of the dipstick, meniscus, and the difference between total fuel and useable fuel, there are issues that relate to internal baffles and drain/sender/filler/return hardware. Of much more significance is the fact that the mathematical solutions given so far have ignored the fact that most tanks (see trucker.com) have a filler cap that is not at the very top of the tank. This is one reason why there is not liquid fuel in a rather large space at the top of the tank even when it is ?full.? There is also an issue regarding whether or not the dipstick is inserted vertically because in this position it usually will not reach the bottom of the tank. Thus the mathematical problem is ill-defined because we don?t know the position of the filler cap or the angle of the dipstick.

The practical or semi-practical methods that add measured amounts of fuel to the tank avoid these problems. However, a number of us obviously enjoyed solving the mathematical cylinder problem even though it is only very loosely related to the actual physical problem. Thanks for bringing it to us.

As a preface, this is how I calibrated the dowel for the Diesel tank in the keel of my Sailboat. It is more irregularly shaped than a cylinder, since the walls of the tank take many turns.

Let’s say the capacity of the full tank is 200 gallons. Completely empty one of the diesel tanks. We know that when the tank is 1/4 full, it should have 50 gallons in it, since 200/4= 50. So, drive the truck to the fuel pump and pump exactly 50 gallons of diesel into the tank. Then insert the dowel into the tank. Put a notch on the dowel where it changes from wet to dry. Then pump 100 more gallons into the tank. The tank is now 3/4 full (150 gallons), insert the dowel and notch the appropriate spot. There, you’re done.

The only way this would be incorrect, is if the pump is calibrated incorrectly. But that’s a case for the Dept. of Weights and Measures to investigate.

This should work for any shape of tank. With fiberglass tanks, there are some very unusually shaped tanks and a mathematical solution would be unbelievably time consuming for these tanks.

Rich should mark his stick at 5.95 inches for 1/4 of a tank.

As was pointed out in the show, this is really a 2D problem. The area of the circle we’d want to look at is 100pi, so the tank is one quarter full at an area of 25pi (which would correspond to a volume of 25pi(h)).

If you look at the first drawing, you will see two radii, each extending to the top of the gas sitting in the tank. The goal is to find the height of the gas. To do so, we fist need to find that angle, x. We know that the area of a sector is .5®^2(theta), with theta being the central angle, so for us, the area of the sector is .5(10)^2(x)=50x. The area of a triangle is .5ab(sin(gamma)), gamma being the angle between sides a and b, so in the second figure the area of the triangle is .5(10)(10)sinx=50sinx.

So, just by looking at it we know that the area of the sector has to equal the sum of the area of the triangle and the area of the gas in the gas tank. We get the equation 50x=25pi+50sinx. Using a graphing utility, in radians, we find that x is 2.309.

Finally, we know that the height of the gas is the difference between a radius, 10, and the height of our triangle. The other two angles in our triangle are equal (since their opposite sides are equal), so the measurement of each of those is (2pi-2.309)/2. Using the sine ratio, we get the equation 10-10(sin((2pi-2.309)/2))=h, so h =5.95inches

Richard,
Grab an old peanut butter jar or some other jar from the floor of your truck. Fill it 1/4 full with water, or whatever. Screw the cap on and lay it on its side. Now measure the diameter of the jar, and how far up the water goes. Let’s say that’s a 3" jar and the water goes up 1". Put 1 over 3 you get 1/3. Now go measure the diameter of your fuel tank. 20" you say. multiply 1/3 x 20" = 6.67" That’s how much gas is in the tank when it’s 1/4 full, At 16.67" it’s 3/4 full

I’m not sure exactly how that came up wrong, but the resulting number is too high. The formula for calculating the area of a segment involves the central angle intersecting the arc. For an area that is 1/4 of the circle the chord/arc intersects a central angle of 132.34 degrees. This can be used to derive a simple formula that any trucker can use to determine the 1/4 capacity liquid depth of any size horizontal cylinder. With wet dowel depth D and central angle C, D equals radius minus sin(90-C/2). A wet dowel height of (0.6)(radius) indicates 1/4 tank of fuel.

Actually, on rereading the white board, I see that I had misread your brother’s .403 as .703. In fact, our solutions agree.