Showing posts with label calculus. Show all posts
Showing posts with label calculus. Show all posts

Tuesday, March 27, 2018

The Genesis of Light

There's an old (at least, I assume it's fairly old) physics meme that goes:
“And God said…
\[\nabla\cdot\mathbf{E}=\frac{\rho}{\epsilon_\circ}\\
\nabla\cdot\mathbf{B}=0\\
\nabla\times\mathbf{E}=-\frac{\partial \mathbf{B}}{\partial t}\\
\nabla\times\mathbf{B}=\mu_\circ\mathbf{J}+\mu_\circ\epsilon_\circ\frac{\partial\mathbf{E}}{\partial t}\]
…and there was light.”
Here E is the electric field, \(\rho\) is the electric charge density, B is the magnetic field, J is the electric current density, and \(\mu_\circ\) and \(\epsilon_\circ\) are the permittivity and permeability of free space, respectively. Bold-face quantities are vector quantities. These four equations are Maxwell's equations which describe electricity and magnetism in terms of classical field theory, but more on that a little later.

Back in 2016 my parents took a trip to Israel and brought me back a shirt with this on it for Christmas, except in the original Hebrew. Pretty cool! Except, they weren't Maxwell's equations, and on a closer look they weren't actually equations at all, just collections of symbols that looked kinda like some equations from special relativity, and to top it off the shirt was just barely big enough for me so I never actually wore it.

But I loved the idea, and now (a little over a year later) I've created my own variation on the design and had a shirt printed with it:

This was a surprisingly difficult photo to take on my own.

Although known as Maxwell's equations (after the Scottish physicist James Clerk Maxwell, widely considered the third greatest physicist of all time after Newton and Einstein), these four equations are actually a reformulation of Maxwell's original twenty equations in twenty variables by Oliver Heaviside, who cast them into vector calculus form and condensed them down into four by use of the divergence (\(\nabla\cdot\) ) and curl (\(\nabla\times\) ) operators.

Being a classical description of electromagnetism Maxwell's equations have been superseded by quantum electrodynamics, but they are still very useful in a wide variety of situations that do not involve strong electromagnetic fields or individual photons, just as Newtonian gravitation is still a useful approximation to general relativity in areas of weak gravitational field.

These four equations, and what they represent, are a monumental achievement—second, at the time, only to Newton's work—and have a sublime beauty to the physicist. The seemingly-disparate forces of electricity and magnetism are revealed to be both aspects of a singular electromagnetic force. This is seen in the third and fourth equations, where curl (or rotation) of an electric field is seen to rely on a magnetic field, and vice versa. All four equations can be combined (in a vacuum, where J and \(\rho\) are both zero) to derive the electromagnetic wave equation which describes light as a series of correlated ripples in the electric and magnetic fields, or electromagnetic radiation. (In fact, it turns out that \(\frac{1}{\sqrt{\mu_\circ\epsilon_\circ}}=c\), the speed of light!)

The asymmetries between the electric and magnetic fields that at first glance might seem to mar the beauty of the whole only enhance it upon further inspection, as the minus sign in the third equation is crucial to forming the feedback loop in the electromagnetic wave equation that allows light to travel forever as self-contained photons. They helped motivate Einstein to develop special relativity (which Maxwell's equations are compatible with) to explain why the same phenomenon could be seen as an electric or a magnetic effect depending on the frame of reference chosen. And the second equation explains why you can't break a magnet in half and end up with two monopoles.

I used EqualX (which I wrote about last month) to typeset the equations in \(\LaTeX\), then exported them as SVG which I imported into Inkscape where I added the text (and did a lot of manual tweaking of the layout of the various elements to make it look nice). Switching my keyboard to Hebrew and figuring out the letters took quite a while, which is why there are no vowel pointings; Inkscape's support for right-to-left fonts is a bit fiddly (though I saw just the other day an update that supposedly improved it) and trying to figure out all the various pointings and getting them around the right letters was a nightmare, so I gave up after tortuously figuring out the first three. At least it's more authentic ancient Hebrew now…

While working on the design for this shirt (I uploaded five different versions to the printing site before I was satisfied) I thought sardonically to myself that I was making this shirt for my own enjoyment, and that of the perhaps five other people on the planet who understood both Biblical Hebrew and electromagnetism. Then lo and behold, the first day I wore it, while walking around Bunnings (basically Australian Home Depot) a gentleman stopped me, said he thought it was great, and asked where I'd gotten it. When I said I'd designed it and had it printed myself he then asked if I was selling it anywhere!

I ended up sending him the image file to use, but it got me thinking. I've gone ahead and uploaded the design to Spreadshirt.com, where I got the original shirt printed. You can find it (and a version in white for dark backgrounds) for sale on shirts here. It defaults to showing the men's styles, but there are women's styles as well and you can pick from a range of colors. (If any of you out there actually order one I'd love to hear about it!)

Monday, May 30, 2016

Roman Calculus

Ever get one of those crazy ideas in your head that just won't leave you alone until you let it out? Last week I got the exceedingly odd idea of doing calculus with Roman numerals, and couldn't get the idea out of my mind until writing this post.

There are plenty of good reasons why this is a poor idea and why Arabic-Hindu numerals superseded the Roman variants in general usage, which I appreciate a lot more after trying to use Roman numerals. I figured I could do some simple integrals using integers and fractions, so I looked up Roman numerals on Wikipedia to see if they had a system for doing fractions.

Turns out they did, and it is (if possible) even more complicated than their integer system, being a duodecimal (base-12) system instead of the decimal (base-10) system used for integers. (This was apparently in order to more easily handle the common fractions 1/3 and 1/4.) Basically, it used dots to represent 1/12, and the letter S to represent 1/2, and they would just add dots and S's as necessary. (Fractions smaller than 1/12 involved a whole collection of different symbols, many of which I've never seen before, and some that won't even display on my computer.)

The article didn't mention how to actually write fractions and integers, so I used a system where fractions to the left of an integer mean to multiply, while fractions to the right of an integer represent improper fractions. I decided to use y as the variable of integration rather than x, to avoid confusion with X, the numeral, but otherwise used modern conventions such as the integral symbol, the concept of exponents, and using dy for the differential (I considered DY, but that would conflict with D the numeral). The actual integrals used are fairly arbitrary, chosen to be simple but still complicated enough to be interesting.

Anyway, take a look at the madness that results, and feel free to check my work.

\begin{equation}
\begin{split}
\int_\text{I}^\text{IV}y^\text{II}+y+\text{I}\,dy &=
\left[::y^\text{III}+\text{S}y^\text{II}+y\right]_\text{I}^\text{IV}\\
&=\left(::\text{IV}^\text{III}+\text{SIV}^\text{II}+\text{IV}\right)-\left(::\text{I}^\text{III}+\text{SI}^\text{II}+\text{I}\right)\\
&=\left(::\text{LXIV}+\text{SXVI}+\text{IV}\right)-\left(::+\text{S}+\text{I}\right)\\
&=\text{XXI}::+\text{VIII}+\text{IV}-::-\text{S}-\text{I}\\
&=\text{XXXIS}
\end{split}
\end{equation}
\begin{equation}
\begin{split}
\int_\text{II}^\text{IV}y^\text{III}-y^\text{II}\,dy&=
\left[\therefore y^\text{IV}-::y^\text{III}\right]_\text{II}^\text{IV}\\
&=\left(\therefore\text{IV}^\text{IV}-::\text{IV}^\text{III}\right)-
\left(\therefore\text{II}^\text{IV}-::\text{II}^\text{III}\right)\\
&=\therefore\text{CCLVI}-::\text{LXIV}-\therefore\text{XVI}+::\text{VIII}\\
&=\therefore\text{CCXL}-::\text{LVI}\\
&=\text{LX}-\text{XVIIIS}:\\
&=\text{XLI}::
\end{split}
\end{equation}

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!

Saturday, January 14, 2012

Fun with Factorials

Edit (1/17/12): Due to a sharp-eyed reader, I've rewritten this post after some reflection to better show what's going on. I thought I was proving that \(0!=1\), when what I'm really doing is showing how defining \(0!=1\) is internally self-consistent with everything else about the factorial function.

Let's talk about the factorial function today. Factorials are a part of mathematics that show up in certain areas of calculus, but are simple enough to understand without it. Factorials are represented (somewhat unusually if you haven't seen it before) by the exclamation mark, like so: n! (Pronounced "n-factorial", not "n!" with a little exclamatory flourish when you say it, although you can do so mentally if you like to spice up your mathematics a bit.) A function just means that it takes an input (in this case, a non-negative integer) and produces an output (also an integer).

There is a formal way to define the factorial function, but we'll start with the "shortcut" way. For any (non-negative) integer n, the factorial is simply the product of the integer times each integer less than it. Thus \[2!=2\times1=2\]\[3!=3\times2\times1=6\] \[4!=4\times3\times2\times1=24\]\[\vdots\]\[8!=8\times7\times\dotsm\times2\times1=40,320\]\[9!=9\times8\times\dotsm\times2\times1=362,880\]\[\vdots\]
You may be wondering where this factorial function shows up in real life. It actually makes an appearance in a fairly mundane setting, namely, the number of ways you can arrange a set number of things into distinct patterns. Basically, if you n objects there are n! ways to arrange them. For instance, if you have two objects 'X' and 'Y', there are two ways you can arrange them (as 'XY' or 'YX'), which equals 2!. If you have 'X', 'Y', and 'Z', you can arrange them six ways, as so:
'XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'
which equals 3!. This idea of arranging things in a set is important, and we'll come back to it in a bit.

By now you've probably noticed a pattern with the results of the factorial function. The factorial of an integer is the product of the integer itself, times the factorial of the next smallest integer, for instance \(4!=4\times3!=4\times6=24.\ \) We can write this formally as:
\[n!=n\cdot(n-1)!\tag{1}\]
The factorial function is what's formally known as a recursive function, which means that each value is obtained by knowing a previous value. This is the exact opposite of the shortcut I gave above because it starts from small values and works up successively instead of working from the "top down", so to speak. If you follow this chain of reasoning, however, you'll realize that we need to know a value to start the whole recursive line off in the first place. In fact, we need two values, because of the presence of both \(n\) and \(n-1\) in equation (1) above.

Thus in practice, the factorial function can be completely described by equation (1) and two initial values, which for various reasons we choose to be the values of \(0!\) and \(1!\). In a sense we can define these initial values to be anything we want, but there's a catch: we want the factorial function to line up with what I mentioned before about arranging items. What values do we need to choose for \(0!\) and \(1!\) to make that happen?

It's probably not to hard to see that we should choose \(1!=1\). That makes sense, both in light of the shortcut I gave above (\(2!=2\times1\), so \(1!=1\) sounds good), and because if you have one item, you can really only arrange it one way.

The value of \(0!\), however, is a bit more tricky. How many ways can you arrange zero items? Is the question even well-defined? And more importantly, zero times anything is zero, so the value of \(0!\) can't be zero. You'll notice that in the shortcut method I used above, I didn't go all the way to zero, because doing that would result in zero for everything.  Instead, the value is chosen to be 1, so that \(0!=1\).

You might be wondering how this makes any sense, as I first did back in second semester calculus. While I could maybe buy the argument that zero items can be arranged one way, it still seems kind of nebulous. Is there anyway to show that choosing \(0!=1\) is consistent with what I said above about the factorial funtion?

As it turns out, there is. Let's start by taking another look the definition I gave above in equation (1): \(n!=n\cdot(n-1!).\) We can rearrange this by dividing by n on both sides to get \[(n-1)!=\frac{n!}{n}\tag{2}\]
Now, let's substitute \(n=1\) and see what we get.
\begin{align}
 (n-1)!&=\frac{n!}{n}\\
(1-1)!&=\frac{1!}{1}\\
0!&=\frac{1}{1}=1
\end{align}
Upon reflection I now hesitate to call this a proof, and consider it more of a demonstration of the internal self-consistency of choosing \(0!\) to be 1. The point is, having defined the values of \(0!\) and \(1!\) we can now go about using equation (1) to work our way up from zero:
\[0!=1\]\[1!=1\times0!=1\times1=1\]\[2!=2\times1!=2\times1=2\]\[3!=3\times2!=3\times2=6\]\[4!=4\times3!=4\times6=24\]\[\vdots\]
And now you know about the factorial function.

Friday, December 9, 2011

The Power of Calculus

Recently a classmate of mine asked for some help with a physics problem falling under the purview of classical mechanics, and I, not having had a chance to use the ol' calculus for a while, eagerly proffered it.

Start by imagining a jet fighter flying along at a supersonic speed, leaving a hyperbolic shock wave (the famous "sonic boom") behind it.

(Pretend the red dot is a jet fighter.)

Now, the only two pieces of information we have about this problem is that the angle the shock wave makes with the horizontal is 30\(^\circ\), and that the speed of sound in the surrounding air is 330 meters/second. Can we figure out the plane's speed using just this information? You're probably not too surprised to hear that, indeed, we can, through the power of calculus.

Calculus is, at its heart, a study of how things change in relation to each other. And what is speed, but a measure of how position is changing with time? In the language of calculus, we can represent this using differentials, which give rise to differential equations. Differentials themselves are odd mathematical beasts, whose existence has been hotly debated over the centuries since Leibniz first proposed them, but like good physicists we can ignore that aspect of their nature for this post and focus instead on how we can use them.

Let's assume the jet is moving in the positive \(x\) direction, so that we can represent the jet's position by \(x\). This is simply a function of time (we're assuming the jet moves at constant speed), so \(x=f(t)\). We don't know what \(f(t)\) is yet, but if we find it out, we can then differentiate \(x\) to get the speed. I'm going to gloss over how exactly we accomplish that (it's not too difficult, it just takes a while to explain), but it involves taking a differential of the variable on each side of the equation \((dx=f\,'(t)dt)\), then dividing one by the other to get a derivative,
\[\frac{dx}{dt}=f\,'(t)\tag{1}\]
Such a cavalier treatment of differentials is likely to drive any mathematician reading this crazy, but it works well enough for physicists. The prime (\('\)) on the \(f\,'(t)\) simply says that the function it represents (which we also don't know) is simply the first derivative of \(f(t)\). We could continue to take derivatives, but there's no need for this problem (a second derivative would tell us about the jet's acceleration, for example).

Equation \((1)\) can be thought of as the instantaneous change in the jet's position divided by an instantaneous amount of time. Since we can't attack this equation directly with the information we have, let's look at it from another angle. We know information about the shock wave the jet is leaving that could be helpful to us. To see how so, let's briefly review how a sonic boom forms.

When a jet is traveling at sub-sonic speeds, any noise emitted by the jet will be able to expand out from it in a circle. If the jet had a system that emitted brief "pings" several times a second, it might look something like this if you could see the pressure front of the sounds waves:


Note how the sounds waves are closer together in front, and farther apart in back. If you keep increasing the jet's speed, the wave fronts will get closer and closer to each other, until:


BAM! the jet exceeds the speed of sound, meaning that it is now leaving those expanding circles of sound behind as it out-races them. The expanding wave fronts naturally create a hyperbolic shape behind the jet, leading to a huge buildup of sound that all hits at once as the shock wave passes a point, leading to a sonic boom.

Now, from the problem, we know one piece of information about these circles: namely, that they expand at the speed of sound, 330 m/s. In the picture above I've drawn in a radius of the largest circle, call its length \(r\). How fast the length of \(r\) changes can be represented mathematically as
\[\frac{dr}{dt}=330\tag{2}\]
where the units are implicitly recognized to be m/s (although it is important to keep units in mind to make sure the answer we eventually get makes sense). If we want to know the length of \(r\) as a function of time, we can antidifferentiate it in a manner analogous to how we differentiated \(x\) a while ago. Although in more complicated case antidifferentiation is more an art than a science when done by hand, it's fairly simple for this simple equation. First we multiply by \(dt\) on both sides (again, making mathematicians wince), then antidifferentiate (which we denote with the special symbol \(\int\) ). Antidifferentiation "undoes" the action of differentiation in the same way that multiplication "undoes" division, and that fact is so important it's one of the Fundamental Theorems of Calculus.
\[\begin{align}
dr&=330\,dt\\
\int dr&=\int330\,dt\\
\int dr&=330\int dt\\
r&=330t\tag{3}\end{align}\]
Now, what this equation tells us is that the length of \(r\) is equal to the time (from some specified starting point) times 330. We could re-write it in a manner equivalent to equation \((1)\), \(r=g(t)\), except that in this case we know that \(g(t)=330t\).

So, we know how fast the shock fronts from the sound waves expand. How does this help us? Well, note that the radius creates a right angle to the shock wave surface (i.e., the circle is tangent to the shock wave where they meet). This means that we have a right triangle, and we know from the information provided that the smaller angle is 30\(^\circ\).

In the figure below I've redrawn this triangle with just the essential information. We have the two known angles (and by extension the third), \(r\), and \(x\). We know how \(r\) is changing with time (\(dr/dt=330\)); can we determine how \(x\) is changing?


We can, if we can figure out a relation between \(r\) and \(x\). From basic trigonometry we know that \(r=x\sin30^\circ\) (Strictly speaking this wouldn't be an actual triangle because the hyperbolic nature of the shock wave would mean that the right corner of the triangle would be rounded instead of pointy, but it's close enough to reality to be useful for this simple problem.). But from equation \((3)\) above, we also know that \(r=330t\). If we combine those two equations, and do a little algebra, we can figure out how \(x\) depends on \(t\), i.e., what \(f(t)\) is in equation \((1)\):
\[\begin{align}
330t&=x\sin30^\circ\\
x&=\frac{330t}{\sin30^\circ}=f(t)\tag{4}\\
\end{align}\]
Remembering our discussion from above, we know that we can find the speed of the plane simply by differentiating equation \((4)\). When we do that, we get
\[\begin{align}
x&=\frac{330t}{\sin30^\circ}\\
dx&=\frac{330}{\sin30^\circ}dt\\
\frac{dx}{dt}&=\frac{330}{\sin30^\circ}=f\,'(t)\tag{5}
\end{align}\]
(again setting mathematicians' teeth on edge). So the speed of the jet turns out to be \(330/\sin30^\circ=660\) m/s. We can sanity check our work by noting that this is greater than the speed of sound (by twice), as it should be since the plane is supposedly flying supersonically. We could also generalize this into a formula for any angle that the shock wave makes by replacing the 30\(^\circ\) by a variable (say, \(\theta\)). Then we would have
\[\frac{dx}{dt}=\frac{330}{\sin\theta}\tag{6}\]
which would allow us to calculate the plane's speed for any (valid) angle we could measure.

Now, you may be looking at that last equation and thinking to yourself that it's putting the cart before the horse, so to speak. After all, the angle of the shock wave is dependent on the speed of the jet, not the other way 'round \(-\) yet that's exactly what the equation seems to be saying. This is part of the beauty and power of calculus, that we can ascertain relationships among variables from unconventional directions. It all depends on what you're solving for. You could invert the equation to find the angle as a function of the speed like so,
\[\theta=\csc^{-1}\left(\frac{1}{330}\frac{dx}{dt}\right)\]
and it would be just as valid as equation \((6)\), and would  better reflect what's physically happening to boot, but as we've just seen that doesn't mean that equation \((6)\) can't be useful too.

So the lesson to take home is that calculus is an immensely powerful tool, precisely because it allows us to see the world in a different way, and one that allows us to unleash the full power of mathematics upon it. Calculus is, in my opinion, one of the seminal works of Western civilization, and one, moreover, that richly rewards its studiers. We could all, I think, stand to know a little more calculus.

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!

Sunday, April 25, 2010

Sights of spring in Hawai`i.

Wow...I can't believe it's been a whole week since I last wrote anything here. Rest assured, I am still here and have no intentions to stop blogging, I've just been really, really, busy. And when I had a brief respite, I really didn't feel like sitting down and writing. However! I'm writing now, and that's what counts.

Where to start...the main reason I was busy this week is because I had  Modern Physics homework due on Tuesday, an Electromagnetism take-home test due on Wednesday, my third and final Calculus 4 exam on Thursday, and Complex Analysis homework due as usual on Friday (which, thankfully, was moved to Monday, but I didn't know that until Friday morning).

Tuesday after turning in the Modern Physics homework I made a final push on the EM test. After the previous homework in that class, I was pleasantly surprised: it only took me 9 hours to do the last 8 problems on the test, and I got to go to bed just after midnight.
My feelings of mild happiness were quickly crushed the next morning when I handed it in, because not only did we get another homework assignment, but we got the last one back, where I found to my extreme dismay that I had made only 70%. That may possibly be the lowest grade I have ever got in college, and I was...displeased. I can only hope that the most recent test felt easy because it was and I was doing it right, not because I was doing it wrong...

Thankfully the calculus test went fairly well, small compensation for the worry I poured into it ahead of time, and as I mentioned the Complex Analysis homework was postponed till Monday. Equally thankfully, this week looks to be rather quiet, about the only big project I have coming up is finishing my paper and presentation for my project in Partial Differential Equations (which overlaps nicely with the test we have in Modern Physics on Tuesday).

Finally, in a lighter vein than recounting all my woes, I offer a sight of Hawaiian spring. Most of the plumeria trees have been blooming more than ever the last few weeks, including the one in our backyard. Here's a shot from the kitchen window, with the backyard and plumeria tree (yes, I know, our backyard is a bit of a mess...).

Friday, April 16, 2010

Excursions into the infinite complex plane.

So much has happened since I last wrote ... I'm still working on making sense out of it all.

Homework has been keeping me busy, as usual. I once again have several things due over the weekend, so I will be busy working on that. Between electromagnetism, partial differential equations, modern physics, and calculus IV, I have plenty to keep me occupied.
As if that weren't enough, I got my computer back from the campus tech guy, who was unable to find anything wrong with it other than the fact that the computer simply refuses to acknowledge the wireless module, and it still locks up, with no pattern that I can seem to figure out, yet in an oddly non-random way. I'm unsure which way to go at this point ... I hardly have time to deal with warranties and such, but I could really use my computer working fully as the end of the semester approaches.

Before I forget, I'd like to say a big 'thank you' to my aunt and uncle who were out here this week for everything -- the dinners were great, and the conversation and catching up were awesome. It was really nice to take a break and focus on something other than school for a while. So, mahalo nui loa! (thank you very much)

 In other news, I managed to solve another problem for my Complex Analysis professor today, which was the question of the convergence or lack thereof of the geometric series in the complex plane on the unit circle. If you don't know what I'm talking about, don't worry, you're not missing much. Infinite series and sequences are some of my least favorite subjects from Calculus II, and from the people I've talked to, many others feel exactly the same way. They inspire...strong feelings, to put it mildly. This is because they are very complicated, and most of the time you work with them is spent trying to figure out if a particular series converges or not. (Convergence means that if you add up an infinite number of terms from the series, you will get a finite number. Divergence simply means that you get infinity. This can be a surprisingly difficult thing to do) The geometric series is one of the few series for which you can actually find what it converges to; its terms look like \(x^n\), for n from zero to infinity. (Its first few terms are \(1 + x + x^2 + x^3 + ...\)) It is well known that for any x less than 1, the series  converges, while for any x greater than 1 it diverges. This is because its radius of convergence is equal to 1, and it turns out that every infinite series has such a radius, inside which it converges and outside which it diverges. On the real number line, the word 'radius' doesn't seem to make much sense, because there are only two points for the boundary, but in the complex plane it makes perfect sense because you are dealing with a plane in which numbers can approach from any direction, instead of merely from the left or right.
Anyway, in the real case, it can be shown that the geometric series diverges at \(x = 1\) and \(x =-1\), for different reasons. But that's only two points. The question in the complex case is, what happens for all the other infinite number of points on the circle of radius 1 around the origin? (written symbolically as \(|z|=1\)) However, there is a rather simple (once you see it) and elegant proof that the geometric series diverges for all \(|z|=1\), and I was able to be the inspiration for my professor that enabled him to discover it today (though as usual, the proof he came up with was much more elegant and simple than the clumsy one I had cobbled together). 

Thursday, February 18, 2010

It's a Wonderful Life

Today I learned that what I want to do with my life is arguably the most difficult subject ever undertaken by humans.

Joy.

My calculus professor, Dr. Ivanova, whom my cosmology professor Dr. Heacox pointed out as the most promising source of knowledge on the math I need, informed me that theoretical cosmology uses math so difficult even pure mathematicians avoid it.

Wonderful.

The reason for this disclosure is because today I decided that a directed studies program would likely be the only way for me to start learning the tensors that are so important in theoretical cosmology. I talked with Dr. Heacox first, who after pointing me towards Dr. Ivanova and offering to set me up with some books, remarked "It's a beautiful subject, but it hurts your head" (and he's been working with tensors in cosmology for over 40 years). Dr. Ivanova had more to say, because she's one of the few math faculty on campus who knows anything about differential geometry, the extremely high-level and abstract field of math in which tensors (and more exotic stuff) reside. Part of her remarks, along with much helpful overview information, were the aforementioned "Cosmology uses such heavy math, even pure, theoretical mathematicians avoid it", and that cosmology is so difficult, very, very few people have ever really understood it.

I have always had an idea that what I wanted to do was complicated, but never before truly realized the extant of what I had planned. It's like discovering that wanting to put up a shed in your back yard requires you to learn how to survey land, study atomic bonding theory, and be able to calculate strains in materials (which, incidentally, requires tensors for fullest treatment).

But she also said that anything less would be a waste of my mind, which I'm going to take as a compliment. It will be an interesting life, if nothing else...

Wednesday, February 3, 2010

In which earth-shaking things are revealed.

Yesterday...

How to begin? "Yesterday I learned a new mathematical operation"? "Yesterday I was taught something that rocked my knowledge of vector calculus to its core"? Or maybe "Yesterday I learned of mathematical quarks".

I'm sorry, it's a bit hard for me to explain, but yesterday I did have a very profound revelation in math as it relates to the commutativity of the dot product when one of the "vectors" is the del operator.

Oh dear, this is just getting worse, isn't it? Let me start by explaining that we have homework due in Electromagnetism. Most of the problems were fairly straightforward, if a little long and time-consuming. But there were two product identities that simply rebuffed all efforts to prove. This was the more downright bewildering because usually such proofs are very simple: just write out every single term explicitly, and cancel until you're left with zero on both sides of the equals sign. But these two repeatedly withstood every attempt, by me and several other people as well. My only thought was that I must be doing something wrong, but what? As far as I could tell, all the terms were correct, but in each proof I'd end up with 20 or more terms that wouldn't cancel.

But yesterday...

I and a classmate were working on the homework, and having finished the rest of the problems, were getting increasingly frustrated with our lack of progress, or indeed the lack of any conceivable way to make progress. I should mention that we were working in the main hallway in Wentworth Hall, the main Astronomy/Physics/Chemistry building on campus. We were venting our frustration by reviewing everything we knew about vectors and their operations from the beginning, our conversation going something like

"But that's a vector!"
"Right!"
"And if you dot a vector and the del operator, you get..."
"A scalar!"
"Right!"
"And if you multiply a vector by a scalar, you get-"
"-a vector." 

At which point Dr. Heacox, one of our professors from a different class happened to walk by and overhear us. With the desperation of two drowning sailors, we turned to him and poured out our troubles, about how the identities wouldn't work, and we must be doing something wrong, but what was it, and did he have any idea what was the problem was? To his everlasting credit, he stopped and came over to look, and in about 30 seconds had identified the problem: dotting the del operator with a vector is not commutative.

That's a rather complex statement, so I will explain. To be commutative in math means that you can do things in any order and it won't affect the results. For instance, addition is commutative: \(2+3=3+2\). So is multiplication: \(5*7=7*5\). But subtraction and division are not. \(3-4\ne 4-3\), and \(8/2\ne2/8\). Knowing whether an operation is commutative or not is very important.

You can think of vectors as essentially numbers with direction.  For instance, velocity is a vector. You can say things like "50 mph to the east", or "2 feet per minute straight up". Speed, in contrast, is a scalar, a number with no direction. Saying "50 mph" gives me no information about what direction this speed is directed towards. Many of the numbers we deal with in everyday life are scalars (like temperature, price, and speed). Others are vectors, like forces and accelerations (I almost said weight was a scalar, until I remembered that it does have a direction: towards the center of the Earth).

Anyway, the point of this is that the dot product (one of the two ways to multiply vectors) is commutative: \(A\cdot B=B\cdot A\). However, it is not commutative when one of the two "vectors" is the del operator. I put vectors is quotes, because the del operator is just that: an operator, not a vector (some operators you may be more familiar with are \(+, -, \times,\) and /  or \(\div\)). You are allowed to treat it like a vector for purposes of notational simplification, and so I (naively) assumed that it did indeed behave like a vector at all times. But what I learned, and what really rocked me to my core, is that \(\nabla\cdot A\) does not equal \(A\cdot\nabla\) (the del operator is the upside-down equilateral triangle. The actual symbol is called a “nabla”.). The quantity \(\nabla\cdot A\) is a very common mathematical and physical quantity, called the divergence of A, since it measures how much A is spreading out or contracting in. But \(A\cdot\nabla\) is another beast entirely. In fact, it is without physical meaning until multiplied by another vector. That's why I whimsically began this long rant by saying I had discovered a mathematical quark.

Quarks, in the Standard Model of physics (the most successful theory of matter that we have to date), are what make up certain sub-atomic particles like protons and neutrons. Both protons and neutrons are made up of three quarks, and when one of those quarks changes its type (from being, say, a 'down' quark to an 'up' quark) you can have a neutron change into a proton, or vice versa (extremely rare).

The catch is, quarks have never been observed by themselves in any experiment, so the best we can say, since they seem to fit all the data, is that quarks can never exist freely in nature. Much like the little mathematical beastie \(A\cdot\nabla\) which has no meaning until multiplied by a vector.

"Why is this such a big deal?" , you may well ask. I think the answer, for me, is a combination of the fact that I had never heard of this before -- had seen nary a mention of it in all the math classes I've taken so far. I had no inkling of its existence, yet there it was just waiting to be the solution to my problem. Also, the fact that I was rather...worked up when I learned it. I'd already spent over 4 hours over several days trying to get the one identity to work, and it was driving me crazy when all of a sudden...the answer just fell into my lap, as it were.

After dispensing this astonishing piece of knowledge, Dr. Heacox amiably bid us good day and went off to wherever he was going, while my classmate and I sat and tried to decide whether to laugh long and loud at our stupidity or go over and kick a wall, repeatedly. Unable to make up our minds, we settled for finishing the homework, which went over completely without incident after that (although it still took us an additional 2 hours).

So, that was that. Not especially life-changing to most of you I'm sure, but it was a very moving experience for me, as you can see by the length of this post. You can now go about your life with some interesting information about vectors (perhaps tomorrow I'll tell you more about the other way to multiply vectors, the cross product), while I ... will be taking Dr. Heacox cookies tomorrow.