Showing posts with label graphs. Show all posts
Showing posts with label graphs. Show all posts

Tuesday, July 31, 2018

House Heating Haranguing

This past week I moved house from the place I'd been staying since I first arrived in Melbourne (which is why it's been a bit quiet around here). The place I moved to has no central heating, so I've been huddled in my room for the past few days (I'm also in the midst of a two-week vacation) with a single brave space heater which is doing its valiant best to warm it up to a livable temperature in here. (“Livable,” for me, a child of the tropics, being at bare minimum 20 °C [68 °F].) This has led to much rumination on my part about how houses in Melbourne seem to be undesigned to handle the normal temperature extremes in the region. It's like houses in Melbourne are built on the perpetually optimistic outlook that every day will be a balmy 20–24 °C (68–75.2 °F). Yet I've already endured weeks of temperatures being in the 5–15 °C (41–59 °F) range, with no end to winter in sight.

For starters, most houses are built out of brick, a novel building material for me as I don't recall ever living in a house so constructed (it's possible that I may have as a kid too young to remember). Having spent several months with it, my observation is that brick seems to retain heat about as well as a sieve does water. (I have a 1500 watt space heater, which can, over the course of hours, infinitesimally raise the temperature in my average-sized bedroom, which simple thermodynamics suggests means that the outgoing heat flux is of the same order of magnitude.) Insulation seems to be a foreign concept, and as mentioned whoever built the house I'm in saw no need for including any sort of central heating system, which just kind of blows my mind.

From talking with a few fellow Americans at CAS from Michigan and Wisconsin and a fellow student from the Netherlands, I gather that they too have noticed this, and that this issue of houses not seemingly being built for the weather is not really a problem at those locations. This has led me to formulate the following graph, based on my own experiences and hear-say from others:

I've personally had experience in the 0–15 °C range.
Basically, for places where it either gets really cold (like, freezing temperatures or below), or doesn't get very cold (like in Hilo, at the 15 °C end), houses are generally constructed in such a way that they can handle those temperatures pretty well. But if it gets cold, but not quite down to freezing, eh, people can just tough it out, amirite? It's not actually freezing yet, what are you complaining for? (Can you tell I get rather bitter and sarcastic when I'm cold?)

I've also (re)discovered that my motivation to get out of bed in the morning is directly and strongly correlated with the temperature outside the covers. I've only been able to directly test this over a moderately small temperature range so far (~11–22 °C), but extrapolating it out to “the house is on fire”-level temperatures I find that I would indeed be extremely motivated to get up, so it checks out.

Anyway, thank God for personal space heaters and all the quilts and blankets people have gifted me with over time (seriously, a blanket is probably one of the best gifts you could give me; I treasure them all). And winter should “only” last another two to three months. I really am quite happy with my new place otherwise—but oh, how I miss Hilo's climate during the winter! A hui hou!

Thursday, January 26, 2017

State of the Blog, 2017

Another year has come and gone, and now that I have that little graph-generating script I used last year to make a plot of my post activity per month, I thought I'd make use of it again (with a few tweaks, what was I thinking stylistically last year‽).


Nothing too surprising here. I got a little boost at the start of 2016 compared to 2015, then gradually dropped back to my usual 2–3 posts per month. While looking at this graph, it struck me that a histogram showing how often each number came up would be interesting, so I quickly added some code to the script to generate one:

Well, I was right that it turned out rather interesting! Peaks at two, seven, and ten, but five and nine are both relatively unpopular numbers—huh. I doubt I'll be reaching the heady heights of fifteen again, but I do hope to keep that solitary, single one from getting any higher. A hui hou!

Saturday, January 16, 2016

Blog Post Plot

Well, here's the graph I promised in my last post. It took so long because I intended to take some features from the graphs I produce at work, but kept forgetting to copy the relevant code for perusal at home. As it turned out I only needed a little bit, and the graph was pretty easy to make once I sat down to do so. Anyway, here it is:

Click for larger version.
It's interesting to see the patterns that emerge. The early high count steadily drops around the middle of 2012, then after a little more variability seems to have settled into a surprisingly consistent alternating series of 2–3–2–3.

I really enjoy making graphs like this, iterating over and over, often dozens or scores of times, to get a graph that's both informative and aesthetically-pleasing (to me, at least). According to my terminal history, I ran the command to generate this graph sixty-two times, though of course a decent number of those time something threw an error and no new version of the graph was produced. And I'm reminded once again just how happy I am to have a job where I get to make interesting and beautiful plots—perhaps I can share some of them in the future.

Thursday, December 25, 2014

The Twelve Days of Christmas: Fun with Algebra

If you're like me, after hearing the song "The Twelve Days of Christmas" for the umpteenth time, you start wondering how all those gifts stack up. How many lords-a-leaping do you end up with at the end, anyway? What do you have the most of? And what's the total?

This problem can be solved by a little bit of math no more complicated than multiplication, but this being my blog I'm going to complicate things unnecessarily for fun. Let's call an arbitrary day of Christmas n (where \(1\leq n \leq12\)). The number of gifts given for the first time on that day is then also n (one partridge in a pear tree on the first day, two turtle doves on the second day, etc.). Then the total number of each gift is simply n times the number of times that gift is given. A little thought shows that this number is simply \(13-n\) (a partridge in a pear tree will end up being given on all twelve days, while the twelve drummers will end up being given only once on the twelfth day).

Putting these facts together, we arrive at a function (I'll call it "g" for "gifts") that will give us the total number of gifts of a particular type received, given a day of Christmas as input. Symbolically:
\[\text{g}(n)=n\cdot(13-n)=-n^2+13n\]This is a simple quadratic equation (a parabola, to be exact); I've marked the locations of integer value inputs in the plot below with annotations to show what each one is.


Looking at this plot, we see that the number of each gift begins at a minimum of twelve, rises to a maximum of forty-two for days 6 & 7, and drops off again to twelve on the twelfth day.

This leaves us with the question of how many total gifts you would receive from all this. Luckily, this is very simple: since the number of gifts is symmetrical after the sixth day, we can simply evaluation the following equation:
\[\text{Total gifts}=2\cdot(12+22+30+36+40+42)=364\]which, I think we can agree, is a whole lot of gifts. A hui hou!

Edit (1/16/2016): Of course, what escaped me at the time is that the song is actually about discrete gifts, not continuous ones, and thus trying to represent it as a continuous function as I did above makes pretty much zero sense.

I'd actually originally planned to do some calculus and integrate under the curve where the gray shaded part is and show how it came out to 364 as well…except it doesn't. I couldn't figure out why at the time and thus just sort of ignored it while leaving the talk leading up to the subject intact, leading to a somewhat disjointed blog post. Sometime later I realized that it's because this is a situation where you can't describe something with a continuous function; instead of a parabola, each point should be connected by a straight line—and then the area underneath that collections of points and lines should add up to 364.

Tuesday, September 25, 2012

Solving The Raindrop Problem

Have you ever noticed that when you're driving during a rainstorm, the number of raindrops hitting your windshield seems to increase along with your speed? I first noticed it soon after I started driving, and ever since then I've intended to sit down and work out a formula to explain it. (Living in Hilo and having it rain frequently while driving up and down from Mauna Kea has tended to keep “the Raindrop Problem” as I've come to call it fresh in my mind.)

I've toyed with it on occasion, but never definitively solved it, so I finally decided to sit down and work it out rigorously. So, without further ado I shall put my years of mathematical training to the test and attempt to figure out just how the amount of rain hitting your windshield changes as a function of your speed, while simultaneously trying to explain it in terms you can follow. Ideally, I'd like to get a graph out of it.

We start out in the grand tradition of physicist everywhere by considering a very simple, idealized case. Let us assume that for our purposes, the density of raindrops is uniform everywhere that we are considering. On a small enough spatio-temporal scale this is not a bad assumption. Furthermore, assume that the raindrops are falling straight down, with no gusts of wind or other forces acting on them other than gravity and air resistance. Again, a fairly plausible scenario, especially for a lot of the rain we get in Hilo, which often comes without any accompanying wind. A steady or gusty wind such that the raindrops had a set non-zero horizontal velocity or acceleration could also be taken into account, but is more complicated than I'd like to get into right now.

Let's begin by assuming the simplest possible case. Imagine a sheet of glass of width w and height h laying horizontally under a steady, uniform rain with evenly distributed raindrops falling at uniform velocity r (for “raindrop”. I'm saving v for later). Now, we want to know how many raindrops will hit the glass in a time interval \(\Delta t\) (pronounced "delta-t", if you don't know).

If we know that the raindrops are falling at speed r, then we can multiply by the time interval \(\Delta t\) to figure out how far they fall during that interval. Thus, any raindrop within a distance  \(d=||r||\cdot\Delta t\) above the glass will hit it within time interval \(\Delta t\). (The double vertical bars around the ‘r’ serve to remind us that it is technically a vector quantity and indicate that we want the length [or magnitude] of the vector in this equation.)

Intuitively, this gives us a rectangular box of volume \(V=d\times h\times w\) over the sheet of glass within which raindrops will be able to hit the glass in time interval \(\Delta t\). Less intuitively but more rigorously this can be achieved by a double integration of the raindrop fall distance   \(d=||r||\cdot\Delta t\) over the sheet of glass:
\[V=\int_{0}^{h}\int_{0}^{w}||\overrightarrow{r}||\cdot\Delta t\ dx\,dy\]
You may refer to the image below to help keep all these symbols and concepts straight:


At this point we've nearly solved the problem of how many raindrops will hit the sheet of glass in time interval \(\Delta t\), which for our purposes will be 1 second. We just need to know the numerical density N of raindrops per unit volume times the volume where raindrops will be able to hit the glass. Putting everything we have so far into a formula, we have
\[\begin{align}n&=N\cdot V\\
&=N\cdot h\cdot w\cdot ||r||\cdot\Delta t\end{align}\]
This is all well and good, but there are two additional factors we must take into account to better approximate a car's windshield. Those factors are the angle of the windshield, and the fact that we are interested in a moving windshield.

We will now consider each effect independently, before adding them together to get a full picture of the situation.

Let's start by introducing a non-zero angle of repose to the glass sheet. Refer to the picture below to see what I mean (I've added a coordinate system for future reference):


Now, the basic problem remains the same: figuring out the volume marked by the blue parallelograms and the glass sheet. This figure is known in geometry as a parallelepiped (PARR-uh-lel-EH-pi-ped), and has the following formula for its volume (from vector calculus)
\[V=|\overrightarrow{a}\cdot(\overrightarrow{b}\times \overrightarrow{c})|\]
where a, b, and c are the vectors that make up three of the sides that meet at a vertex and the \(\times\) sign and dot have special meanings because these are vectors. (I'm not being super consistent about notating all my vectors all the time due to the constraints of working in a blog post, but I'll try to keep it clear when the distinction is important.)

“But wait a minute,” you may be thinking to yourself at this point. “Wouldn't it be easier in this case, in order to find the volume, to simply multiply the height h by a factor of \(\cos(\theta)\) to account for the diminished surface area as seen from above (where \(\theta\) runs between \(0^\circ\) for a flat sheet and \(90^\circ\) for a vertical one), and then multiply by d and w?”

Indeed it would, astute reader. In this case, such a formula would be simpler. In fact, the formula for the volume would be simply \(V=w\cdot\cos(\theta)\cdot h\cdot||r||\cdot\Delta t\).

However, the second effect we will be considering is the velocity of a moving car and attached windshield, and since I foresee vector addition on the horizon I think it would be prudent to begin incorporating vectors into the picture now.

That brings us to considering the velocity of the car (and by extension windshield) intself. Let's assume that the car is moving with a constant horizontal velocity in the positive x-direction at velocity v, as per the picture below.


The nice thing about using vectors to find the volume of the parallelepiped is that it's very easy to find the length of one of the blue lines (what we were calling d before) in the above picture: it's simply the sum of the vectors r and v. Let's call it g (for no particular reason), and we can define it as
\[\overrightarrow{g}=\overrightarrow{v}+\overrightarrow{r}\]
We can break vectors into their component parts along each axis, and in this case we have \(g_x=||\overrightarrow{v}||\) (since the x-component of g is coming from the velocity of the car), \(g_z=||\overrightarrow{r}||\) (since the z-component is coming from the velocity of the rain), and \(g_y=0\) (since we are assuming the rain is falling straight down and the car is traveling only in the x-direction).

Using the volume formula for a parallelepiped from before, the volume can be found by
\[V=|\overrightarrow{g}\cdot(\overrightarrow{h}\times\overrightarrow{w})|\]
as long as we can find a vector for g, h, and w. Once we have, the volume is given by the absolute value of the determinant of a \(3\times3\) matrix like so:
\[\begin{align}V&=\begin{Vmatrix}g_x &g_y &g_z\\ h_x &h_y &h_z\\ w_x &w_y &w_z\end{Vmatrix}\\
 &=|g_x\begin{vmatrix}h_y &h_z\\w_y &w_z\end{vmatrix}-g_y\begin{vmatrix}h_x &h_z\\w_x &w_z\end{vmatrix}+g_z\begin{vmatrix}h_x &h_y\\w_x &w_y\end{vmatrix}|\\
&=|g_x(h_yw_z-h_zw_y)-g_y(h_xw_z-h_zw_x)+g_z(h_xw_y-h_yw_x)|\end{align}\]
At this point it's an easy matter of plugging in the appropriate numbers to get the volume, after which we can use \(n=N\cdot V\) to get the number of raindrops. And to make it even better, a little reflection shows that we can simplify this symbolic equation even further.

We already know that \(g_y=0\) from above, and we can remove several other quantities upon analysis. Remember, the vector w runs only in the y-direction, so \(w_x=w_z=0\). Similarly, g and h run only the x- and z-directions, so \(g_y=h_y=0\). Upon dropping all the zero terms, the equation simplifies nicely into
\[V=|g_zh_xw_y-g_xh_zw_y|\]
We can now replace the vector components with the original quantities they stand for to remind ourselves what everything is.
\[\begin{align}g_z&=||\overrightarrow{r}||\\
h_x&=-\cos(\theta)||\overrightarrow{h}||\\
w_y&=||\overrightarrow{w}||\\
g_x&=||\overrightarrow{v}||\\
h_z&=\sin(\theta)||\overrightarrow{h}||\end{align}\]
(\(h_x\) is equal to negative \(\cos(\theta)\) because I'm taking all vectors to start at the origin, and the windshield extends slightly backwards into the negative x-axis.)

Thus, for the final volume equation we have
\[V=|\big(||\overrightarrow{r}||\cdot -\cos(\theta)||\overrightarrow{h}||\cdot ||\overrightarrow{w}||\big)-\big(||\overrightarrow{v}||\cdot \sin(\theta)||\overrightarrow{h}||\cdot ||\overrightarrow{w}||\big)|\]
At this point we are nearly ready to begin making graphs. Since we are assuming that h, w, \(\theta\), and r are all constant, we are left with an equation in v, which lends itself well to plotting.

We just need to put numbers to all our variables. Let's assume that our hypothetical windshield has a width of \(w=2\) meters and a height of \(h=0.5\) meters, giving it a surface area of \(0.5\times2=1\) m\(^2\). A little searching on the Internet finds that a “typical” raindrop has a terminal velocity of \(r=9\) meters per second. One source I found suggested a value of about \(780\) cubic millimeters of water per cubic meter of atmosphere for the density of rain. Raindrops may have diameters anywhere between 0.5 and 5 millimeters (any larger and it breaks up on the way down, any smaller and it's technically not rain, but drizzle) so the volume of an “average” raindrop of diameter 3 millimeters is
\[V=\frac{2}{3}\cdot\tau\cdot(1.5\,\text{mm})^3=14.14\,\text{mm}^3\]
Thus, on average, a cubic meter of atmosphere contains \(780\,\text{mm}^3\div14.14\,\text{mm}^3\approx55\) raindrops. So \(N=55\) for our example here.

Plugging all of this into a Python script I wrote, I was able to use the matplotlib graphing package to generate the graph below with multiple plots for different windshield angles.

The results are, perhaps, not too surprising, but still interesting (and make a rather pretty graph). The number of raindrops appears to increase linearly with speed, with steeper windshield angles (like those found in trucks or large vans) having a higher rate of increase than lower angles (like those found more in cars). The limiting cases of \(0^\circ\) and \(90^\circ\) are illustrative; a flat surface (like on the roof of vehicles) would have no change whatsoever with changing speed, while a vertical surface would start out with no raindrops hitting it (as expected), but would eventually have the most raindrops hitting it if you could go fast enough (45 meters per second is about 100 mph, so it would have to be pretty fast, but you can see that even by about 75 mph it has surpassed nearly all other angle inclinations but the \(75^\circ\) one.) I'd estimate that most cars have windshield angles around \(45^\circ\pm15^\circ\), which is best represented by the cyan line on the graph.

So, now you know (or at least have a good idea) why you need to run the windshield wipers at faster speeds when going faster. And it only took three semesters of calculus to do! (Granted, I could have done it algebraically for this simple case, but why pass up the chance to do some exciting vector calculus?) It might be interesting for a follow-up post to consider time of travel, and how many raindrops you would actually encounter at different speeds for a given trip length. Anyway, a hui hou!

Thursday, August 18, 2011

Fun with Calculus and Airplane Baggage Fees

Today I thought I'd do a little mathematical analysis of Hawaiian Air's luggage handling fee scheme using some simple calculus. Hey, wait, keep reading! I promise I'll try to keep it interesting, and the formulae to a minimum.

I don't remember when I first started wondering about the luggage fee scale used by Hawaiian Air, but it was probably the first time I was checking my own bags in and discovered that the fees go up – way up – upon checking more than one or two bags. But they didn't vary in any sort of predictable way that I could see, so I took the liberty of plotting them out, as you can see below:
Checking one bag with Hawaiian Air will set you back a reasonable $25; two bags, $60; three, and it jumps to $185; four, five, six, and seven will set you back $310, $435, $560, and $760, respectively; and 8 bags will leave your wallet lighter to the tune of $960. Now as you can see from the graph, the amount that it goes up is not uniform. To analyze how it changes, we can look at the slope. Because there are only a small number of points, we can easily calculate the slope between each one, which is equivalent in calculus to taking the first derivative. Taking the slopes using the simple equation s = (y2-y1)/(x2-x1) (I was lazy and wrote a quick routine in Python to do it for me) gives us $25/bag for the first bag, $35/bag for the second one, $125/bag for the third, fourth, and fifth ones, and $200/bag for the seventh and eighth.

Now, while this tells us how fast the fee is changing per bag, we can get more information out of it by taking a second derivative and find out how fast the rate of change is itself changing. For example, it looks on the graph like the biggest jump in terms of absolute price is between the second and third bag, and if we take the  second derivative (essentially taking the slope of the points formed by taking the first derivative) we see that this is indeed the case. Taking the second derivative, we see that the price increase, er, increases, by $10 dollars for the second bag ($35 instead of $25), $90 for the third bag, 0 for the fourth, fifth and sixth ones, $75 for the seventh, and 0 for the eighth again. Minima and maxima (the largest and smallest values) of the second derivative tell us exactly where the function is changing its value most rapidly, so we can see that the biggest change is between two and three bags.

So what's the lesson we get from all this? First, calculus isn't very difficult, and knowing it can enrich your life in many unexpected ways. In fact, calculus is like a fruit tree; you spend time planting it, watering it, and nurturing it, and in return it continues to delight you with delicious fruit long into the future. In many ways I think calculus is simpler than algebra, trigonometry, or geometry, yet so many people are afraid to try it because of preconceived notions about their mathematical ability. To put it another way, calculus is like color vision; neither is essential to life, yet lack of either leaves the world a drab and dreary place.

Secondly, try to avoid taking three bags on Hawaiian Air if you can, it just gives you the worst bang for your buck, so to speak. Stick with two, or one if possible.

Sunday, October 17, 2010

Calculus and yogurt, with just a smidgen of algebra.

Mmm, Yogurtland. I went there again today, and once again it is delicious (‘ono in Hawaiian). As I write this, I'm savoring a mix of Pomegranate & Raspberry Tart, Arctic Vanilla, Blueberry Tart, and Double Cookie Crumble flavors, topped with kiwi slices, cookie dough minis, chocolate chips, strawberry chunks, sliced macadamia nuts, honey, white chocolate sauce, and Ghirardelli caramel, which pretty much filled up the container I was using. The taste...er, tastes, are myriad, varied, and impossible to describe. The part of my brain that handles taste is probably forging new neural connections right now in order to handle the tsunami of new combinations of sensations flooding it. I hadn't noticed the honey the first time I was there, and it really adds a certain je ne sais quoi, an undefinable essence that permeates every bite and reminds me of the pleasant days back when I had a hive or two of my own, and how relaxing it was to be out there, working with the bees, watching them go about their little lives oblivious to me, inhaling the rich, intoxicating odor that comes only from the inside of a busy and active hive, the smell of little insects so full of life…ahhh…good times, good times. Up until the Varroa mites and the Colony Collapse Disorder killed ‘em.

But to keep this post from going somewhere very different from where it started, I've decided to do a little integral calculus, just for fun. A friend recently wondered aloud how much a certain large glass bottle filled with water weighed. Having had very few chances to use the calculus that I love so much all this semester (I've mostly only used algebra, which I despise), I decided to do a little volume integration and see if I couldn't figure it out. (hmmm…getting a little sleepy now after ingesting ~10 ounces of yogurt and toppings!)

I've never seen the bottle in question myself, so I only have some measurements and photos to go on. I've got that the outside diameter of the bottle is about 8 inches and its height is about 24 inches. This is corroborated by performing measurements on a (poor) picture of the bottle, which also shows its neck width to be about 2 inches. The glass is supposed to be about 3/8 of an inch thick, and it has a 5-inch deep V-shaped dent in the bottom for resisting internal pressure.

I played around with equations in Deadline (a nice little graphing program good for calculus) for a while until I found one that seems to fit pretty well. The structure of the bottle immediately reminded of a hyperbolic tangent function, and while it's probably impossible to get a perfect fit due to the perspective in the photos I used, the equation \((3/2)\tanh(x/4)+5/2\) seems to work quite well. You can see it graphed in the picture below (the red line is the graph Deadline put out, the green parts are my attempt to show what the bottle is approximately like):


Now, without delving too deeply into the theory of calculus, let me explain briefly what I will be doing. Imagine trying to find the volume of a cylinder. You know its volume is merely the area of its base (\(\pi r^2\)) times its height. Now instead of doing it in one step, suppose you divide the cylinder into a number of slices. It seems obvious that the volume of the cylinder is equal to the volume of all of those slices put together, and the volume of each slice can be found by using the volume equation for a cylinder using the new height of the slice. This is all well and good when considering a cylinder, but what if you have a cone? Any slices you make will not be cylinders, and thus cannot have the cylinder volume formula applied to them. After pondering this problem for a while, you may suddenly find yourself thinking “Aha! What if I make the slices infinitely thin? Then they will actually be little cylinders again, and I can find their volumes and sum them all up.”

On the face of it, this seems utterly preposterous, at least to me. Taking an infinite number of infinitely thin slices and adding them up to get a volume? Ridiculous! And yet the amazing thing is, it works. Isn't that incredible? Doesn't it just send shivers up and down your spine? To think that you, a mere mortal, can harness the concept of infinity for your own purposes! It's hard to convey the awe this fills me with whenever I ponder it. To me, doing these sorts of problems always gives me a feeling of flying, soaring high and away above the boring, mundane world of algebra and cutting right to the heart of a problem with eagle-like fleetness. Of course, to actually get an answer will usually require some algebra, which always feels like crash landing to me.

Anyway, the integral of integral calculus is simply a way to sum up an infinite number of slices of an object. Technically, what it adds up is the height of the function you are integrating at any given point. If we take the height of the function as the radius of a cylinder, we can square it and multiply by π to get the area of that particular slice. Adding all these areas up will give us the volume.

So! To begin...here is the equation we need to integrate:
\[V=\pi\int_{-10}^{18}\left(\frac{3}{2}\tanh\Big(\frac{x}{4}\Big)+\frac{5}{2}\right)^2dx\] (note how pretty \(\LaTeX\) makes everything!) Notice we have \(\pi\) multiplied by the sum of all the little slices from -10 to 18, which makes a total of 28 inches (the limits here are slightly strange, even for calculus, but it's for convenience with Deadline). The little dx at the end is an important part of calculus, but we don't need to bother with it now. Now, since this equation, while not difficult, would take quite a lot of algebra to solve, I'm just going to cheat and have Deadline do the integration for us. This gives us the result \(\pi\times81.96\approx257.5\) cubic inches. The bottle, however, is hollow. It has a thickness estimated at 3/8 of an inch. To a good approximation, the volume inside the bottle is simply the same function with 3/8 subtracted from it, like this:
\begin{align}V&=\pi\int_{-10}^{18}\left(\frac{3}{2}\tanh\Big(\frac{x}{4}\Big)+\frac{5}{2}-\frac{3}{8}\right)^2dx\\
&=\pi\int_{-10}^{18}\left(\frac{3}{2}\tanh\Big(\frac{x}{4}\Big)+\frac{17}{8}\right)^2dx\end{align} Although no more difficult in principle than the first integration, this is still a lot of writing to evaluate by hand, so again we call upon Deadline to get an answer of \(\pi\times71.46\approx224.5\) cubic inches. This is a reassuring answer, as subtracting it from the previous answer gives 33 cubic inches, which means that a little over 92% of the bottle's volume is actually available volume, not glass (i.e, the glass the bottle is made of occupies 33 cubic inches). However, we have not taken into account the V-shaped indentation in the bottom. Assuming that it spreads to the outside diameter minus \(2\times(3/8)=3/4\) inches, a little contemplation gives the equation: \[V=\pi\int_0^5(0.62x)^2dx\](the 0.62 comes from taking the inverse tangent of (29/8)/5 and converting to radians) At this point, things start getting somewhat complicated, so we're going to simply assume that there is a cone with this volume taken out of the bottom of the bottle. Obviously, this is not perfectly correct, and may lead to the final weight being slightly on the low side, but we weren't perfectly careful with the ends of the bottle either which ought to bring it back up slightly. The volume given by Deadline is \(\pi\times7.75\approx24.3\) cubic inches. Subtracting this from the volume found previously gives ≈ 200 cubic inches available for holding water.

So, let's recap: on some ever-so-slightly shaky assumptions we've found that the bottle has 33 cubic inches of glass and 200 cubic inches of holding space for water, assuming it's full right to the top. This translates to a carrying capacity of about 3.3 liters. Converting both values into cubic centimeters, we get  ≈ 540 cc's of glass and ≈ 3274 cc's of water. The density of water at 25 °C (room temperature, roughly) is 0.997 g/cm\(^3\). The density of glass, unfortunately, varies widely depending on the type, from less dense than aluminum to more dense than iron. According to Encyclopedia Britannica, 1971 edition, “common” glass has densities ranging from \(2.4-2.8\) g/cm\(^3\). Since this is tinted glass we're dealing with, and I have no idea how common it is, and usually less “common” glasses tend to be denser, I'm going to go with the heavier side and use 2.8. Multiplying the volumes times the densities gives the masses, which turn out to be ≈ 3264 g of water and 1512 g of glass (interestingly, this implies the glass makes up just a bit less than 1/3 of the total mass of the full bottle). Multiplying the masses (in kg) of the water and glass times the acceleration due to gravity (9.8 m/s\(^2\)) at the Earth's surface gives the weight, in Newtons: ≈ 32 N for the water, and ≈ 15 N for the glass. Together this gives a weight of 47 Newtons, which is about 10 and a half pounds. This works out to about 68% of the weight being water and 32% being glass, in agreement with our earlier estimate.

Error analysis: possible error: quite large. I've never held or even seen one of these bottle in person, so I'm relying on estimated measurements by other people. Function fitting was rudimentary and qualitative: if I wanted to be really through, I could have done a least-squares-fit regression analysis to determine the ‘best’ fit to the bottle (I don't actually know how to do that, but it never seemed that difficult in theory). Of course, a more thorough analysis of the complicated bottom of the bottle could be done; this reminds me of the “just assume everything is a frictionless, homogeneous sphere in vacuum” joke in physics. Personally, I think 3/8 of an inch is a bit thick for the glass; I hazard a guess that 1/4 would be closer to the mark, which would raise the weight a bit by having more volume for water, but again I've never handled the glass to see about this, and it probably varies throughout the bottle, a factor I didn't take into account. The glass may be denser than the value I assumed; it looks like old glass, which could be of (significantly) higher density than the value I used.

I suppose, in the end, the slightly depressing thing is that for all my mathematical tricks the quickest and easiest way remains simply to weigh the thing. If such a thing is ever done, I would appreciate being informed of just how off I was. Oh, and if you spot any errors in my math, please let me know!