Tag: math

An Unnecessary Proof by Contradiction

Until Covid, I was meeting up with a friend once a week for some recreational abstract algebra. This was an early problem in the textbook we used:

Prove that for any positive integer m there exists a sequence of m consecutive positive integers that are all composite.

My gut instinct was to try to prove this by contradiction, using the pigeonhole principle somehow. But before I could work that out, I saw that it’s easily provable by construction.

Proof by construction

Let n = m!. Then, for all integers k such that 0 < k \le m, we know k \mid n. So we can say that n + k = k (\frac{n}{k} + 1). Since k \mid n, the quantity \frac{n}{k} + 1 is an integer. Therefore n+k has k as a factor, making it composite. So, the sequence

n+1, n+2, \dots, n+m

are all composite. \blacksquare

Pretty trivial. But I still wanted to know if my gut instinct was right; could this be proved by contradiction?

It turns out that it can, but it’s much more complicated, and took me a couple of days to figure out.

Proof by contradiction

Assume that every set of m consecutive positive integers contains at least one prime number.

The positive integers can be expressed as a union of sets

\Z^+ = A_0 \cup A_1 \cup A_2 \cup \dots 

where

A_n = \{nm+1, nm+2, \dots, nm+m\}

Since \vert A_n \vert = m, our assumption requires that every set A_n contains at least one prime number.

Let a_i(n) be the i^{th} element of A_n, where 1\le i \le m. Call i the “position” of a_i(n) within A_n. Since there is only one even prime number, the maximum number of positions in A_n at which there can be a prime is \lceil \frac{m}{2}\rceil.


Lemma: If A_j has a prime p in position i then A_{j+q} cannot have a prime in position i when q is a multiple of p.

Proof: Let A_j and A_{j+q} be sets with prime numbers in position i, and say that a_i(j) = p and a_i(j+q) = p^*. Then

p^* = p + (m-i) +m(q-1)+i

In the sum on the right hand side of this equation, the term (m-i) represents all the positions in A_j after p, the term m(q-1) is all the positions in all of the sets between A_j and A_{j+q}, and the term i is how many positions in A_{j+q} we must move through to reach p^*.

This equation simplifies to

p^* = p +qm

If q is a multiple of p, then for some k \in \Z^+

p^* =p+kpm=p(1+km)

which contradicts that p^* is prime.


Consider a set A_j such that a_i(j) is prime. Let a_i(j) = p_1.

By the above lemma, we know that a_i(j+p_1) is composite. By our assumption, the set A_{j+p_1} must contain a prime number. There remain \lceil \frac{m}{2}\rceil - 1 positions in A_{j+p_1} at which there can be a prime. Let a_{i^*}(j+p_1) be a prime, and call it p_2.

Now consider the set A_{j+(p_1p_2)}. This set has two positions, i and i^*, at which there can’t be a prime, leaving only \lceil \frac{m}{2}\rceil - 2 positions at which there can be a prime. By our assumption, one of these positions must have a prime, which we will call p_3.

Continue this pattern until we find the set A_{k+(p_1 p_2 \dots p_{\lceil \frac{m}{2}\rceil})}. This set contains zero positions where there can be a prime. But this contradicts our assumption, which requires every A_n to contain a prime number. Thus our assumption is false, and there exists an A_n (a set of m consecutive positive integers) with only composite elements. \blacksquare

If there’s a simpler way to prove this by contradiction, I’d like to know about it.

The Bookbinder’s Guide to Destroying the Universe: three views of the magnitude of the Library of Babel

Jorge Luis Borges’ story “The Library of Babel” has long been an obsession of mine. The 1941 short story1 posits a library that contains every possible book-length2 combination of words. It’s probably my second-favorite short story; I think about it all the time and teach it whenever I can. I once even wrote a program to output the digits of 251,312,000, the number of distinct books the Library of Babel contains, which produced a 2Mb text file of mostly zeros. So when my friend Tony Tulathimutte (about whom I’ve written before) asked me to consult on a “Library of Babel”-inspired essay he is writing on the algorithmic generation of literature, I was happy to help. Tony asked:

Even if 251,312,000 is beyond astronomically large, I’m interested in getting as close as possible to a non-theoretical implementation of the Library. Can we work on a Fermi estimate of what it would take to assemble the library? Like, if we distributed the workload to every computer on Earth, or used the world’s fastest supercomputer (China’s Tianhe-2, 33.86 petaflops), or even assembled a Douglas-Adams-style Deep Thought Computational Matrix made of human brains (the human brain runs at an estimated 36.8 petaflops)? Or if Moore’s law holds, at what point would the processing power on Earth suffice to create the Library within the lifespan of the universe.

This is a completely reasonable question, but one that illustrates just how unnatural it is to think about numbers that are “beyond astronomically large.” The number of books in the Library of Babel is so big, no set of adjectives can meaningfully capture its hugeness. After all, things like petaflops or the computational capacity of the human brain are also too big to really conceptualize. So it makes sense that one might treat them all as members in equal standing of the Numbers Too Big To Think About club. But they aren’t. Here are three illustrations of the absurd magnitude of the Library of Babel.

1. Time

First we’ll look at the initial question, how long would it take to generate the Library of Babel? Instead of addressing it the way Tony suggests, though, let’s approach the problem from the opposite direction: what is the fastest it’s possible to imagine generating the Library of Babel?

The Heisenberg uncertainty principle implies that there is a smallest possible size something can be, and a shortest possible time in which something can happen. These minimum quantities are built in to the basic workings of the universe, and are called the Planck units. The Planck time is equal to about 5.391 x 10-44 seconds. It isn’t physically possible for an event to occur in less time than that. Let’s imagine that we have computers capable of generating one Library of Babel Book (LoBB) per unit of Planck time. How many of these computers? Let’s be ambitious: through some impossible alchemy, we will now turn every single atom in the observable universe into a computer capable of generating one LoBB per unit of Planck time.

There are on the order of 1080 atoms in the observable universe. So let’s say we have that many computers… what’s that? Oh, you’re asking, “but what about dark matter?” It’s true. Scientists think there might be five times as much dark matter in the universe as there are atoms. So let’s be generous and bump it up ten times. We’ll say with have 1081 computers, each of which generates one LoBB per unit of Planck time. So, if we have 1081 computers generating about 1043 LoBBs per second, that means we generate 10124 LoBBs every second, 10131 LoBBs per year.

There are 251,312,000 possible LoBBs, which is on the order of 101,834,097. At a rate of 10131 LoBBs per year, it will take 101,833,966 years to finish making the whole Library, or on the order of 10106. Take a quick look at Wikipedia’s timeline of the far future. You’ll notice that the time when we finish making the Library at the fastest imaginable rate would be one of the last items on the list, coming well after the entire universe is a cold, dead, iron cinder.

So the answer to Tony’s question is: never.

2. World Enough

But maybe you noticed that I cheated a little. I said I would consider the fastest it’s possible to imagine generating LoBBs, but calculated based on the fastest it would be physically possible to make them. We can imagine things faster than that, though. We can imagine just snapping our fingers and–poof!–a complete Library of Babel made in an instant. So, why not? Let’s consider that case. We now have the power to instantly assemble a Library of Babel.

Assemble it… out of what? I mean, what are we going to make the literal books out of? Not out of atoms; we already said that there are, generously, 1081 atoms worth of matter in the observable universe. Even if we could somehow encode a LoBB in every atom, we wouldn’t come close to making 10106 of them. Not even if we could make a LoBB out of every subatomic particle.

The universe just doesn’t have enough stuff in it to make the Library of Babel.

3. Vaster Than Empires

So let’s add more stuff. We’ve already given ourselves the power to instantly reconfigure every atom in the universe. Why not give ourself the power to make new matter out of nothing while we’re at it? What happens then?

Turns out, even if we could conjure enough new matter to make the Library of Babel, the universe itself would be too small to hold it.

There’s a weird and fascinating result from black hole physics called the holographic principle, which says that all the information needed to describe a volume of space, down to the minutest quantum detail, only ever takes as much space to encode as the surface area of the volume.3 That is, if you wanted to write down all the information necessary to perfectly describe every detail of what’s inside a room, you would always be able to fit all the information on just the walls. In this way, the entire universe can be thought of as a three dimensional projection of what is, on the level of information, a strictly two dimensional system. Sort of like a hologram, which is 2D but looks 3D, a metaphor from which the principle gets its name.

In any normal region of the universe, the amount of information in a given volume will actually be much less than what you could encode on its surface area. For reasons having to do with thermodynamics that are too complicated to go into here, when you max out the amount of information a volume of space can contain, what you have is a black hole.4 Now, remember those Planck units from the beginning? Length was one of them; there’s a smallest possible size that the laws of nature will let something be, and we can use that length to define a new unit, the Planck area. The most efficient possible encoding of information, per the holographic principle, is one bit per unit of Planck area, which is on the order of 10-70 square meters.

The observable universe has a radius of around 4.4 x 1026 meters. That gives it a surface area on the order of 1053 square meters, which means it can hold 10123 bits of information. That’s just the observable universe though; the whole universe is much, much bigger. We aren’t sure exactly how much bigger, it isn’t observable. But inflationary universe theory, which just got some strong confirming evidence, provides an estimate that the whole universe is 3 x 1023 times larger than the part of the universe we can see. Carry out the same calculations, and the estimated size of the whole universe means that it can contain 10170 bits of information. As for the Library, if you assume that it takes a string of at least six bits to encode one of a set of 25 characters, then the whole Library of Babel would require a number of bits on the order, once again, of 10106. Even if we demiurgic librarians do violate the law of conservation of energy to bring the Library into being, the entire universe would collapse into a black hole long before we finished our project.

So: the Library of Babel is so large that the universe isn’t going to be around long enough to make it. And even if it was, there isn’t enough matter and energy to do it. And even if there was, before that point all of reality as we know it would be destroyed. That is how extreme things can get when you start dealing with “beyond astronomically large” numbers.


  1. There is a version of the story online, but I much prefer the translation by Andrew Hurley in Collected Fictions. 

  2. As described by Borges: 25 symbols, 40 symbols per line, 80 lines per page, 410 pages. 

  3. I’ve previously posted a video to an excellent introduction to the holographic principle. You can find that here

  4. This is because, physically speaking, information is the same thing as entropy. 

Tabclosing: A Miscellany

I suppose the tabclosing posts are often a miscellany, but the last couple have been kind of thematic. This one isn’t.

Thermo Thursday: Chapter 1.2: The Ideal Gas

Section opens with the ideal gas law in the form that I was taught it in high school, PV=nRT where P is pressure, V is volume, T is temperature in kelvins, n is the number of moles of gas, and R is the ideal gas constant, = 8.31 J/(mol K). Also from high school, a mole of molecules is Avogadro’s number of them, 6.02 x 10^23.

For physics it is often more useful to talk about the number of molecules, rather than the number of moles, so we multiply by Avogadro’s number to get N, the number of molecules of gas. This transforms the ideal gas law into PV=NkT where k is Boltzmann’s constant, k = 1.381 x 10^-23 J/K. The section then shows how if you consider an ideal gas one molecule at a time, you can eventually conclude that this constant is essentially a conversion factor between temperature and molecular energy. From there it introduces the electron-volt (eV) as a more convenient unit than the Joule to talk about the tiny kinetic energies of molecules, and derives the equation for the root-mean-square velocity of a molecule in an ideal gas, {v}_{rms} = \sqrt {\frac {3kT}{m}}.

Interesting problems:

Problem 1.11: Rooms A and B are the same size, and are connected by an open door. Room A, however, is warmer (perhaps because its windows face the sun). Which room has a greater mass of air? Explain carefully.

The rooms are the same size, so the volume of the two rooms is the same. The rooms are connected by an open door, so the pressure of the two rooms is the same. The only variable term in the ideal gas law between the two rooms is temperature. Expressing the ideal gas law in terms of the number of molecules in each room, I get N=\frac {PV} {kT}. Since the temperature term is in the denominator, the room with the higher temperature is going to contain a lower number of gas molecules, and therefore a lower mass of air. So the colder room, room B, has the greater mass of air.

Problem 1.12: Calculate the average volume per molecule for an ideal gas at room temperature and atmospheric pressure. Then take the cube root to get an estimate of the average distance between molecules. How does this distance compare to the size of a molecule like { N }_{ 2 } or { H }_{ 2 }O?

From \frac { V }{ N } =\frac { kT }{ P } we get an average volume per molecule of 4.1 x 10^-26 cubic meters. The cube root gives us an average distance between molecules of 3.4 x 10^-9 meters, or 3.4 nm. The size of the nitrogen gas molecule is on the order of tens of picometers, so 100 times smaller. The size of a water molecule is on the order of hundreds of picometers, so 10 times smaller.

Problem 1.16: The exponential atmosphere.

(a) Consider a horizontal slab of air whose thickness (height) is dz. if this slab is at rest, the pressure holding it up from below must balance both the pressure from above and the weight of the slab. Use this fact to find an expression for dP/dz, the variation of pressure with altitude, in terms of the density of air.

It’s embarrassing how rusty my math has gotten. I had to look back at my old work to recall how to start solving this problem. Density is mass per unit volume, and usually denoted by \rho (the Greek letter rho). If you assume a fictitious “air molecule” with mass m, then for a slab of air the density would be given by \rho = \frac{Nm}{V}. Since I’m assuming that the air is uniform horizontally and only varies in the z direction, let the area of the top of the slab go to zero, which gives \rho = \frac {Nm}{dz}. Then the mass of the air in the slab is just \rho dz.

If the pressure below the slab is equal to the pressure above plus the weight of the slab, then we have

P(z) = P(z+dz) + (\rho dz)g

what can be rewritten

P(z) - P(z+dz) = \rho g dz

If the change in pressure dP = P(z + dz) - P(z), then the left side of the equation above is -dP. So I have

-dP = \rho g dz

which gives me

\frac {dP}{dz} = -\rho g.

(b) Use the ideal gas law to write the density of air in terms of pressure, temperature, and the average mass of air molecules. Show, then, that the pressure obeys the differential equation \frac {dP}{dz}= -\frac {mg}{kT}P, called the barometric equation.

Let’s consider my fictitious air molecule from the previous part to have a mass equal to the average molecular mass of air. (If I were doing this for real, I’d need to make use of the fact that air is 78% molecular nitrogen, 21% molecular oxygen, and 1% argon. But that seems tedious.) Going back to the definition of density, I can rewrite my last result

\frac {dP}{dz} = -\rho g = -\frac {Nm}{V}g.

Then I can use the ideal gas law PV=NkT \rightarrow \frac {N}{V}=\frac {P}{kT} to show

\frac {dP}{dz} = -\frac {P}{kT}mg = -\frac {mg}{kT}P.

(c) Assuming that the temperature of the atmosphere is independent of height (not a great assumption but not terrible either), solve the barometric equation to obtain the pressure as a function of height: P(z) = P(0){e}^{{-mgz}/{kT}}. Show also that the density obeys a similar equation.

Finally, it’s time to pull out my hideously rusty calculus skills. I only really remember how to solve this for a separable differential equation. Fortunately, it looks like this is one; it fits the form \frac {dy}{dt}=g(t)h(y). So I can take my differential equation from part b and do this

\frac {dP}{dz} = -\frac {mg}{kT}P \rightarrow \frac {dP}{P} = -\frac {mg}{kT} dz.

Now I integrate both sides of the separated equation

\int {\frac {dP}{P}} = \int{-\frac {mg}{kT} dz} \Rightarrow \ln {P} = -\frac {mgz}{kT}+C.

To solve for pressure I exponentiate both sides

P(z) = {e}^{{-mgz}/{kT}+C}={e}^{C}{e}^{{-mgz}/{kT}}.

Notices that when z=0, P(z)=P(0)=e^C. Thus I can rewrite the constant term and get the sought equation,

P(z) = P(0){e}^{{-mgz}/{kT}}.

For density, I recall that \rho = \frac {Nm}{V}, which lets me rewrite the ideal gas law as P=\frac {NkT}{V}=\frac {\rho kT}{m}, and thus \rho = \frac {Pm}{kT}. Plugging that into my equation for pressure, I get

\rho (z) = \frac {m}{kT} P(z) = \frac {m}{kT}P(0){e}^{{-mgz}/{kT}}.

From the ideal gas law above, though, we can say that \frac {P(0)m}{kT}=\rho (0), so I can rewrite the above as

\rho (z) = \rho (0){e}^{{-mgz}/{kT}}.

Problem 1.22: If you poke a hole in a container full of gas, that gas will start leaking out. In this problem you will make a rough estimate of the rate at which gas escapes through a hole. (This process is called effusion, at least when the hole is sufficiently small.)

(a) Consider a small portion (area = A) of the inside wall of a container full of gas. Show that the number of molecules colliding with this surface in a time interval \Delta t is PA\Delta t/(2m\bar { { v }_{ x } }), where P is the pressure, m is the average molecular mass, and \bar { { v }_{ x } } is the average x velocity of those molecules that collide with the wall.

First, we need to consider only those molecules that are able to reach the area A in the time allowed. Those would be only those molecules in the volume given by A\bar {{v}_{x}}\Delta t. The number of molecules in this volume would be (\frac {N}{V})A\bar {{v}_{x}}\Delta t, which I can use the ideal gas equation to rewrite as \frac {P}{kT}A\bar {{v}_{x}}\Delta t. That’s the number of molecules in the volume we’re concerned with, but I wouldn’t expect all of them to be moving toward the wall of the container. At any given time I’d expect half of them, on average, to me moving toward the wall of the container, and the other half to be moving away. So let’s express the molecules in the relevant volume that are actually going to hit the wall as \frac {1}{2}\frac {P}{kT}A\bar {{v}_{x}}\Delta t.

A result from earlier in the chapter had that kT=m\bar {{v}_{x}^{2}}, so I’ll invoke that now to rewrite the previous expression as \frac {1}{2}\frac {P}{m\bar {{v}_{x}^{2}}}A\bar {{v}_{x}}\Delta t. Then I cancel to get the sought expression, PA\Delta t/(2m\bar { { v }_{ x } }).

There’s more to this problem, including developing a differential equation for the number of molecules that escape from the container as a function of time once you punch a hole in it. But I had to interrupt Thermo Thursday this week for a student meeting, so I’m not going to get to them here.

Thermo Thursday: chapter 1.1

1.1: Thermal Equilibrium This chapter introduces the several basic definitions of temperature, starting with the operational (“temperature is what you measure with a thermometer”) and ending with a qualitative theoretical definition (“Temperature is a measure of the tendency of an object to spontaneously give up energy to its surroundings. When two objects are in thermal contact, the one that tends to spontaneously lose energy is at the higher temperature.”) Some time is spent on what exactly thermal contact entails–that the objects are in some way able to exchange energy, and that this energy is called heat. When the two objects have been in contact long enough, we learn that they are considered to be in thermal equilibrium, and that the time required to come to thermal equilibrium is the relaxation time. Curiously, Schroeder doesn’t say in the definition that the two objects are in thermal equilibrium when they’ve reached the same temperature. This is probably because of the way he defined relaxation time, which gets a footnote that some authors consider the relaxation time as the time required for the temperature difference between the two objects to decrease by a factor of e. The most interesting part of the section is an analogy of thermal equilibrium to other kinds of equilibrium. Schroeder gives the example that if you pour cold cream into a hot cup of coffee, the relaxation time of the cream/coffee system is very short, but the relaxation time for the coffee to come to thermal equilibrium with the room is still very long. But he notes that there are more kinds of equilibrium on display in the example; the cream in the coffee reaches diffusive equilibrium when it is blended with the coffee such that its molecules have no greater tendency to move in one direction than another. Also defined is mechanical equilibrium, when large-scale motions can take place, but no longer do. Whereas the exchanged quantity to reach thermal equilibrium is energy, the exchanged quantity for diffusive equilibrium is particles, and for mechanical equilibrium, volume. The rest of the section describes how thermometers work, and introduces the concepts of absolute zero and the kelvin scale. These things are sufficiently basic that I’m not going to synopsize them.

I don’t think I’ll always work every problem in a chapter, but to start out I’m going to.

Problem 1.1: The Fahrenheit temperature scale is defined so that ice melts at 32°F and water boils at 212°F. (a) Derive the formulas for converting from Fahrenheit to Celsius and back. (b) What is absolute zero on the Fahrenheit scale?

These are two linear scales, meaning that every degree F is the same size as every other degree F, and equivalently for every degree C. But F degrees and C degrees are different sizes, and the scales don’t start in the same place. So first I’ll figure out how do describe the size of a degree F in terms of a degree C, or the number of degrees F per degrees C. The magnitude of the temperature change between where water freezes and where it boils is the same regardless of scale, so let be the size of a degree Fahrenheit and C be the size of a degree Celsius. Then,

( 212F - 32F ) = (100C - 0C).

Solving this equation gives us

F = \frac { 100 }{ 180 } C = \frac { 5 }{ 9 } C.

So one degree F is only five ninths the size of a degree C. So if we have a number of degrees Celsius, we have to divide by five ninths (same as multiplying by nine fifths) to get the equivalent number of degrees Fahrenheit. But there’s still the issue that the scales don’t start in the same place. When we’re at 0° C, we’re still at 32° F. So we need to add a constant factor of 32 to the equation above to adjust for the different zero-point, giving us a temperature conversion equation

{ T }_{ F }=\frac { 9 }{ 5 } { T }_{ C }+32 and { T }_{ C }=\frac { 5 }{ 9 } ({ T }_{ F }-32). (Solution to part a.)

For part b, we know from the chapter that absolute zero is -273°C, so

{ T }_{ F }=\frac { 9 }{ 5 } (-273)+32=-459. (Solution to part b.)

Problem 1.2: The Rankine temperature scale (abbreviated °R) uses the same size degrees as Fahrenheit, but measured up from absolute zero like kelvin (so Rankine is to Fahrenheit as kelvin is to Celsius). Find the conversion formula between Rankine and Fahrenheit, and also between Rankine and kelvin. What is room temperature on the Rankine scale?

Degrees Fahrenheit and Degrees Rankine are the same size, the scales just start in a different place. We know from the previous problem what absolute zero in °F is, so

{ T }_{ R }={ T }_{ F }+459.

Rankine and kelvin start in the same place, but have different degree sizes. The sizes are the same as for Fahrenheit and Celsius respectively, so we already know that one degree Rankine is five ninths the size of one kelvin. (I’ll note here that, for no reason I’m aware of, it’s considered improper to say “degree kelvin.”) So again we divide our kelvins by five ninths to get the number of degrees Rankine, giving us a temperature conversion equation

{ T }_{ R }=\frac { 9 }{ 5 } { T }_{ K }.

Room temperature is defined to be 300 K, so by the equation above, room temperature is also 540°R.

Problem 1.3: Determine the kelvin temperature for each of the following: (a) human body temperature; (b) the boiling point of water (at standard pressure of 1 atm); (c) the coldest day you can remember; (d) the boiling point of liquid nitrogen (-196°C); (e) the melting point of lead (327°C).

(a) 98.6°F = 37°C = 310 K. (b) 100°C = 373 K. (c) -10°F ≈ -23.3°C = 249.6 K. (d) -196°C = 77 K. (e) 327°C = 600 K.

Problem 1.4: Does it ever make sense to say that one object is “twice as hot” as another? Does it matter whether one is referring to Celsius or kelvin temperatures? Explain.

The book hasn’t explicitly defined “heat” yet, so I’m going to interpret this problem to be asking just about temperature scales. Without a defined scale, saying “twice as hot” is meaningless. Twice as many degrees Celsius is a much greater difference in temperature than twice as many degrees Fahrenheit. Also, suppose our first object is at 0°C. Within the Celsius scale, you can’t define what temperature an object “twice as hot” would be. On the kelvin scale, excepting the special case of absolute zero, the phrase “twice as hot” does always have a mathematically coherent definition. (I’m not sure that it has a physically coherent definition, but the book hasn’t gotten to specific enough definitions for me to make that argument.)

Problem 1.5: When you’re sick with a fever and you take your temperature with a thermometer, approximately what is the relaxation time?

I’m not sure what the intention with this problem is. Actually calculating this would both require information that hasn’t been introduced yet, and defining a specific type of thermometer. But I don’t see anything in the chapter to provide a basis for approximation. From anecdotal experience, the relaxation time (i.e. how long it takes for an oral thermometer to go from room temperature to the temperature of the inside of my mouth) is on the order of one minute.

Problem 1.6: Give an example to illustrate why you cannot accurately judge the temperature of an object by how hot or cold it feels to the touch.

The key here is judging accurately. Imagine that you touch an object that is at exactly your body temperature. Your body and the object are in thermal equilibrium, so there will be no transfer of energy, and you will feel no temperature difference. So you know that it’s the same temperature as you are, but what temperature is that? You can’t find out by touching yourself, as you are always in thermal equilibrium with yourself. You can estimate your own temperature, but that wouldn’t be accurate. Since body temperature is variable, it’s impossible to know where the “feels hot, feels cold” scale starts without recourse to a thermometer. (There’s also the issue that beyond certain temperature ranges the tissues of your body with do the sensing will be damaged, making you unable to feel temperature at all.)

Problem 1.7: When the temperature of liquid mercury increases by one degree Celsius (or one kelvin), its volume change increases by one part in 5500. The fractional increase in volume per unit change in temperature (when the pressure is held fixed) is called the thermal expansion coefficient, β:

\beta =\frac { { \Delta V }/{ V } }{ \Delta T }

(where V is volume, T is temperature, and the Δ signifies a change, which in this case should really be infinitesimal if β is to be well defined). So for mercury, β = 1/5500 K^-1 = 1.81 x 10 ^-4 K^-1. (The exact value varies with temperature, but between 0°C and 200°C the variation is less than 1%.)

(a) Get a mercury thermometer,

No.

estimate the size of the bulb at the bottom, and then estimate what the inside diameter of the tube has to be in order for the thermometer to work as required. Assume that the thermal expansion of the glass is negligible.

Screw getting an thermometer. Let’s just assert that the bulb at the bottom has volume V of one cubic centimeter. Let’s also assert, because I’m making things up and I can, that the degree markings are a height h ofone millimeter apart. The amount of mercury that rises up the tube radius with a 1 K increase in temperature, then, is

\beta (V)(\Delta T)=\pi { r }^{ 2 }h

Solve for the radius of the cylinder,

r=\sqrt { \frac { \beta (V)(\Delta T)}{\pi h}} =0.02. So the radius is 0.002 cm. (Frustratingly, I haven’t been able to make the unit symbols parse in the LaTeX plugin, but the dimensional analysis checks out.

(b) The thermal expansion coefficient of water varies significantly with temperature: It is 7.5 x 10^-4 K^-1 at 100°C, but decreases as the temperature is lowered until it becomes zero at 4°C. Below 4°C it is slightly negative, reaching a value of -0.68×10^-4 K^-1 at 0°C. (This behavior is related to the fact that ice is less dense than water.) With this behavior in mind, imagine the process of a lake freezing over, and discuss in some detail how this process would be different if the thermal expansion coefficient of water were always positive.

Okay, this one is interesting. Imagine a lake getting colder and colder. The positive thermal expansion coefficient means that, above 4°C, the colder the water is the denser it is, so the coldest water will sink to the bottom. (This matches my intuition that the bottom of a swimming pool is colder than the surface.) Let this behavior continue until, hypothetically, we have an entire lake in which all the water is at 4°C. Then let some of the water in that lake get colder. Because the thermal expansion coefficient turns negative now, the colder water will be less dense, and will start rising to the top. That means that by the time the first water gets down to 0°C and freezes, it will be at the surface, and the water below will be warmer. So lakes freeze from the surface down. If the thermal expansion was always positive, I would expect lakes to freeze from the bottom up.

Problem 1.8: For a solid, we also define the linear thermal expansion coefficient, α, as the fractional increase in length per degree:

\alpha =\frac { { \Delta L }/{ L } }{ \Delta T } .

(a) For steel, α is 1.1 x 10^-5 K^-1. Estimate the total variation in the length of a 1-km steel bridge between a cold winter night and a hot summer day.

Let’s say that a hot summer day is 43°C, and a cold winter night is 0°C. For an L of 1km, we have

\alpha (L)(\Delta T)=\alpha (1)(43)=0.00047

in units of kilometers, which is just under half a meter.

(b) The dial thermometer in Figure 1.2 uses a coiled metal strip made of two different metals laminated together. Explain how this works.

The two different metals have different thermal expansion coefficients. Assume that they are the same length when laminated together at some thermal equilibrium. When the temperature changes, the strips will not be able to expand linearly because they are attached to each other and changing by different lengths. As such, there will be a lateral displacement; the laminated strip will curl. This curling is proportional to the change in temperature.

(c) Prove that the volume thermal expansion coefficient of a solid is equal to the sum of its linear expansion coefficients in the three directions: \beta ={\alpha}_{ x }+{\alpha}_{y}+{\alpha}_{z}. (So for an isotropic solid, which expands the same in all directions, β=3α.)

Recall that \Delta V={ V }_{ final }-{ V }_{ initial }. If {V}_{initial}=xyz, then it follows that

{ V }_{ final }=(x+\Delta x)(y+\Delta y)(z+\Delta z)\\ =xyz+\Delta xyz+x\Delta yz+xy\Delta z+x\Delta y\Delta z+\Delta xy\Delta z+\Delta x\Delta yz+\Delta x\Delta y\Delta z\\ \approx xyz+\Delta xyz+x\Delta yz+xy\Delta z

That last step works because all of the terms with multiple deltas are so tiny compared to the other terms that they are physically negligible, so I can drop them. This gives me

{\Delta V=V }_{ final }-{ V }_{ initial }=xyz+\Delta xyz+x\Delta yz+xy\Delta z-xyz\\ =\Delta xyz+x\Delta yz+xy\Delta z

Which I can plug into the equation for β to get

\beta =\frac { { \Delta V }/{ V } }{ \Delta T } =\frac { { (\Delta xyz+x\Delta yz+xy\Delta z) }/{ (xyz) } }{ \Delta T } =\frac { ({ \Delta x }/{ x })+({ \Delta y }/{ y })+({ \Delta z }/{ z }) }{ \Delta T }\\ ={ \alpha}_{ x }+{ \alpha}_{ y }+{ \alpha}_{ z }

thus proving the theorem.

Research and Development

This blog post exists primarily as a test of my ability to mirror WordPress content to Twitter, which I think I just enabled. But to make it a little more fun, here’s a video of some significantly more interesting testing. Dr. Tom Murphy VII has had the brilliant idea to use lexicographical ordering as a basis for teaching computers to play videogames. The full paper on his work is here, but more fun is his video of algorithmic weirdnesses as a computer gradually learns to play Mario.

Repost: My Path to Differential Equations Success

This is not my first blog. There have been others, some euthanized and some abandoned. The ruins of my former blogs are filled with rotten links and gutted by expired hosting. There is, though, an occasional post worth saving. This was originally posted on May 14, 2008.

Some time in 2005 I was studying for my Differential Equations final exam, thinking to myself, “I can have a computer solve all of these problems for me. I will never do this again.” I had thought this in frustration many times throughout my mathematical education, and to be honest it was getting less and less true as the math got more advanced. This time, though, I followed that thought up with another one that hadn’t previously occurred to me: if computers can be given explicit instructions that allow them to solve differential equations, I should be able to write down similarly explicit instructions for myself. Verbalizing the specific steps necessary to solve the problems I was working on seemed like a good study activity. Additionally, I was allowed a page of notes to use on the exam, so if I could organize the steps so that they all fit on a page I could actually use this work during the test. I ended up spending a couple of hours in a study room with my textbook and a pad of graph paper, creating a flowchart for solving second order linear differential equations with constant coefficients. I tied with one other student for the highest grade on the final.

Recently I’ve been playing with Ubuntu, and as a way of gaining some familiarity with the OpenOffice suite of productivity apps I decided to create a digital version of my SOLDE flowchart. It is sized to fit on a sheet of 8.5×11 paper, and I am releasing it under creative commons license. If you think it would be of use to you, or know others who might like to use it, feel free to email it, print it out, pass it around. I think it might make a good handout for differential equations students. (It’s under a share-alike license, so you can make derivative works as well, provided they are also creative commons licensed. One possible improvement might be to create a flowchart for variation of parameters, which gets glossed over on this one.)

(Click to enlarge.)

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Nature by Numbers

Cristóbal Vila (www.etereaestudios.com) has created a gorgeous short film exploring natural structures that exhibit the golden ratio.

A Clever Energy Saving Idea From The Radio

A couple of days ago the NPR call-in program Talk Of The Nation had a segment on innovation in the troubled economy.  I only caught the end of it, but I heard a caller who was starting a business to help people save money by adding a nifty addition to their home water heating setup.  The idea is this:  instead of bringing the cold water line directly into the water heater, install an uninsulated water tank next to the water heater, and then draw from the top of that tank for the heater.  This allows the intake water time to warm to ambient air temperature, thus requiring less energy to further heat it to whatever you have your water heater set to.

I thought this was a very clever idea, and did a quick back-of-the-envelope estimate of what the energy saving should be.  For ease of approximation, I make the following assumptions:

• Assume a standard 40-gallon (151 liter) electric water tank, set to warm to 120°F (48.9°C).

• Assume that I use water in such a way that all the water in the tank has time to completely warm to the air temperature before I draw it into the water heater.  (Otherwise it would be necessary to model usage, flow rate, bring in Newton’s law of cooling, etc.)

• The table at the right gives the median ground water temperature in the United States as about 55°F (12.8°C).  I will use this as temperature of the water going into the heater without the uninsulated tank.

• Finally, assume that the ambient air temperature around the uninsulated tank is a constant 72°F (22.2°C) year round.  This is almost certainly a net underestimate where I live, a net overestimate in some places, and probably pretty close to correct if your water heater is in an air conditioned room (but then the energy use of the whole system is more complicated to calculate).

The specific heat of water is 4186 Joules/kilogram, so without the uninsulated tank the energy to heat one water-heater-full is (4186 J/Kg°C)(151 Kg)(48.9-12.8 °C)= about 22.8 million Joules.  With the uninsulated tank in the system, the equation changes to (4186 J/Kg°C)(151 Kg)(48.9-22.2 °C)= about 16.9 million Joules.  The difference is 5.9 million Joules, or about 1.63 kilowatt hours.  Assume that I use one full tank of water per day.  The current average price of electricity is 11.47¢/kWh, which amounts to a savings of $5.60 per month.

This is a really rough estimate, but it is enough to convince me that this alteration to home water heating is probably in the class of improvements that will pay for themselves in reasonably finite time.  Good on you, clever radio call-in man.