Tuesday, November 20, 2012

Derivatives, Velocity, and Acceleration

Calculus can be viewed as the study of rates of change of quantities.  The most familiar rate of change in our ordinary experiences is velocity as the rate of change of position.  As we ride our skateboards, bicycles, and cars, we understand that high velocities mean our position is changing quite rapidly; and we understand that when our velocity is zero, we are standing still.

So imagine the experience of a perfect rocket-car that experiences no friction and has no brakes.  The only way to change its velocity is with rocket blasters that are installed on either end of the vehicle.  Consider the following trajectory, illustrated as an animation, and repeating in a loop.  A timer (16 seconds) is also shown to provide a measurable sense of time.


The following table describes when and which direction the rockets are firing.

Time Interval Direction of Rocket Magnitude
[0,1) None 0
(1,3) Right Moderate
(3,5) None 0
(5,7) Left Large
(7,8) None 0
(8,12) Right Small
(12,16] None 0

In addition, the rocket-car is driving along a track which has positions marked so that we can think of the position as a variable (in meters).  That is, we can think of examining the relation between the variables of time and position.  The following table provides the position of the rocket-car as recorded at each second.

time (s) 0 1 2 3 4 5 6 7
position (m)   0.0   0.0   1.0   4.0   8.0  12.0  14.0  12.0 
time (s) 8 9 10 11 12 13 14 15
position (m)   8.0   4.5   2.0   0.5   0.0   0.0   0.0   0.0 

A table is only useful for a coarse overview of the relation between the variables.  For example, we can see that between t=2 s and t=3 s, the position went from x=1.0 m to x=4.0 m.  We can compute an average velocity over this time interval:


So the average velocity on this interval was 3.0 m/s.  However, this was during one of the intervals the rocket was firing.  It would have been going slower at the beginning of the interval and faster at the end.  The table does not give enough information for us to estimate the actual velocities.

Another representation of the relation between time and position is with a graph.

The derivative defines a new variable, dx/dt.  Although this looks like a fraction, we should really think of the entire symbol as the name of our new variable, the derivative.  This variable measures the rate of change of position x with respect to time t.  On the graph, this corresponds to the slope of the graph at each point.

For example, if I were to consider the point at t=2 s and x=1 m, we might draw the tangent line and measure the slope.  This slope is the derivative, which for this point corresponds to dx/dt=2.0 m/s.  Notice that the derivative is a velocity, which is precisely what the derivative measures for position with respect to time.  So we will use the variables v and dx/dt interchangeably.

We could compute the derivative for every point of the original relation.  This new variable could be added to our table.

time (s) 0 1 2 3 4 5 6 7
position (m)   0.0   0.0   1.0   4.0   8.0  12.0  14.0  12.0 
velocity (m/s)   0.0   0.0   2.0   4.0   4.0  4.0  0.0  -4.0 
time (s) 8 9 10 11 12 13 14 15
position (m)   8.0   4.5   2.0   0.5   0.0   0.0   0.0   0.0 
velocity (m/s)   -4.0   -3.0   -2.0   -1.0   0.0   0.0   0.0   0.0 

But it would be better, just as with our original relation, to consider the relation as a graph.  The figure below illustrates both graphs one above the other.

Notice that the velocity graph itself also has a slope at (nearly) every point.  The slope of a velocity graph is also a rate of change, measuring how the rate of change of velocity (m/s) with respect to time (s).  Consequently, the derivative dv/dt, which is called acceleration has units (m/s)/s, or more directly m/s2. (If velocity was measured in miles per hour, then acceleration might be measured as mph/s.)  We can use the variable name a=dv/dt.

Because our velocity is defined as piecewise linear, the acceleration will be piecewise constant.  On intervals where the velocity was constant, the acceleration will be zero.

Notice that the acceleration is directly related to our original discussion of the rocket-blasters.  When the rockets are blasting to the right, the acceleration is positive; when the rockets are blasting to the left, the acceleration is negative.  In fact, this is exactly the idea behind Newton's second law of mechanics, F=ma.  The rocket's thrust corresponds to the force F.  Newton's law simply states that the acceleration is proportional to the force.  The mass, which measures inertia, provides the proportionality constant. If we had the exact same rockets and the car had twice the mass, then the acceleration would be cut in half.

Because our rocket-car does not have brakes, the only way to slow down is to turn on the rockets in the opposite direction of motion.  In the language of derivatives, the acceleration must have the opposite sign from the velocity.  If the acceleration is the same sign as the velocity, then the effect of acceleration is an increase in the speed (the magnitude of velocity).

We close this reading by considering the effect of acceleration on the graph of position.  Slowing down corresponds to making the slope closer to horizontal.  Speeding up corresponds to making the slope steeper.  So, let us look at the original graph of position as a function of time, but marking the graph with different colors, depending on how the car is accelerating.
When the velocity and acceleration are opposite, I have marked the graph in red.  Notice that this is when the graph is becoming closer to horizontal (left-to-right).  When the velocity and acceleration are the same direction, I have marked the graph in green.  Notice that this is when the graph is becoming steeper (left-to-right).  When there is no acceleration, I have marked the graph in purple (straight lines).

To visualize this relative to the original animation, I have color-coded the timer and have placed a colored-flag on the car.  Try to connect the information in the graph to the visualization of the moving rocket-car.

Concavity is the word that describes how a graph bends.  When the second derivative (acceleration) is positive, the graph will be concave up.  On our graph, this corresponds to the first green segment, ∈ (1,3), and the last red segment,  ∈ (8,12).  When the second derivative is negative, the graph will be concave down.  This corresponds to the middle red and green segments,  ∈ (5,7).

Tuesday, November 13, 2012

Great Circles and Non-Euclidean Geometry

A few weeks ago, a few of my children were playing on the computer with Google Earth.  They wanted to see the aerial photographs of some our previous residences.  Then one of them wanted to measure exactly how far away we moved, when we moved from Mountlake Terrace, Washington, to Harrisonburg, Virginia.  So he drew a path connecting our previous address to our current address.

What jumped out at me was not the distance, but the heading—90.4 degrees, or almost exactly due east.  I was puzzled.  Wasn't Virginia at a lower latitude than Washington? So how could we be exactly east of Virginia.  Then I realized that Google Earth is calculated distance using great circles.

Here is a picture of the path.  Notice how the path bends.


A great circle is a path on the surface of a sphere such that the center of the sphere is the center of the circle.  My first instinct when I read the heading was 90 degrees was that the path followed a line of constant latitude.  That is, I would follow the compass heading of "East", keeping the north pole always exactly to my left.  The image (coming from Wikimedia Commons) below illustrates these lines as being "parallel" to the equator.  It also illustrates lines of constant longitude, which go from pole to pole.

The equator and lines of constant longitude are examples of great circles.  But the lines of constant latitude (other than the equator) are not, because their centers are shifted away from the center of the sphere.

How can you get other great circles?  One way is to choose any point on the surface of the sphere.  Then take a line and go through the center of the earth to the diametrically opposite point.  (Etymology: The word "diametrically" comes from the word "diameter;" great circles always have the same diameter as the sphere on which they are constructed.)  These two points will be on longitude lines exactly 180 degrees apart, which together form a great circle.  You can then hold your two points constant and rotate that great circle around the axis you created by joining the two points.

Trivia (also known as a Cool Math Fact):  Any great circle containing a point must include its diametrically opposite point.

Non-Euclidean Geometry

Now, let's talk about distance.  If you take any two points on the surface of the sphere, we want to find the shortest path between the two points.  In the geometry of the Greek mathematician and geometer Euclid, the shortest distance between two points is a line.  But what happens when we are constrained to paths on the surface of a sphere?

Imagine that you actually want to measure distance.  You might do this by taking a piece of string (on the earth, this would be a very long string) and lay it down along your path.  On this string, you could mark units of measure (like a measuring tape). When you arrive at your destination, you can just read off the distance of your path.  Wildly wandering paths would clearly involve a longer distance.

Given your path, you might want to see if you can improve it.  You could do this by trying to pull your string tighter, and sliding it around on the surface to see if you can use any less string to reach your point.  We have to imagine that the surface offers no friction, so that the string naturally slides toward a better path if it is available.  A path that can not be improved corresponds to an optimal path.

If we did our experiment of minimal paths on a flat table, then the optimal paths would follow Euclid's prediction of what we think of as straight lines.  But on a sphere, optimal paths always follow great circles.   The idea of non-Euclidean geometry is to consider lines not by our usual sense of straightness (whatever we think that means) but in terms of minimal paths.

In geometry, points and lines are basic elements, meaning they can not be defined from more elementary objects.  Euclid's geometry, which is our classical geometry based on what we think of as straight lines, is based on the premise that given any two points, you can use a straight edge (ruler) to draw a straight line.  And given any finite line segment, you can extend this line indefinitely.  But where does this infinite straight edge come from?

In non-Euclidean geometry, all we ever get are short straight edges.  We can only extend a line a little bit at a time, although we mathematically assume that we can do this perfectly, without any errors in aligning the straight edge to the rest of the line.

In Euclidean geometry, using a short straight edge repeatedly is identical to using an infinite straight edge.  But if we do our geometry on a curved surface (instead of a perfectly flat infinitely large plane), then using our short straight edge follows a path that locally looks straight.  But it has to follow the curving of the surface so that it does not look anything like Euclid's sense of a straight line.  On the surface of a sphere, a straight line that is formed by extending a short line segment with our short straight edge over and over again will be a great circle.

Where is this used?

Great circles are used to plan shortest paths for airline flights.  Talking about distance "as a bird flies" corresponds to paths along a great circle.

But non-Euclidean geometry has an even more fundamental role in understanding physics and light.  One of the basic principles of how light works is that it follows a path of least time (not distance).  The idea of refraction (why a stick looks like it bends when immersed in water) is a direct consequence of the fact that light travels through different substances at different speeds (slower through water than through air).  The amount of bending of the light's path can be exactly calculated by finding the path over which light takes the least time to traverse.

Curiously, sometimes there are multiple paths over which the light minimizes its time.  For example, the speed of light is faster in less dense air.  If air is heated, it expands and decreases its density.  So there are times when light can find a path with a greater physical distance but less time by choosing a path through warmer, less dense air.  Ripples that form a mirage on a hot road in front of you are evidence of these multiple paths.

Thinking about how light travels actually led to Einstein's development of relativity.  His theory of general relativity considers how light would need to travel if it was in a box that was accelerating.  By imagining that such a box is indistinguishable from a box that is subject to gravity, Einstein realized that light's path needs to bend as it passes through a gravitational field.

But the best way to think about these paths is by considering that light is actually always traveling in a straight line, just that the space in which it travels has a constantly changing sense of what is straight.  Further, Einstein realized that space and time are inseparably connected.  That is, light is moving in what is called the space–time continuum.  Gravity distorts this space–time continuum, and the way this is studied is through non-Euclidean geometry.

By the way, the answer to our original question: 2,257 miles.