home | index | units | counting | geometry | algebra | trigonometry & functions | calculus analysis | sets & logic | number theory | recreational | misc | nomenclature & history | physics

# Practical Formulas

### Related Links (Outside this Site)

History of Area Computing by Lianzhen Luo (under Prof. Stefan Langerman).
Area Measurement: Planimeters & Green's Theorem by Bruce Atwood.
Thaddeus Vincenty's algorithm:  Length of a geodesic on a spheroid  (1975)

## Practical Formulas

RN_Renee2003 (Missouri. 2002-07-08)
Conversions between Celsius and Fahrenheit scales:

If C is the temperature in degrees Celsius and F is the temperature in degrees Fahrenheit, then the following exact relation holds:

F + 40   =   1.8 ( C + 40 )

This allows an immediate answer to the trivia question: "What temperature is the same in both scales, Fahrenheit and Celsius?"  (Answer: "40 below";  -40°C = -40°F).

Incidentally, the freezing point of mercury is  -38.83°C  (-37.894°F).

Exact onversions are best performed mentally in the form given above,  where the sole nontrivial operation is a multiplication or a division by 1.8.  You always start a conversion  (either way)  by adding  40  and you finish it off by subtracting  40.

• To multiply by 1.8 (from C to F), you multiply by 2 (easy) and subtract 10% from the result (almost as easy and perfectly accurate).
• To divide by 1.8 (from F to C), you divide by 2 and add 10% to the result.  (11% is better, since the exact percentage is 11.11111...%)

For example, to convert 20°C you double 20+40 which gives you 120, subtract 12 (that's 10%) to obtain 108, and subtract 40 to obtain 68°F.  The result is exact and not much more difficult to obtain than the dubious approximations given by overly "simplified" formulas...

´1 .8=
¸1 .8=

With a simple calculator, exact conversions are performed either way in only 5 keystrokes, since it's easy to account for the simple 40° translation (the same in both scales) as you enter or read the data.

On the scale at right, two temperatures are singled out by  red lines:  One is the  freezing point  or  normal temperature  of exactly  273.15 K  (0°C = 32°F)  often used by physicists.  The other is the pervasive  standard room temperature  equal to  293.15 K  (20°C = 68°F)  at which most published thermochemical properties are recorded.

That caused  Nikon  to make an embarrassing blunder.  Their marketing department "updated" the technical litterature concerning the "guide numbers" of all their flash units.  They mistook an old specification of sensor sensitivity in term of  "DIN degrees"  for a standard identification of room-temperature...  Now, every Nikon brochure on that topic lacks the needed indication of basic sensor sensitivity but includes an utterly irrelevant indication of temperature,  duly converted to the Fahrenheit scale!

Another quick way to convert temperatures is to memorize [part of] the following table,  knowing that an increase of  5°C  corresponds exactly to an increase of  9°F...  Personally, that's what I usually do, having memorized only the entries shown in bold:

 °C 0 37 100 °F 32 98.6 212 -40 -35 -30 -25 -20 -15 -10 -5 5 10 15 20 25 30 35 40 -40 -31 -22 -13 -4 5 14 23 41 50 59 68 77 86 95 104

The  normal body temperature  (in humans)  is  37°C = 98.6°F.

A Brief History of Thermometry

(S. P. of Piscataway, NJ. 2000-07-15)
Can you determine the speed of a car by knowing the rpm of the motor, the gear [ratio] and tire [diameter]? If so, what is the formula? [...]

If D is the diameter of the tires, the car moves forward a distance pD with each revolution of the tires. If there are F such revolutions per unit of time, it moves forward at a speed of pD´F per unit of time. If D is in inches and F is in revolutions per minute (rpm), the above result will thus be in inches per minute! Now, there are 63360 inches in a mile and 60 minutes in an hour, so one inch per minute equals 60/63360 miles per hour or 1/1056 mph. Therefore, we have:

V(mph) = D(in) ´ F(rpm) ´ (p/1056)

In the automotive industry, the coefficient 1056/p is usually taken to be equal to 336 (it's actually 336.1352398...) and the formula corresponding to the above is memorized as:

(mph)(gear ratio)(336) = (tire diameter in inches)(rpm)

With the above numerical approximation, both formulas are identical if we consider that (rpm)/(gear ratio) is the rate of rotation of the tires. This means that the industry defines the gear ratio as the number of rotations of the driveshaft for each turn of the tire. This ratio is normally more than 1, except in overdrive gear. So, calling R this "gear ratio", your final answer is:

V(mph) = D(in) ´ F(rpm) ´ (p/1056) / R

or, approximately:     V = (D ´ F) / (336 ´ R)

where V is the velocity (in mph), D the tire diameter (in inches), F the engine rpm, and R the gear ratio (the number of engine revolutions for each turn of the tires).

(C. W.. of Grandy, NC. 2000-10-23)
If a car is doing 0 - 60 mph in 4.59 seconds, how far did the car travel?

Well, the most common way to answer this question is to assume that the car has a constant acceleration, in which case the distance it travels starting at zero speed is the same distance it would have traveled at a constant velocity equal to half the final velocity.  Here that's 30 mph times 4.59 s or, with the proper conversion factors:

(30 mi/h) (4.59 s) (h/3600 s) (5280 ft/mi)   =   201.96 ft   =   67.32 yards

Note the foolproof way of converting units, by introducing unity factors (like 5280 ft/mi) to cancel those units you don't want in the result.
Now, however, any engineer will tell you that acceleration is not constant, so the above answer is wrong in practice.  It just gives you a rough idea...

In theory, a rocket vehicle could have a very large acceleration at the very beginning and almost nothing after a small fraction of a second.  When that's the case the distance would be (almost) twice the above distance.

The opposite (silly) case is when you push by hand the above rocket vehicle for more than 4 seconds (moving it only a few feet, a few inches, or nothing at all), then the rocket fires up and reaches 60 mph in a fraction of a second, having traveled only a short distance in the process...

(Carlos of Jersey City, NJ. 2000-11-15)
[...] If my car can do a 1/4 mile in 15.9 seconds at 94 mph, how fast is it going at 0.1 or 1/10 of a mile? It accelerates to 60 mph in 7.5 seconds.

What you are asking is to give a point on a curve (speed as a function of time) about which we have preciously few properties. (A total of 3 points --including the trivial 0s,0mph-- and the overall integral between 0 and 15.9 s, which is 1/4 mile.) This is not enough to do a totally accurate job, but we can make a fairly precise educated guess:

First, let's dispose of the issue of units. If we measure times in seconds and speeds in mph, the consistent unit of distance is then the mph-second (mph-s), which is simply 1/3600 of a mile. A quarter-mile is 900 of these units, a tenth of a mile is 360, and the distance from the 1/10 mile point to the 1/4 mile point is 540. In particular, since a quarter-mile is 900 mph-s, the entire integral of our speed vs. time curve is 900.

For example, let's try a curve of the type V = C(1-exp(-t / T)), where V is the velocity and t is the ellapsed time (whereas C and T are some constants). With such a speed curve, the distance traveled in time t to reach speed V is Ct-VT = 900 for the quarter mile. The 1/4 mile in 15.9 s at 94 mph imposes [trust me!] the following parameters on such a curve (forgive the ludicrous precision): T=12.639196110577s and c=131.32606505623 mph. With this formula, you do a distance of 360 (that's 1/10 of a mile with our "weird" units) in 9.3475 seconds at 68.64 mph. That's our first approximative answer to your question. Note, however, that this approximation would mean a speed of only 58.775 mph is reached after 7.5 s or, alternately, that 0-60 mph is achieved in 7.715 seconds. Our crude approximation, is thus not too far from what your car is actually doing, but you may not like the 0.2s and/or 1.2 mph discrepancy.

I don't think I am far off in guessing that your car would do the 1/10 of a mile in 9.3 s at 69 mph but I could definitely use some raw data (acceleration curves of other cars, say) to fine-tune the above. I hope somebody will be able to provide this type of information.

A more elementary approach is to consider that, from the time t=7.5 s to the time t=15.9 s, the speed increases roughly linearly from 60 mph to 94 mph, at a steady rate of (94-60) / (15.9-7.5) = 85/21, or about 4.04762 mph/s.

With this assumption, the speed V reached at a time t between 7.5 s and 15.9 s is simply V=60+(85/21)(t-7.5). If  t  is the time when the 1/10 mile point is reached, the distance of 1/4-1/10 mile (or rather 540 mph-s with the "proper" unit introduced above) is simply the area of a trapezoid, and we have: (15.9-t)(V+94)/2 = 540. All told, this means that t is a solution of the equation

`540 = (15.9-t) [ 60+(85/21)(t-7.5) + 94 ] / 2`

The nonnegative solution of this quadratic equation is about 9.18431 s, corresponding to a speed V of about 66.8174485 mph. In other words:

Your car does the 1/10 mile in 9.2 s at 67 mph.

Overall, this more elementary approach may very well give a better, more reliable estimate, given the data at hand.

Hsuan Liu (2002-05-06; e-mail)
With 200 hp applied to a 2350 lb vehicle, what's the 0 to 60 mph time?

Answer: at least 2.57 seconds (see formula below), but this silly lower limit would be the correct answer only if 200 hp was the actual average mechanical power applied to the tires during acceleration [assuming no skidding and deducting the energy lost to friction]. Such an acceleration is next to impossible with current car technology: The current record 0-60 mph time is 3.07 seconds; it was set by a Ford RS200 Evolution (a 1986 "Group B" rally car) at the Millbrook Proving Ground (UK), in May 1994.

Therefore, what you have in mind is most probably not this kind of theoretical net power, but rather the rating most often listed by manufacturers, which is the maximum engine output. When the first version of this article was written, the fastest production car was the McLaren F1 pictured at right, whose 6.1 L engine was rated at 627 hp...

Several teams went after that crown.  Their efforts resulted in what the BBC show  Top Gear  called the "car of the decade" (for 2000-2009) :  The Bugatti Veyron, which reached 408.84 km/h  (254.04 mph)  on 2013-04-06.  The record-breaking  Grand Sport Vitesse  engine was rated at 1184 hp.

Here are a few actual examples which tell you what percentage [last column] of the rated maximum power is the actual average net power propelling the car over the 0 to 60 mph acceleration test whose duration is listed:

"Mass" is "Test Weight", namely "Curb Weight" + 160 lb driver.
VehicleMass
(lb)
Engine max
Power (hp)
0-60 mph
Time (s)
0-60 mph
Power (hp)
Average
/ Max.
Doran (gas version)1440 828.7036.244.2%
Tiburon GT V63183 1817.6091.650.6%
Jaguar XJR4176 3705.20175.747.5%
Shelby American 12810 3204.40139.743.7%
Ferrari 360 Modena32604004.30165.941.5%
McLaren F1 6.12739 6273.20187.329.9%
Ford RS200 Evolution27606003.07196.732.8%
Bentley Cnt'l Flying Spur56426004.70262.743.8%
(1)2350 2006.4380.040.0%
(2)2350 2005.8887.543.8%
(3)2350 2005.14100.050.0%
(4)2350 Too much!2.57200.0

The last four lines of the above table give the answer to your question, assuming the quoted power of 200 hp is one of the following:
(1) The rated maximum power, if the average is 40% of that.
(2) The rated maximum power, if we use the rule of thumb below.
(3) The rated maximum power, if the average is 50% of that.
(4) The actual average power applied. [Not a realistic assumption.]

Now, what's the formula and where does it come from? Well, if M is the mass of the car, and V is the speed reached from a standing start after applying an average power P for a time T, we have:

P T   =   ½ M V2

The work done over the time of acceleration (PT) is equal to the vehicle's kinetic energy (½MV2, if we neglect the rotational energy of the wheels).

The above formula is valid as is if we use any consistent set of units (for example, P in watts, T in seconds, M in kilograms, and V in meters per second; 60 mph = 26.8224 m/s). If, however, you insist on having P in horsepowers (1 hp is exactly 745.699871582 W, or just about 745.7 W) and M in pounds (1 lb is exactly 0.45359237 kg) at a speed of 60 mph (26.8224 m/s), the above formula becomes:

(P/hp)(T/s) / (M/lb)   =   1072896 / 4903325   =   0.2188098892...

So, if (P/hp) is 200 and (M/lb) is 2350, the 0-60 time in seconds (T/s) will be such that 200 (T/s) / 2350 = 0.2188.... In other words, T is 2.571016... s, as unrealistically advertised.  Divide this time by 0.4 to obtain T = 6.42754... s, if the value of 200 hp reflects the maximum engine power and you estimate the actual average net power to be only 0.4 = 40% of that.

### Rule of Thumb:

If you live in the pounds-and-horsepowers world and want to memorize a simple rule-of-thumb formula, just assume that the average power is about 43.76 % of the rated power, so everything boils down to the following approximation:

(0-60 time in seconds)   »   ½ (test weight in lb) / (rated engine power in hp)

Recall that:     test weight  =  curb weight + weight of the driver (160 lb)

Anonymous query via Google (2004-11-23)   Power to Speed Ratio
Horsepower to thrust conversion... [at a given speed along the thrust]

The power  P  of a force (thrust)  F  applied to an object moving at velocity  V  is obtained by dotting  F  into  V :

P   =   F . V

When thrust and velocity do not have the same direction, the two quantities on the right-hand side must be considered to be vectors (which is why they're shown in bold) and the product is understood to be a scalar product, or "dot product".  We call speed V the magnitude of the velocity vector V, whereas the "speed along a certain direction" (v) is the projection of the velocity vector on that direction.  In what follows, "v" is the speed along the direction of the thrust, and q is the angle between thrust and velocity:

P   =   F V   =   F v   =   F V cos(q)

The above equation is directly applicable if a consistent system of units is used:  The proper SI units for power, thrust and speed are, respectively, the watt (W), the newton (N) and the meter per second (m/s).  With any other mix of units, an extra numerical factor appears, which can be obtained by introducing standard ratios equal to unity  (like 5280 ft / mile).  For example, using the horsepower (hp), the pound-force (lbf) and the "mile per hour" (mph) as units, we have:

 (P/[hp]) [hp]/[W] = (F/[lbf]) [lbf]/[N] (v/[mph]) [mph]/[m/s] (P/[hp]) [550 ft lbf]/[J] = (F/[lbf]) [lbf]/[N] (v/[mph]) [5280 ft / 3600 m] This boils down to: 375 (P/[hp]) = (F/[lbf]) (v/[mph])

The thrust  (in lbf) is thus 375 times the power to speed ratio  (in hp per mph).

The thrust is  zero  for a car at cruising speed  (or at top speed, which is cruising speed at full throttle):  The engine's power is then entirely used to overcome friction and air resistance, leaving no net power  (P)  to accelerate the vehicle.

Ahsin Sattar (2004-06-29; e-mail)
How does the volume [in cc] of an engine relate to its power [in hp]?

With a given technology, an engine has to have a certain size to produce a given power.  Usually, only usable forms of power are considered:  mechanical or electrical power, but not power wasted as heat.

In an internal combustion engine, the "size" of each cylinder is universally understood to be the maximum volume of its combustion chamber  (the total size of the engine is, of course, the sum of the sizes of its cylinders).  This is most commonly given in cubic centimeters (cc), liters (1 L = 1000 cc) or cubic inches (1 cu in = 16.387064 cc).

In automotive parlance, the  bore  is the cross-sectional area of a piston and the  stroke  is the distance it is allowed to travel.  Multiplying bore by stroke gives the  swept volume  which is the difference between the maximum and the minimum volume of the combustion chamber;  the ratio of those two quantities is the  compression ratio.

The power of an engine is best given in watts (W) but manufacturers most often rate it in horsepowers, of which there are (unfortunately) two flavors; the Imperial horsepower (hp) is about 745.7 W whereas the "metric" horsepower (ch) is about 735.5 W.  The manufacturer's power rating corresponds to the maximum power output at some optimal regime.  This regime is often stated using "rpm" as the frequency unit ("revolution per minute" = 1/60 Hz).

The power-to-volume ratio depends very much of the engineering and technology involved.  For example, the French legal upper limit for a "125 cc" motorcycle is 15 ch, which corresponds to a ratio of 0.12 ch/cc, or precisely 88.25985 W/cc.  Typically, 125 cc "street" motorcycles are rated around 70 W/cc, but this can be as low as 50 W/cc.  On the other hand, high-performance 125 cc competition engines have been rated as high as 34 ch (200 W/cc)...

Mark Nance (2005-05-10; e-mail)
What's the optimal gear ratio to maximize top speed on a flat road?

At uniform speed, no power is used to accelerate the car.  Instead, the engine's mechanical output (whatever is not directly wasted as heat) is used to overcome mechanical resistance from the following sources:

• Powertrain between the engine and the gearbox.
• Powertrain between the gearbox and the wheels.
• Periodic deformation of the tires.
• Contact between the tires and the road.
• Air resistance (assuming no wind with respect to the road).

Without lubrication [!] the dry frictional forces for moving parts would be roughly constant and the power lost to these would be proportional to how fast they rub against each other, or against their bearings.  With  good  lubrication, such "raw" friction is greatly reduced and what dominates (except at low speeds) are so-called  viscous  forces of magnitude proportional to the speeds involved, entailing a smaller power loss proportional to the square of that.  The relevant speeds in the powertrain are proportional  either  to the engine's rpm  (between engine and gearbox)  or  to the car's speed  (between gearbox and wheels).

For simplicity, we'll just assume that the power lost  inside  the gearbox is approximately the sum of two components:  One of each of the two types presented above for the rest of the powertrain.

The deformation of the tires produces heat at a rate proportional to its frequency:  This power loss is thus proportional to the speed of the car (similar to what would be unlubricated friction in the powertrain after the gearbox).  A rough idea of this effect's magnitude may be obtained by comparing fuel efficiencies under controlled conditions, when the tires are properly inflated and when they're not.

Air resistance is a complicated thing but it has two main components:  The viscous one is only significant at very low speeds.  The other component is essentially a  quadratic  effect, involving a drag force proportional to the square of the car's speed  (its power is thus proportional to the  cube of the speed).

All told, let V be the top speed of the car for a gear ratio R, and P(x) the power output [full throttle] of the engine at x rpm  (x = kRV for a constant k which is inversely proportional to the diameter of the tires, as discussed above).  We have

P( kRV )   =   a R2 V2 + b RV + c V 3 + d V 2 + e V

In this equation, the constant coefficients  k,a,b,c,d,e  are characteristics of the vehicle (a, b and c  don't  depend on tire size).  For a given R, the vehicle's top speed is obtained by solving this equation.  At the optimal gear ratio R for which the top speed V is greatest, a minute increment dR wouldn't change V  (i.e., dV = 0)  so the derivatives of both sides with respect to R are equal.  Dividing both sides of the resulting equation by V, we obtain:

k P'( kRV )   =   2 a R V  +  b

Solving the above two equations simultaneously gives the optimal gear ratio R, for which the greatest top speed V can be obtained.  This requires detailed knowledge of your engine (the function P) and of both parts of the powertrain.  Not to mention the vehicle's aerodynamics  (the drag coefficient we called "c").

You may acquire the relevant knowledge with 5 actual measurements of the top speed of the vehicle, under engine conditions that you can reproduce on the bench  (for example, full throttle with 5 different gears).  Reproducing the rpm and fuel intake on the bench allows you to measure the actual engine output in these 5 cases.  This leaves you with 5 instances of our first equation, which form a  linear  system that yields easily the values of its 5 unknowns  a,b,c,d,e  (the coefficient k being known from other considerations).

Once this is done, you still have to solve the two  nonlinear  simultaneous equations mentioned above...  This requires only a plot of the P function near the expected solution, from bench measurements or manufacturer's data.

 On 2005-05-11, Mark Nance wrote: You are awesome!  Thank you for [posting] that information for myself and everyone.  I have donated to your website to help keep it going.  Great information.  Thank you so very much!

Joshua P. Gatcomb (2002-07-15; e-mail)   Heron's Formula   (c. AD 50)
When I was in middle school, I found a way to derive the Law of Cosines from Heron's formula [details attached, in 20 steps]...
Have you seen it done this way before?

Yes  (in the backward sort of way described below).  Congratulations for rediscovering by yourself this connection between the two formulas, though.

Heron's formula  (or  Hero's formula )  gives the surface area  (A)  of a triangle of sides  a, b, c  and of  semiperimeter   s  =  ½ (a+b+c).

Heron's Formula
 A2   =   s (s-a) (s-b) (s-c)

One way to derive Hero's formula is to start with the common expression for the area A, namely:  A = ½ ah,  where  h = b sin g   is the height of the triangle (of base a) and g is the angle between a and b.  We have:

 A2 = (½ ab)2 sin2 g     =     (½ ab)2 - (½ ab cos g)2 = (½ ab)2 - (¼ [ a2 + b2 - c2 ] )2           [ Law of Cosines ] = (½ ab - ¼ [ a2 + b2 - c2 ] ) (½ ab + ¼ [ a2 + b2 - c2 ] ) = [¼ c2 - ¼ (a - b)2 ] [¼ (a + b)2 - ¼ c2 ] = [ ½(c - a + b) ½(c + a- b) ]  [ ½(a + b - c) ½(a + b + c) ] = [ (s - a) (s - b) ]  [ (s -c) s ]

The whole thing may be used backwards:  If Heron's formula is assumed, the last equality holds and the above manipulations thus prove the equality on the second line without invoking prior knowledge of the Law of Cosines.

So,  Heron's formula  does imply the  Law of Cosines,  with a sign ambiguity which must be lifted by other means  (since we've only equated the squares of two quantities here, they could be either equal or opposite).  However, this would really be  backwards,  because the  Law of Cosines  is considered far more fundamental than  Heron's Formula  (a.k.a. Hero's Formula).

Heron's steam engine (Aeolipile)   |   Heron of Alexandria (c. AD 10-75)

(2014-09-24)   Archimedes' formula for the area of a triangle.
A form of  Heron's formula,  attributed to  Archimedes  by  Al-Biruni.

The above introduction of the semiperimeter  (s)  isn't necessary.  Heron's result can be expanded in terms of the  (squares of)  the three sides only.  Al-Biruni claimed this was known to Archimedes,  3 centuries before Heron:

(4 A) 2   =   2 a 2 b 2  +  2 b 2 c 2  +  2 c 2 a 2  -  a 4  -  b 4  -  c 4

We may recast that more economically  (with two fewer multiplications) :

Archimedes' Formula for the Area  (A)  of a Triangle
 (4 A) 2   =   ( a 2  +  b 2  +  c 2 ) 2  -  2 ( a 4  +  b 4  +  c 4 )

Even more economical asymmetrical expressions can be given  (which, incidentally, are generalized to quadrilaterals by Bretschneider's formula):

(4 A) 2   =   4 a 2 b 2  -  ( a 2  +  b 2  -  c 2 ) 2

Applying standard factorizations to this, we could easily retrieve  the aforementioned usual form of  Heron's formula,  which restores symmetry and the utmost computational economy  (only 3 multiplications).

The Canadian mathematician  Norman J. Wildberger  (UNSW Australia)  has given the above formula a central rôle to express collinearity  (A=0)  in his own reformulation of  Euclidean geometry  (and "hyperbolic" geometry).  Wildberger systematically replaces distances with their squares  (dubbed  quadrances )  and angles with their squared sines  (dubbed  spreads ).  Unfortunately, he takes this little game way too seriously  in support of backwater finitism...

(2002-07-15)   Surface Area of a Spherical Triangle
Lhuilier's formula generalizes Heron's formula to spherical geometry.

In spherical geometry, the sides of a triangle are arcs of  great circles  (the radius of a great circle is equal to the radius of the sphere).  Normally, the radius of the sphere is used as a  natural unit of length  (so, the length of every side of a spherical triangle is between  0  and  2p ).

There is a beautiful counterpart of  Hero's formula  which gives the surface area  A =  e R2  of such a  spherical triangle.  It is due to the Swiss mathematician Simon Lhuilier (1750-1840):

Lhuilier's Theorem
 [tg(e / 4)]2   =   tg[s / 2]  tg[(s-a) / 2]  tg[(s-b) / 2]  tg[(s-c) / 2]

e  is (also) equal to the  "spherical excess"  of that spherical triangle, namely the angle by which the sum of its three angles exceeds p.

The locution "spherical excess"  (French:  excès sphérique)  was coined around 1626 by the French-born Dutch mathematician Albert Girard (1595-1632) who, incidentally, contributed to the popularity of  Fibonacci numbers  (0,1,1,2,3,5,8,13,21,34,55,89...)  by  defining  them inductively:

F0 = 0;   F1 = 1;   ...   Fn+2  =  Fn+1  +  Fn     (A000045)

Girard  is also remembered for discovering the  Girard-Waring expansions  more than 130 years before Waring.

(2002-07-16)   Brahmagupta's Formula  (c. 620)
How does Heron's formula generalize to quadrilaterals?

Brahmagupta's formula states that   A2  =  (s-a)(s-b)(s-c)(s-d),   where A is the surface area of a  cyclic  quadrilateral  (i.e.,  a quadrilateral  inscribed in a circle )  of sides  a, b, c, d  and of semiperimeter   s  =  ½ (a+b+c+d).

That formula was devised around AD 620 by the Indian mathematician Brahmagupta (AD 598-668), as a generalization of Heron's formula  (d = 0).

 Brahmagupta didn't give a proof of his formula and never mentioned that it was only valid for quadrilaterals which can be inscribed in a circle.   Pierre Dedron (1887-1970) and Jean Itard (1902-1979)  point out  (Mathématiques et mathématiciens, p. 126,  Magnard 1972)  that al-Biruni (973-1048)  was the first mathematician who insisted that the formula is only good for  cyclic  quadrilaterals.

The formula can be generalized to  any  quadrilateral by introducing an angle  q  equal to the half-sum of either pair of opposite angles:

 A2   =   (s-a)(s-b)(s-c)(s-d)  -  abcd (cos q)2

For a  cyclic quadrilateral,  we have  q = p/2  and the second term  vanishes.

(2003-12-08; e-mail, name withheld )   Bretschneider's Formula   (1842) Does the above relation give the area (A) of a quadrilateral in terms of its sides (a,b,c,d) and diagonals (p,q) without any restrictions?

The short answer is:  Yes.  This formula was established in 1842 by the German mathematician  Carl Anton Bretschneider  (1808-1878)  an author who earned a living as a high-school teacher in Gotha (Thüringen).

The same formula was apparently obtained independently by two other mathematicians in the same calendar year (1842):  Karl von Staudt (1798-1867)  and F. Strehlke.  Among the many people who rediscovered this formula or published related ones are:  Dostor (1848)  and  Julian Lowell Coolidge (1939).

Bretschneider's Formula does hold for  convex  quadrilaterals and  concave  chevrons, and it's also good for  [the signed areas of]  crossed quadrilaterals.

A "crossed quadrilateral" is a butterfly-shaped figure which looks like two opposed triangles  (sharing a non-vertex point where two edges cross).  Travelling along the four edges of such a quadrilateral, we encircle one triangle clockwise and the other counterclockwise...

The area of a crossed quadrilateral is thus usually defined as the difference between the areas of the two triangles and Bretschneider's formula does indeed give  [the absolute value of]  that quantity.

Proof :   Let's call a and b the angles from a diagonal (p) to each of the two adjacent sides a and b (for convex quadrilaterals, these two angles have opposite signs, but this need not be so for other quadrilaterals).  The area of the quadrilateral is either the sum or the difference of the two triangles of base p.  More precisely:

A   =     ½ p   | a sin a  -  b sin b |

The Law of Cosines gives the 3 relations:

• d 2   =   a 2  +  p 2  -  2 a p cos a
• c 2   =   b 2  +  p 2  -  2 b p cos b
• q 2   =   a 2  +  b 2  -  2 a b cos (a-b)

Therefore:

4 p2 q2  -  (a 2 - b 2 + c 2 - d 2 ) 2
=   4 p2 q2  -  ( 2 b p cos b  -  2 a p cos a ) 2
=   4 p2  [ a 2  +  b 2  -  2 a b cos (a-b)  -  ( b cos b  -  a cos a ) 2 ]
=   4 p2  [ a 2 sin2 a  +  b 2 sin2 b  -  2 a b sin a sin b ]
=   ( 2 p [ a sin a  -  b sin b ] ) 2     =     (4A) 2

 A   =   ¼ Ö 4 p2 q2  -  (a2 - b2 + c2 - d 2 ) 2

For the record,  Bretschneider's Formula is only the  simplest  of infinitely many ways to express the area of a quadrilateral in terms of  [ the squares of ]  its sides and diagonals, since those six quantities are linked by the following polynomial relation  ( p is the diagonal joining the corner of a and b to the corner of c and d, while q is the other diagonal):

p2 q2 [ a2 + b2 + c2 + d2 - p2 - q2 ]   =
p2 (a2 - b2)(d2 - c2)  +  q2 (a2 - d2)(b2 - c2)  +  (a2 - b2 + c2 - d2)(a2c2 - b2d2)

(That's a  quadratic  equation in the square of  every  length involved.)

(2007-09-20)   Vectorial area of a triangle... or a quadrilateral :
The area of a quadrilateral is  half  the cross-product of its  diagonals.

The area of a triangle is half the length of the cross-product of two of its sides.  A straight consequence of this well-known fact is that the area of a (planar) quadrilateral is half the length of the cross-product of its  diagonals  (itself twice the vectorial area).

Proof :   A planar quadrilateral  ABCD  consists of two triangles  ABC  and  ACD  whose  area vectors  are collinear  (so that the sum of the lengths is the length of the sum).  Twice the  area vector  of  ABCD  is thus:

2 S   =   AB´AC + AC´AD   =   AB´AC - AD´AC   =   DB ´ AC

Kristiana Kandere-Grzybowska (2004-05-17)       Parabolic Segments
[In my postdoctoral work in cell biology, I need to estimate] the area of a modified triangle with one convex side and two concave sides. [...]

The simplest approach is to consider that such sides are have the shapes of parabolas  (not necessarily symmetrical with respect to the straight sides).  The surface between a parabolic arc and its chord is called a parabolic segment  and has an area equal to 2/3 of the length D of the chord multiplied by the "height" H  (the largest distance from the chord to a point on the arc).

To obtain the area of the "curved" triangle, the above result for each of the three sides is added to, or subtracted from, the area of the "straight" triangle.

### Two millennia before "Calculus"...

The formula for the area of a parabolic segment predates "Calculus" by almost two millennia.  The squaring of the parabola is attributed to Archimedes of Syracuse, who first showed in an "elementary" way (using an intuitive notion of limit) that a parabolic segment has 2/3 the area of its circumscribed Archimedes Triangle (whose sides are the chord and the two extreme tangents).

The surface area of a parabolic segment depends only on the chord length (D) and the height (H) because all parabolic segments of given D and H are obtained from each other by a  shear  linear transform  (about a direction parallel to the chord)  which preserves areas  (by the first Cavalieri principle concerning planar areas).

A   =   2/3  H D

schmeelke (2002-01-27)
If I know the dimensions of a cylindrical tank on its side [the axis of revolution is horizontal] and can measure the depth of the liquid inside, how do I calculate the volume of liquid present?

Let R be the radius of the tank, L its length and H the height of the liquid in it. Consider a (circular) vertical cross-section of the tank and call q the angle (from the center O of the circle) between the vertical and the line OF, where F is one of the two points where the horizontal line representing the surface of the liquid meets the circle representing the wall of the tank [see figure at right].

We clearly have R-H = R cos(q), which means q is equal to arccos(1-H/R) and is thus readily obtained using the proper inverse trigonometric function on a scientific caculator. [Angle q must be expressed in radians and is thus between 0 and p; don't forget to multiply a result in degrees by p/180, if applicable.]

The surface area corresponding to the liquid in that cross section is obtained as the difference of areas between a circular sector (a pie portion) and a triangle, namely q R2 - (R-H)Ö(H(2R-H)). Just multiply this area by the tank's length L to obtain the formula for the volume V of the liquid in the tank, namely:

V   =   L [ R2 arccos(1-H/R) - (R-H)Ö(H(2R-H)) ]

This formula is perfectly valid for the whole range of H (from 0 to 2R), although the above "visual" explanation (involving the "difference of two areas") assumed that H was less than R (tank at most half-full). The formula could have been obtained symbolically without splitting cases. I'll leave it up to you to "visualize" the other case (where the area of a circular sector is to be added to that of a triangle of height H-R), should you feel the urge to do so.

Follow up : What if the tank is spherical? [Volume of a Spherical Cap]

zchas40 (2002-05-14) [...]
How much water is 2 cm in a hemispherical bowl 3 cm in radius?
Rick94602 (2002-05-16) [...]
What's the volume of the bottom part of a sphere?

The vertical cross section [pictured at right] is the same as above.  The portion of the sphere involved is called a spherical cap and its volume V is obtained as:

 óõ q0 p R3 sin3a da   = óõ RR-H p ( R2 - u2 ) du

In other words,     V   =   p H2 ( R - H/3 ).

[ For the record, the surface area is   S  =  2pRH. ]

If R is 3 cm and H is 2 cm, the volume of water in the "hemispherical bowl" expressed in cm3 (cc or mL, same thing)  is 28p/3  or about 29.32 cc.

What about an ellipsoid of revolution on its side? [horizontal axis]

This will be useful to make short order of the next question...

We may observe that squeezing or stretching a spherical tank along any horizontal direction turns the sphere into an ellipsoid with principal radii R, R, and W (for some W). Furthermore, for any height H of the liquid, the volume in the elliptical tank is simply W/R times what it would be in the spherical tank.

In other words,     V   =   p H2 W ( 1 - H/3R ).

Note that stretching along two horizontal directions would be just as easy, if you ever need to derive a more general formula for any elliptic tank, as long as one of the principal axes of the ellipsoid is vertical. For the record, if R is the vertical radius and W and L are the horizontal ones, the general formula is simply:  V  =  p WL ( 1 - H/3R ) H2/ R
Daniel Trottier (2002-04-26; email)
[...] A horizontal vessel consists of a cylinder equipped with bell ends. These caps sealing the ends of the cylinder are elliptical in shape. (Removing the cylinder middle section, you would have an ellipsoid of revolution.) What is the volume of liquid in the vessel, as a function of the height of the liquid?

If L is the length of the cylindrical section of radius R, and W is the "width" of the end caps [W would be equal to R if those caps were spherical], then the volume V corresponding to a height H of liquid is simply obtained by adding the two volumes described in the two previous articles, namely:

V   =   L [ R2 arccos(1-H/R) - (R-H)Ö(H(2R-H)) ] + p H2 W ( 1 - H/3R )

As usual, we assume that the result of an inverse trigonometric function (like arccos) is given in radians. Do not forget to multiply a result in degrees by p/180, whenever applicable.

(2003-12-08)
What's the volume of a truncated cylinder?
What's the volume of a [triangular] prism with tilted [nonparallel] bases?

The [American Heritage] dictionary defines a cylinder as "the surface generated by a straight line intersecting and moving along a closed planar curve".  When the planar curve is a polygon, this is also called a prism.  However, both names are more commonly used for the solid bounded by two parallel planes and such a surface.  The two planar faces are called bases and the cylindrical surface between the planes is called the lateral surface.

It turns out that a general expression can be given for the volume of such a solid even when the bases are not parallel to each other.  We only need to know the surface area (S) of a cross-section [namely, the intersection with a plane perpendicular to the lateral direction] and the average height (h) of such a solid.  The volume (V) of the solid is then simply given by:

V   =   h S

The only delicate part is to specify how the average height (h) is obtained.  Well, we only need to know the position of the centroid of the cross-section (that would be the barycenter or center of mass of the surface if it was cut from an homogeneous planar sheet).  This is particularly easy to find if the cross-section is triangular, or if it is symmetrical enough (circle, ellipse, regular polygon, parallelogram, etc.).  Draw a line parallel to the lateral direction through this centroid.  This line intersects the two bases at two points and the distance between these two point is the quantity h used in the above formula.

Of course, if either base is tilted by an angle q, its surface area A is S/cos(q).  If  the two bases are parallel to each other, the distance d between their respective planes happens to be  h cos(q).  Thus we have

V   =   d A

This is a more commonly quoted formula, but it's only good for parallel bases...

(2004-03-24)     Conical Frustum
What's the volume (V) of the part of a cone between parallel bases of areas B and b ?

 V   =   (H/3)  [ B + b + Ö Bb ]

In this, B and b are the surface areas of the two homothetic planar bases (which need not have any specific shape), whereas  H  is the solid's  height  (the distance between the two planes of the bases).

The above French cartoon by Gotlib [text by René Goscinny] is from a  Dingodossier (crazy file) about the flu, featuring an average student  without  a first name:  l'élève Chaprot.  Chaprot's ability to repeat this formula flawlessly is presented as a sure symptom of the flu...

### Comical Frustum:

The formula was no longer taught systematically to French schoolchildren during the golden age of French comic strips (spearheaded by Pilote, the weekly magazine which published the above in 1967).  However, it had been a staple of French elementary mathematics at a time when authors Goscinny (1926-1977) and/or  Gotlib  (Marcel Gotlieb, b.1934-07-14)  were schoolboys...

Incidentally, René Goscinny was born in Paris but was educated in the French School of Buenos Aires, where his father (d.1942) taught mathematics.

Français de l'étranger WebRingSite? Previous 5 Sites << Previous
 Next
>> Next 5 Sites

The French Lycée of Warsaw (Poland) has been named after René Goscinny, in part because of his Polish ancestry:  He was the grandson of Rabbi Abraham Goscinny of Warsaw.  René Goscinny was also the grandson of Abraham Beresniak, who authored a 1939 Yiddish/Hebrew dictionary published in Paris.  In spite of this, Yiddish is not one of the 107 languages currently spoken by Astérix, the most famous of the 2120 characters created by René Goscinny,  in 18 different series  (a total of over 500 000 000 comic books sold).

The Polish roots of René Goscinny were pointed out to us by the current (2005) Consul General of France in Los Angeles, Philippe Larrieu, formerly stationed in Warsaw (1994-1998).  We thank his Deputy, Olivier Plançon, for many fun discussions about French comic books of the golden age.

Astérix, le Juif?

(2004-07-23)     Volume of a Sphere, using Cavalieri's Principle  (1635)
How did they compute volumes before the advent of Calculus?

Here is our version of what's called the [second] principle of Cavalieri.
(The first principle of Cavalieri deals with planar areas instead of volumes.)

If an horizontal plane always intersects two given solids in
sections of equal areas, then the solids have equal volumes.

Two such solids are said to be Cavalieri congruent.  This old-fashioned "principle" can be made to sound trivial nowadays  (the integrals of equal functions are equal)  but it helped  define  the very concept of  integration.

Some  direct  applications are still interesting.  For example, we can deduce the volume of a sphere from the formulas giving the volume of a cylinder and the volume of a cone:  The section of a sphere of radius R on a plane at a distance z (<R) above its equatorial plane is a disk of area:

p ( R 2 - z 2 )

This is also clearly the area of a  ring  with outside radius R and inside radius z, which corresponds to a solid that consists of a cylinder of radius R and height R from which a cone of the same base and height is removed  (the apex of the cone being on the equatorial plane).  The volume of this solid  (2/3 the volume of the cylinder) is thus the volume of the hemisphere.  For the whole sphere, this does gives the familiar formula of which Archimedes of Syracuse was most proud of:

Vsphere   =   (4p/3) R3

This was obtained two millenia before Cavalieri's principle got its name.

At first, Cavalieri worked it out for natural exponents up to  n = 9.

Cavalieri's quadrature formula   |   Bonaventura Cavalieri (1598-1647)

(2007-09-21)     Volume of a Tetrahedron
A tetrahedron's volume is  1/6  the determinant of 3 edges.

Proof :   A tetrahedron ABCD can be construed as a cone of apex  D  and base  ABC.  As such, its volume is a  third  of the product of the base area by the height, which is also the  dot product  of  AD  by the vectorial area of  ABC  (itself equal to  half  the cross product of  AB  by  AC).  All told, the volume is:

V   =   1/6  | ( AB ´ AC ) . AD |   =   1/6  | det ( AB, AC, AD ) |

John Hanson (2009-02-11; email)   Right Section of a Cone
What's the volume of a conical heap limited by a vertical plane?

A vertical cone of height  H,  radius  R  and apex  (0,0,0)  has cartesian equation:

( x2 + y2 ) / R2   =   z2 / H2

On the vertical wall where  x  is a positive constant not exceeding R,  the above can be interpreted as the cartesian equation  (in y and z)  of the hyperbola where the plane and the cone intersect.

Between the altitude  -H  [of the cone's base]  and the altitude  -xH/R  [of the hyperbola's apex]  the surface area of the hyperbolic segment is:

ó
õ
H/R
xH/R
 2 Ö (zR/H)2 - x2 dz

Srikanth (2004-07-17; email)     Wedge of a Cone
What's the volume of the portion of a circular cone included between two half-planes?  In particular, when the intersection of the planes goes through the cone's axis.  [ As is the case for the red section of the grey cone pictured at right, seen from the direction (Ox) shared by the two half-planes. ]

This solid may be seen as the difference of two cones with the same apex:

• The larger cone is of height H.  Its base is a half-circle of area  pR2 / 2.
• The height of the smaller cone is  h = H cos q.  Its base is a segment of a conic section of area A  (a parabola when the plane's slope is H/R,  an ellipse for a less inclined plane, an hyperbola for a steeper one).

The volume (V) of the wedge thus reduces to the computation of the area A:

V   =   (H/3)  [ pR2 / 2 - A cos q ]

With suitable choices of coordinate systems, a point of coordinates  (x,y)  in the inclined plane has spatial coordinates (x, y cos q, y sin q)...  Plug these into the cone's spatial equation to obtain the equation of its intersection with the plane:

H2 ( x 2 + y 2 cos 2 q )   =   R2 ( H - y sin q ) 2

The curve's apex  (x=0, y>0)  is at   y = r = [ (sin q) / H + (cos q) / R ] -1
The segment's area A is thus given by either of the following expressions, where x and y are positive quantities related to each other by the above equation:

 A   =     2 óõ r0 x dy     =     2 óõ R0 y dx

For example, in the special case of a parabolic segment (tan q = H/R) we have:

y   =   (R2-x2) / 2R cos q         and         A   =   2R2 / 3 cos q

Therefore, in this parabolic case, the volume boils down to:

V   =   HR2 ( 3p - 4 ) / 18

[ Thanks to Steve Battison for catching an embarrassing typo in the last step. ]

In the elliptic case (tan q < H/R)...

In the hyperbolic case (tan q > H/R)...

Generally, any conical wedge bounded by planar sections of respective areas A0 and A1 [not necessarily joining within the cone] and whose respective planes are at distances  h0  and  h1  from the cone's apex, has the following volume V:

V   =     1/3   | h0 A0 - h1 A1 |

In this, the cone is understood to be single-sided  [its surface is generated by half-lines originating at the apex]  but it need not be a circular one...

(2016-02-05)   Problem 26 in the  Jiuzhang Suanshu  (246 problems).
Nine Chapters on the Mathematical Art  is an  old  Chinese compendium.

That book has been said to be to Chinese mathematics what  Euclid's  Elements  is to the mathematics of Europe and the Middle East.  However, it's more similar to Fibonacci's Liber Abacci (1202) in style and scope.

An authoritative version was completed in AD 263 by  Liu Hui  who made very substantial additions of his own.  The text had been reconstructed and revised from a damaged copy in  170 BC,  under the supervision of Zhang Cang, Marquis of Beiping (253-152 BC) who was, for 15 years, a chancellor of Emperor Wen of Han (Liu Heng, 202–157 BC)  who instituted the first form of  Imperial exams  (165 BC).  Another revision was undertaken a century later by  Geng Shouchang.  Liu Hui himself believed that the original text was extremely ancient  (c. 1000 BC)  but most historians now place it around  200 BC.

There were several subsequent versions of this work but all modern editions attempt to reconstruct the one which became preeminent in AD 656 on the sole basis of its Imperial sponsorship.  The editor-in-chief was the court diviner Li Chunfeng who annoted the great work of Liu Hui with many trivial comments and a few howlers in delicate cases.

The 26th question is a fairly easy one:

A cistern is filled through five canals.  Open the first canal and the cistern fills in 1/3 day.  With the second, it fills in 1 day.  With the third, in 2 1/2 days.  With the fourth, in 3 days, and with the fifth in 5 days.
If all the canals are open, how long will it take to fill the cistern?

Well, the number of  cisterns per day  filled by all canals together is the sum of the rates supplied by every canal separately,  namely:

3 + 1 + 2/5 + 1/3 + 1/5   =   74/15

The number of days to fill the cistern is the reciprocal of that:  15/74.  In modern terms, that's  4 hours, 51 minutes and 53.513... seconds.

This illustrates one type of problems which still puzzles students and adults.  Two other examples are given below.  The first one is straightforward, the second one is a little bit more complicated.

Nine Chapters on the Mathematical Art (MacTutor)   |   Nine Chapters on the Mathematical Art (Wikipedia)
Problèmes de robinets  (France, early XX).   |   Video:  Major League Word Problem  by  Burkard Polster.

suzjor (Riverside, CA. 2000-11-24)
It takes you 6 hours to do a job. It takes a friend 3 hours to do the same job. How long would it take both of you working together to do the job?

2 hours. In that amount of time, you'll have completed 1/3 of the job and your friend 2/3 of it. Of course, the assumption is that the "job" is of such a nature that it can be "distributed" efficiently.

This result is obtained by adding the rates [the number of jobs per hour] of both workers to obtain the rate for the team. In this case, your rate is 1/6 and that of your friend is 1/3, so the combined rate of the team is 1/6+1/3, or 1/2; the team does half a job in an hour, so it takes 2 hours for the whole job.

seriouslyman (2000-11-25)
A clerk is assigned a job that she can complete in 8 hours. After she has been working for 2 hours, another clerk, who is able to do the job in 10 hours, is assigned to help her. How long will it take to complete the job?

We assume that the "job" is of such a nature that it can be distributed between the two clerks. (A modeling assignement would not be such a "job"...) The first clerk completes 1/8 of a job per hour, the second 1/10 of a job per hour (if you want to be silly, you could say their respective "speeds" are 1/8 jph and 1/10 jph).

After t hours (with t>2), the first clerk will have completed a fraction t/8 of the job, and the second clerk a fraction (t-2)/10. The whole job will be completed when t is such that: 1 = t/8 + (t-2)/10 Solve for t and you get t=16/3 hours, that's 5 hours and 20 minutes. Check your answer: The first clerk has worked 16/3 hours and has completed 16/24=2/3 of the job. The second clerk has worked 16/3-2=10/3 hours, completing 1/3 of the job.

(S. H. of Mays Landing, NJ. 2000-11-23 twice)
Let us say that you want to prepare an a % solution [of peroxide], using 3% and 30% solutions. In what proportion should you prepare the mix? (Here, a is a given number, between 3 and 30.)

To get an a% solution from a strong solution at p% and a weak one at q%, you should mix (p-a) parts of the weak one and (a-q) parts of the strong one.

This will indeed give you (p-q) parts of a solution rated at:

 a   = (p-a)q + (a-q)p (p-a) + (a-q)

For example, if p=30% and q=3%, you obtain a solution at a = 12% by mixing 30-12 = 18 parts of the stronger solution with 12-3 = 9 parts of the weaker one (that's 2 parts of the strong solution and 1 part of the weak one, if you must have proportions expressed in lowest terms).

(2000-11-11)   Alcohol Content
Relating ethanol content by volume  (x)  to content by mass  (y).

Metallic alloys and almost all other chemical mixtures are normally rated  by mass.  The percentage given is the ratio of the mass of the ingredient of interest to the mass of the whole mixture.

Alcohol and vinegar solutions, on the other hand, are rated  by volume.

The volumes involved are understood to be volumes of pure alcohol or pure water  before mixing.  Therefore, the  basic  relevant computations  don't depend on the well-known fact that mixing one liter of pure alcohol with one liter of water yields  only  1.92 liters of liquid!

Let  d  be the relative density of alcohol with respect to water.  The value of  d  is practically equal to  0.79  (nearly 4/5).  More precisely, the relative density  d  is the ratio of the  absolute densities  of  alcohol and water:

At 20°C,   d   =   (789.45 g/L) / (998.2071 g/L)   =   0.79087
At 25°C,   d   =   (785.22 g/L) / (997.0479 g/L)   =   0.78754

The relative density is exactly  0.79  at a temperature of about  21.3°C.

A rating of  x  by volume  (ABV = alcohol by volume)  would be obtained by mixing  x  volumes of pure ethanol with  (1-x)  volumes of water.  This yields a liquid whose rating by weight is  y  (ABW = alcohol by weight)  where:

y   =   xd / (xd + 1 - x)       or       1/y   =   1 + 1/xd - 1/d

Rating alcohol (d = 0.79) by volume (x) or by weight (y)
 (1/y - 1) d   =   (1/x - 1)

For a dilute alcohol  (x and/or y are small) each bracket is well approximated by its first term and, therefore,  y  is approximately equal to  xd.  For example, 5% by volume is approximately 4% by weight  (using d = 4/5).

Of course, 100% by volume is 100% by weight.  The above formula does hold for   x = y = 1   (the approximation   y = xd   isn't applicable; it would be off by  20%  or  21%).

### US proof is  twice  the percent of alcohol by volume :

Vodka is normally  40% by volume  (sold as "80 proof", in the US)  which corresponds to  34.5%  by weight  (using  d = 0.79).  Everclear  is 95% by volume  (190 proof)  which is 93.75% by weight.  For an N-proof spirit:

x   =   N / 200           y   =   0.79 / ( 200 / N - 0.21 )

(V. V. of Emeryville, CA. 2000-11-11)
How much pure ethanol must a nurse add to 10 cubic centimeters of a 60% ethanol solution to strengthen it to a 90% alcohol solution?

The computation would be easy if the nurse had  6 cc  of pure alcohol and  4 cc  of water instead of the  10 cc  mix.  She would simply need to add  z cc  of pure alcohol to make the volume rating  (defined above)  equal to 0.9:

0.9   =   (z + 6) / (z + 6 + 4)

Solving for z, we obtain  z = 30 cc.  That's what they teach in nursing school  (possibly with the nice shortcut that's valid either for ratings by mass or for mixing liquids whose volumes don't change significantly upon mixing).

### What a  stellar  nurse would do :

Because water and ethanol  shrink significantly  upon mixing, there's more stuff  (both water and ethanol)  in her 10 cc mixture than would have been obtained from mixing 6 cc of ethanol with 4 cc of water...

Let's assume that the original solution had been prepared at 20°C and that it's being adjusted at the same temperature.  We use a single data source, according to which, at 20°C :

• The specific gravity of pure water is 0.99823
• The specific gravity of pure ethanol is 0.78934
• The relative density is thus  d = 0.78934 / 0.99823 = 0.79074
• By weight, a 60% ABV solution is y = 1 / (1+2/3d) = 54.2566...%
• The specific gravity of a 54% solution by weight is 0.90485
• The specific gravity of a 55% solution by weight is 0.90258
• The interpolation 0.90258(100y-54)+0.90485(55-100y) is 0.90427
• The unmixed average 0.99823(0.4)+0.78934(0.6) is 0.872896
• The mix is 0.90427/0.872896 = 1.035942 denser than its components.

Increasing her previous estimate by that last factor, the nurse will add:

(30 cc) 1.035942   =   31.08 cc

We leave it to the reader to work out what the volume of the resulting 90% ABV solution will be at 20°C  (no, it's not 41.08 cc).

Specific gravity of water-ethanol mixtures at various temperatures

(2015-07-20)     Dilution ratings for acetic acid and vinegar.
For historical reasons, vinegar is rated by volume  (just like alcohol).

In chemistry labs,  acetic acid  is best rated in mol/L.  Elsewhere, we have to deal with the traditional volumetric rating originally designed to measure the acidity of vinegar.

Only a food-grade solution of acetic acid obtained by natural fermentation, with or without distillation, can legally be called  vinegar.  Vinegar must contain at least 4% of acetic acid, by volume  (5% is typical).  In the US, distilled white vinegar is sold watered down to  6%.  In France, cheap  8%  white vinegar is widely available.

Industrially, acetic acid is produced by  carbonylation  of methanol, using a catalyst containing iodine and either rhodium  (the Monsanto process, 1966)  or iridium  (the more economical Cativa process, promoted by ruthenium):

 CH3OH + CO ® CH3COOH Methanol Carbon monoxide cis- Ir(CO)2I2- Acetic acid

Pure 100% acetic acid is a liquid commonly called "glacial" acetic acid  (CAS 64-19-7)  with a density of 1.0497 kg/L.  It freezes at  16.6°C  and boils at  117.9°C.  It can be mixed with water in any proportion.  At retail, diluted acetic acid and vinegar are rated  by volume,  as explained below.

By definition, a solution rated  x  by volume is achieved by mixing  x  volumes of pure acetic acid with  (1-x)  volumes of water at 20°C  (as is the case with alcohol, this definition doesn't depend on whether the total volume varies upon mixing).  The correspondence between the rating by volume (x) and the rating by weight (y) is the same as with alcohol, except that the calibration density involved is now the  relative  density  d = 1.0516  of pure acetic acid at 20°C.  (recall that water weighs 0.99823 kg/L at 20°C).

Rating acetic acid by volume (x) or by weight (y)
 (1/y - 1) d   =   (1/x - 1)       where   d = 1.0516

The traditional grain of a vinegar is equal to  1000 x,  which is to say that it's ten times the volumetric percentage of pure acetic acid in it.  For example, ordinary 5% vinegar can be labeled "50 grains".  Chemists will be delighted to know that a molar solution of acetic acid is precisely  56.881 grains.

Some grades of acetic acid   (CH3COOH, 60.0519 g/mol)   [ 1 ]
Glacial1.048599.84 %99.85 %104717.44
Dilute1.044634.85 %36 %3766.262
Water0.99820 %0 %00

The density of acetic acid is maximum at a concentration of about 80%.

The number of moles of acetic acid contained in a liter of solution (c) is equal to the number of moles in a kg of solution multiplied into the density given by the density table at the relevant temperature  [ 2 ].

(2015-07-24)       Using hydrate crystals  (e.g., monohydrate citric acid).
Soluble crystals often incorporate a fixed proportion of water molecules.

Citric acid is one of the most common organic acids.  It's a triprotic acid of formula  (CHCOOH)COH COOH  or  CHO which would imply a molar mass of  192.12 g/mol.

However, the crystal structure of this substance is a hydrated form which features as many water molecules as acid molecules  (CHO,  HO ).  Therefore, you need  210.14 g  of the crystal to get a mole of the acid.

All published studies refer to this monohydrated form of citric acid when rating the citric acid solutions "by weight".

For example,  Alexander Apelblat  (Citric Acid, 2014, p.42)  states that the density at 20°C  (in kg/L)  of a dilute solution of citric acid is well approximated by the following quadratic function of the weight fraction  w:

0.99823  +  0.4023 w  +  0.1590 w 2       for   w < 0.63

In this, the weight fraction  w  is so defined that the number of moles of citric acid contained in  M  grams of the solution is equal to:

w  M  /  210.14

Density Concentration Table for Citric Acid  (20°C).
Monohydrate Citric Acid.  Claude Laguerie, Michel Aubry, Jean P. Couderc  (1976).

dva1270 (2002-03-29)       Averages Galore...
A vehicle goes from A to B at 60 mph, and returns at 40 mph. Why is the average rate of speed equal to 48 mph? [not 50 mph]

That's because average speeds are harmonic, not arithmetic...  Read on.

The average of several things is whatever single value you could replace all of these things with, and still obtain the same effect. Obviously, the way you would actually compute such an average may very well depend on exactly which type of effect you are interested in. In various cases, there may be hidden assumptions, which must be made explicit before a reliable computation can be made:

Arithmetic Mean:   For example, if you are receiving two checks, the only thing you normally care about is the total amount of money you are receiving. In this case, it does make sense to consider that an average check is equal to half the sum of both, because two such average checks would have exactly the same effect on your bank account as the two checks you actually got.  This is called an arithmetic average and it's, by far, the most common form of averaging.  It's clearly not the only one, though...

Harmonic Mean:   In the case of speeds, the important thing is how long [how much time] it takes to accomplish a journey whose legs are traveled at different speeds.  In other words, the average speed has to be whatever uniform speed would allow the journey to be completed in the same amount of time as the actual one [where the speeds on different legs may have been widely different].  This is clearly equal to the total distance divided by the total duration of the journey. That number is obtained as the so-called harmonic average of the speeds, namely the speed whose reciprocal is the arithmetic average of the reciprocals of the speeds involved. Using the numerical example in the question, 48 is the harmonic average of 60 and 40, because:

1/48   =   ( 1/60 + 1/40 ) / 2

Geometric Mean:   The geometric mean of two nonnegative numbers is the square root of their product.  More generally, geometric averaging is appropriate for successive relative increases:  Consider, for example, a first-year increase of 10% (a factor of 1.1), a second-year increase of 21% (a factor of 1.21), and a third-year increase of 700% (a factor of 8).  Over three years, the increase corresponds to a factor of 1.1 ´ 1.21 ´ 8 = 10.648. The yearly average is the cube root of that, namely a factor of 2.2, corresponding to an average yearly increase of 120%.  The logarithm of a geometric average is the arithmetic average of the logarithms:

Log(2.2)   =   [ Log(1.1) + Log(1.21) + Log(8) ] / 3

The fact that people often express a relative increase in terms of a percentage difference is best discarded,  except  for input and output.

Quadratic Mean:   This is the [positive] quantity whose square is the arithmetic mean of the squares of the quantities under consideration.  It's commonly called the root mean square (RMS), as it's the square root of the mean of the squares.

This averaging is common in physics.  For example, the RMS speed of a [large] set of molecules may be used to define their temperature (which is classically proportional to their average kinetic energy).  Also, the RMS value [over time] of the current through a pure resistor equals the continuous current that would dissipate the same heat as the varying current observed.

Hölder Mean:   The German mathematician Otto L. Hölder (1859-1937) investigated, for any given exponent p, the quantity H whose p-th power is the arithmetic mean of the p-th powers of the quantities under consideration.  (For arbitrary exponents, this must be restricted to nonnegative quantities.)

H   =   Hp (a1 , a2 , ... an )   =   [ (a1p + a2p + ... + anp ) / n ] 1/p

• Exponents 1, -1, 0 and 2 correspond, respectively, to the aforementioned arithmetic, harmonic, geometric and quadratic means.
• The case p = 0 for the geometric mean is defined by continuity as the limit of the p-exponent Hölder mean  Hp, when p tends to zero.
• If  p < 0  and any  ai  is zero, then Hp = 0   (defined by continuity).
• Hp(a,b) H-p(a,b)   =   ab

For an infinite exponent, the Hölder mean of a finite set of nonnegative quantities is defined as either their maximum (p = ) or their minimum (p = ).

Generalized Mean:   A bijective function f can be introduced so that the following relation defines the "mean" m of n quantities a1, a2 ... an:

f (m)   =   (1/n)  [  f (a1 ) +  f (a2 ) + ... +  f (an ) ]

f (x)  is  x  for the ordinary arithmetic mean, x2  for the quadratic mean, 1/x  for the harmonic mean, Log(x)  for the geometric mean [only when x>0], etc.

Averaging over a spheroid:   Nautical mile as an "average" minute of latitude.

Batting Averages:

...Farey Series, etc.
(2003-01-08)   30.436875 or 30.458729474253406983...
What's the average number of days in a Gregorian month?

This is a good way to expand the discussion in the previous article.  The average or mean value of anything is often ultimately defined as the "expected value" of that thing according to some probability distribution.  For most pratical purposes, the distribution to use is clearly understood and may be left unspecified.  For example, when asked out of context about the average of 28, 29, 30 and 31, we would normally assume that these 4 numbers are equally likely and would readily equate their mean (their expected value) with their arithmetical average (namely 29½).  On the other hand, this approach is clearly unacceptable if we have to work out the mean number of days in a month, since durations of 28 or 29 days should clearly weigh less than months of 30 or 31 days, on account of their lesser likelihood.

Our modern secular calendar (the Gregorian calendar) repeats with a period of 400 years which includes 97 leaps years of 366 days and 303 regular years of 365 days.  Therefore, this period consists of 146097 days, or 4800 months.  The average number of days in a month would thus seem to be 146097/4800, namely 30.436875.  But is is really so?

Well, yes and no. The question is not precise enough to have a definite answer.  It depends on exactly what type of event you expect the "mean" to predict.  If each month is equally likely, the above is indeed the correct answer.  However, it would be at least as reasonable to assume that what you really want is the average duration of the current month for a random Gregorian date.  In this case, each day is equally likely in the Gregorian cycle of 146097 days and the result must be somewhat higher than the above, because longer months are more likely.

More precisely, in a Gregorian cycle there are 97 months of 29 days (1 per leap year), 303 months of 28 days (1 per regular year), 1600 months of 30 days (4 in any year) and 2800 months of 31 days (7 in any year).  Therefore, there are 2813 days (97 times 29) which fall in a month of 29 days, 8484 days (303 times 28) falling in a month of 28 days, 48000 days falling in a month of 30 days, and 86800 (2800 times 31) falling in a month of 31 days.  The "mean" is obtained by summing up all possible values "weighted" with their respective probabilities.  For example, the value 29 is weighted by the probability of 29, which is 2813/146097 (roughly 1.925433%).  Work it out and what you obtain for the mean length of a month, in that sense, is 4449929/146097, or about 30.4587294742534... This is slightly more than our previous result, as predicted.

Neither answer is better that the other; they are just answers to different questions.  Which answer you pick depends on which question you feel is "intended" when pople ask about the mean length of a month.  Given enough time to think it over, most mathematicians would probably find the latter interpretation of the question more "natural", but they would still acknowledge that other interpretations are better adapted to specific contexts.  For example, our earlier value of 30.436875 days is the only acceptable conversion factor between durations expressed in days and durations expressed in average calendar months; any other number leads to a systematic bias for long durations...

(2009-02-08)   Arithmetic-Geometric Mean   (AGM)
The AGM of  a  and b is the AGM of  (ab)½  and  (a+b) / 2

The AGM of two positive numbers can be obtained by replacing them iteratively by their geometric mean and their arithmetic mean until those two bounds coincide at a given precision.  For example, starting with 4 and 9:

 Geometric (lower bound) Arithmetic (upper bound) 4 6 6.24499799839839820584689312094 6.24749849859845814965611936102 6.24749874889882361226113095160 6.24749874889882611927545695617 9 6.5 6.25 6.24749899919919910292344656047 6.24749874889882862628978296075 6.24749874889882611927545695617
```WHILE A+B <> A+A
X=SQRT(A*B) : B=(A+B)/2 : A=X
WEND```

The above is an efficient algorithm with a  quadratic  convergence  (i.e., the number of correct digits roughly  doubles  with each iteration).

The arithmetic-geometric mean is tightly related to the  complete elliptic integral of the first kind  (K)  as follows.  (See also:  Gauss's constant.)

K(k)   =    ò  p/2

0
dj     =     p/2
 Ö 1 - k2 sin2 j
agm ( 1-k , 1+k )
The above expression of  K  is called its  normal trigonometric form.  The substitution  x = sin j. shows it to be equivalent to the  Legendre normal form  that appears  elsewhere on this site.

Conversely,     agm ( a,b )   =   p ( a + b )  /  4 K( |a - b| / |a + b| )

Wikipedia :   Arithmetic-Geometric Mean   |   AM-GM Inequality   |   Elliptic integral

wankman (2002-04-10)   Geometric Horizon
How far away is the ocean horizon line?
Is there a formula for figuring that out?

Suppose the Earth is a perfect sphere of radius R (that's not quite true, but close enough).  If your  eyes  are at a height H above the surface of the ocean, then the horizon is at a distance D which is such that your line of sight is tangent to the sphere at that distance. See figure at right.

So, you have a right triangle whose vertices consist of your own eye, a point on the horizon and the center of the Earth.  The hypotenuse is  R+H  and the sides are  R  and  D.  Therefore,  (R+H)2 = R2 + D2,  which boils down to:

D2   =   (2R+H) H

In practice,  H  is much smaller than the diameter of the Earth  (2R),  so that  (2R+H)  and  2R  are virtually the same and we have  2RH » D2.  The distance  D  to the horizon seen from an altitude H is thus :

 D   »   Ö 2RH

In this, R is the (conventional) radius of the Earth: R = 6371000 m or R = 20902231 ft (choose whichever unit of length you use to express H in order to have the result D expressed in the same unit). For example, at an altitude of 2 m [standing on a small boat], the horizon is at 5048 m (about 5 km, 3.2 statute miles, or 2.7 nautical miles). If you climb on top of a tall mast at 20 m [ten times higher], the horizon is at 15964 m [3.16 times farther]. From a hilltop on the seashore at 200 m, the horizon is 10 times farther than if you are standing on your small boat. From a high mountain at 2000 m, you could see the ocean 31.6 times farther than when standing on a small rock on the beach: The horizon line is then almost 100 miles away! [86 nautical miles]

For a quick estimate, compute the square root of your altitude in feet. Add 20% or 25% to that result  [more precisely 22.455%]  to obtain the distance to the horizon in  statute miles  (for a result in nautical miles, add 5% instead, or 6.41% to be more precise).

For example, if your eyes are 9 feet above the ocean [the square root is 3], the horizon is about 3.7 miles away (roughly 3.2 nautical miles).

The distance to the horizon in kilometers is roughly 3.5 times the square root of the altitude of your eyes in meters  (a more precise coefficient is 3.5696).

Note that the above is only the  geometric  horizon, based on the dubious assumption that light always travels in straight lines.  That assumption is not at all valid when the lack of wind allows a  refractive gradient  to build up in a large volume of stagnant air, as discussed in the  next section.  In that case you'll be able to see  "beyond the horizon"  (sometimes,  well beyond  the geometric horizon)  as soon as the ocean water is colder than ambient air.

(2016-07-14)   Mirages beyond the Horizon

Weather permitting, the white cliffs of Dover
are often visible from the French coast.

In a vacuum or in an homogeneous medium, light travels in straight lines.  Otherwise, we may invoke either the  Euler-Lagrange equations  or the more elementary  Fermat principle of least time (c. 1655)  to show that  light rays  curve  toward the gradient of the  index of refraction.

We may use the latter directly, with no need for higher mathematics, in the special case of an horizontal ray in the presence of a vertical gradient:

The curvature  1/R  of such a ray is the same as that of a circular ray around a sphere where the gradient of the index is such that the circular ray of radius R is the ray which is traveled in the least amount of time compared to all nearby circular rays in the presence of said gradient in the radial direction.

The travel time around a circular ray at altitude  z  above our basic circle is  2p[R+z]n(z)/c.  For this to be minimal at  z=0  the corresponding  derivative  must vanish.  Dividing that zero quantity by the constant  2p/c,  we obtain:

0   =   n  +  R  dn/dz

R is positive when the center of curvature is downward, which happens when  dn/dz  is negative  (superior mirage).  Otherwise,  we have an inferior mirage  (R negative, dn/dz positive).  Let's consider only the former case.  Since the index of refraction is a  decreasing  function of temperature, this corresponds to a temperature which increases with altitude locally.  For example, that's what happens near the surface of the ocean when the water is colder than the ambient air.

In particular, an horizontal ray will stay indefinitely at the same altitude if the above curvature constantly matches the curvature of the Earth  (R = 6371 km).  In that case, an observer just above sea-level will see the images of distant objects as if the Ocean was rigorously flat  (erroneously assuming that the observed light travelled in straight lines).

At pressure  p = 101325 Pa,  the refractive index of air is a function of the absolute temperature  T.  To a good approximation, we have:

n   =   1 + 0.079678°C / T   =   1 + 0.079678 / (t + 273.15)

Since change in hydrostatic pressure is relevant,  let's use the full expression:

n   =   1  +  ( p / 101325 Pa ) ( 0.079678°C / T )

Differentiating that at the point  p = 101325 Pa,  we obtain:

dn   =   0.079678°C  [ dp / (T 101325 Pa)  -  dT / T2 ]

In still air, the change in pressure is proportional to the change in altitude dz, in such a way that the forces applied to a small box of air add up to zero.  Using a box formed by a vertical wall and two congruent horizontal surfaces we see that the difference in pressure between the top and the bottom is equal to the weight of the enclosed air per unit of horizontal surface.  That's equal to the height of the box multiplied into the gravitational field and the mass density of air  (obtained as its molar mass divided by the molar volume at pressure  p = 101325 Pa,  derived from the ideal gas law).  All told:

-dp   =   dz  (9.80665 N/kg) (0.028966 kg/mol)  /  ( 8.31446 T / p )

Equivalently:     -dp / p   =   ( 0.034164 / T ) dz

Plugging this into the previous equation, we have:

dn/dz   =   ( -0.079678°C / T 2 ) [ 0.034164  +  dT/dz ]

Let's solve for  dT/dz  when  dn/dz  =  -n / R  (with  R = 6371 km) :

n / 6371000   =   ( 0.079678°C / T 2 ) [ 0.034164  +  dT/dz ]
n T 2 / 507630   =   0.034164  +  dT/dz
dT/dz   =   n ( T / 712.48 ) 2  -  0.034164

 dT / dz   =   [ n  (T / 131.69) 2  - 1 ]  0.034164 °C / m

That formula has been used for the last column of the following table, giving the refractive properties of dry air under normal atmospheric pressure  (101325 Pa)  for which horizontal light rays will curve downward with the same radius of curvature as the surface of the Earth  (R = 6371 km).  This data is for a vacuum wavelength of  632.991 nm  (corresponding to the red light of an helium-neon laser, as commonly used in metrology)  and a "standard"  CO concentration of  450 ppm.

Vertical temperature gradient   dT/dz   (in °C per meter)  for which
horizontal light rays remain parallel to the surface of the Earth
(in dry air)
tnn/T dT/dz
(R = 6371 km)
T - 273.15°C1 + 0.079678°C / T- 0.079678°C / T2
0°C 32°F1.00029170-1.06791  ppm / °C0.11286 °C/m
5°C41°F1.00028646-1.02986  ppm / °C0.11829 °C/m
10°C50°F1.00028140-0.99381  ppm / °C0.12382 °C/m
15°C59°F1.00027652-0.95962  ppm / °C0.12945 °C/m
20°C68°F1.00027180-0.92717  ppm / °C0.13518 °C/m
25°C77°F1.00026724-0.89633  ppm / °C0.14100 °C/m
30°C86°F1.00026283-0.86701  ppm / °C0.14693 °C/m
35°C95°F1.00025857-0.83910  ppm / °C0.15295 °C/m
40°C104°F1.00025444-0.81252  ppm / °C0.15907 °C/m

If the temperature gradient is stronger than the values tabulated above  (e.g.,  0.135 °C/m = 0.243 °F/m)  then water located well beyond the geometric horizon can be seen and some distant terrestrial objects could become visible,  as if the surface of the Ocean had an upturned rim.

### Superior Mirages without a Temperature Gradient :

For a cold enough uniform temperature, the pressure gradient due to gravity would be enough to warp light around the Earth!  Theoretically at least.

The above formulas are certainly not very accurate at extremely low temperatures because they use the  ideal gas law  (for one thing, carbon dioxide freezes out of the gaseous phase below -57°C).  However, we may still take them at face value to obtain a  rough  idea of the uniform temperature we seek, by solving a  quadratic  equation in T:

( 1 + 0.079678 / T ) ( T / 131.69 ) 2   =   1

The positive solution is  T = 131.65 K = -141.5 °C,  which is well below the  lowest ever recorded  on the surface of the Globe  (-93.2°C at this writing)  although it's not nearly low enough to liquefy nitrogen, oxygen or argon.

### Moist Air and Humidity Gradient :

By far, the most important variable component of  clear  atmospheric air is water vapor.  In still air over a body of water, we must consider the possibility of a significant vertical humidity gradient capable of bending horizontal light rays.

To a good enough approximation for our present purpose, moist air is simply a mixture of water vapor and dry air  (consisting itself of fixed proportion of all other atmospheric gases, including carbon dioxide).  The molar ratio of those two components is very nearly equal to the ratio of their respective partial pressures  (the sum of the partial pressures is equal to the total pressure measured by an ordinary barometer).

At some given ambient temperature  T,  the partial pressure of water vapor  pw  cannot exceed the  saturation pressure  p(T)  at which vapor would condensate into liquid droplets  (as dew, fog or clouds).  The composition of clear moist air is thus most commonly specified in terms of its  relative humidity  (RH)  defined as the following ratio, which can vary between  0  and  1  and is usually expressed as a percentage  (0 to 100%).

RH   =   pw / ps (T)

When  RH  is low enough,  so is  pw  and vapor behaves within dry air as if it, too, was an  ideal gas.  The index of moist air is then obtained as a weighted average of the index of dry air and the index of that low-pressure vapor.  This yields an expression similar to what we had for dry air, except that the total pressure  p  is now replaced by the following expression involving the ratio  k  of the index of vapor relative to the index of dry air:

p'   =   ( p - pw )  +  k pw   =   p  +  (k-1) RH ps (T)

The measured value of  k-1  is    .  Therefore:

n   =   1  +  ( p' / 101325 Pa ) ( 0.079678°C / T )

Optical Refractive Index of Air:  Dependence on Pressure, Temperature and Composition  James C. Owens  (1967).
Refractive index of air:  new equations for the visible and near infrared   by  Phillip E. Ciddor  (1996).
Refractive Index of Air Calculator   by  Jack A. Stone  and  Jay H. Zimmerman  (2001-2011).
Refractivity of Air  by  Andrew T. Young (2011).

What causes a mirage?  by  Edwin Meyer   (Scientific American, 2005-11-07).

Wikipedia :   Atmospheric optics  |  Mirage  |  Temperature gradient  |  Lapse rate  |  Temperature inversion

(R. S. of Austin, TX. 2000-10-25)   Distances along a  great circle
How can I find the distance (in feet) between two exact locations by entering latitude/longitude coordinates to 6 decimal places?
lancelizabeth  (2001-07-11)
Using latitude and longitude, what is the formula that calculates the distance [in meters] between two points on Earth?

Assuming the Earth to be a  perfect  sphere whose  conventional  radius is  R = 6371000 m » 20902231 ft,  a point of latitude  j  and longitude  q  has the following  cartesian coordinates  (in a well-chosen coordinate system) :

[x, y, z]   =   [ R cos j  cos q   ,   R cos j  sin q   ,   R sin j ]

In this, a northern latitude is positive, a southern latitude is negative.  An eastern longitude is positive and a western one is negative.  (You could use any other convention, provided you do so consistently.)

The  conventional radius of the Earth  (R = 6371 km)  is very close to the  average  distance from the Earth's center to a point "at sea level".

If you have two such points, the scalar product ("dot product") of two such vectors gives you R2 times the cosine of the angle d between them  (along a great circle, which is the shortest route on a sphere's surface).

In other words, two points whose spherical coordinates  (latitude,longitude)  are respectively  (j,q)  and  (j',q' )  are separated by an angle d given by:

cos d   =   cos j cos q cos j' cos q' + cos j sin q cos j' sin q' + sin j sin j'

 cos d   =   cos j cos j' cos (q'-q)  +  sin j sin j'

From that cosine of  d,  you may obtain the angle  d  by using the inverse trigonometric function on a scientific calculator.  [However, you may prefer to use the better formula below, which remains accurate for nearby points!]

If  d  is in radians, the distance between the two points along a great circle is simply equal to  dR.  If  d  is in degrees, the distance is  pdR/180.

### A Better Formula (especially for small distances):

The above formula is  not  adequate for computing distances between nearby points, because  d  is small and  cos d  is so close to unity that the use of the reverse trigonometric function  arccos  would cause an unacceptable loss of accuracy in the final result.  To skirt the difficulty, we may use the following equivalent formula, which turns an accurate knowledge of (j'-j) and (q'-q) into a similarly accurate floating-point value for d:

Angular separation  (d of distant  or nearby  points on a sphere :
 sin2 d =     sin2 j'-j cos2 q'-q +   cos2 j'+j sin2 q'-q 2 2 2 2 2

Proof :   The identity   cos x  =  1 - 2 sin2 (x/2)   allows the following transformation of our original formula:

 1 - 2 sin2 (d/2) =   cos j cos j' { 1 - 2 sin2 ([q'-q]/2) } + sin j sin j' =   cos (j'-j) - 2 sin2 ([q'-q]/2) cos j cos j' =   1 - 2 sin2 ([j'-j]/2) - 2 sin2 ([q'-q]/2) cos j cos j'
Therefore:
 sin2 (d/2) =   sin2 ([j'-j]/2) + sin2 ([q'-q]/2) cos j cos j' =   sin2 ([j'-j]/2) + sin2 ([q'-q]/2) { ½ cos(j'+j) + ½ cos(j'-j) } =   sin2 ([j'-j]/2) + sin2 ([q'-q]/2) { cos2 ([j'+j]/2) - sin2 ([j'-j]/2) } =   sin2([j'-j]/2) cos2([q'-q]/2) + sin2([q'-q]/2) cos2([j'+j]/2)

(Ukulele8421.  2010-02-09)   Distance  through  the Earth
What's the length of a  straight line  from Grand Rapids to Melbourne?

In the above spherical approximation, the two cities are adequately represented by two points (at zero elevation) on a perfect sphere of radius  R = 6371 km.

 Latitude (j) Longitude (q) Elevation (h) Grand Rapids, MI 42.961250° -85.655719° 195 m Melbourne, Australia -37.813611° 144.963056° 31 m

Each point is located in space by the cartesian coordinates of a vector:

U   =   (R+h)  [ cos j cos q   ,   cos j sin q   ,   sin j ]

The distance  d  between the two points  through  the Earth is simply the length of the  difference  between two such vectors.  The  square  of that distance is:

|| U - U' || 2   =   2 R2 - 2 U . U'     (assuming h=0)

That expression would be easy enough to spell out but it suffers from the same flaw as the  first formula of the  previous section  (i.e., numerical loss of precision at small distances).  Instead, it's much better to compute the angular separation  d  between the two cities  (using the  second formula given above)  with the following relation, obtained from elementary geometry  (in the plane of the great circle):

 d   =   2 R sin (d/2)

Happily, the  formula  we are recommending gives  sin (d/2)  directly, via its square!  In the case of Grand Rapids and Melbourne, we obtain numerically:

sin (d/2)   =   0.94462778

Multiply this into the diameter of the Earth (2R) to obtain:

d =  12036.448 km.

At this level of precision  (1 m)  the difference of altitudes come back into play:  If Grand Rapids was at the same altitude  (31 m)  as Melbourne, we would obtain an exact result  (for a spherical Earth)  by using  R = 6317.031 km.  This yields  d = 12036.506 km.  The difference in elevations of  164 m  yields  (in the main)  an additional correction equal to that difference multiplied into the negative cosine of the angular separation  (d = 141.6877°).  All told, the distance between the two cities would be  12036.635 km  on a  spherical  Earth.

The correction in distance due to the oblateness of the Earth varies between a negative minimum of  -28.5 km  and a positive maximum of  +14.3 km  obtained respectively when the two cities are located either on the two poles or on opposite points of the equator.

The true oblateness correction  (-7.372 km)  can be worked out as follows:

### Full precision, using the Reference Ellipsoid (IUGG, 1980) :

In geography, latitude is  always  defined as the angle  j  from the plane of the equator to the local vertical  (northward angles being positive).  If the surface of the Earth is approximated by a  spheroid  of equatorial radius  a = 6378137 m  and polar radius  b = 6356752.3141 m,  then the local vertical is perpendicular to the surface of that ellipsoid.  It's a  simple exercise in calculus  to express the cartesian coordinates of the  [elliptic]  meridian as functions of the parameter  j:

Geodetic Latitude (j)
and Elevation (h).

Cartesian coordinates of a point of elevation  h at  [geodetic ]  latitude  j  and longitude  q :
 x   =   ( a 2/ Rj + h )  cos j  cos q y   =   ( a 2/ Rj + h )  cos j  sin q z   =   ( b 2/ Rj + h )  sin j where   Rj2   =   a2 cos2 j  +  b2 sin2 j

Those formulas can be used to compute the components of the vector which goes from Grand Rapids to Melbourne.  The straight-line distance is its length, namely :

 Ö =   12029.263 km (x'-x)2 + (y'-y)2 + (z'-z)2

Incidentally, the above formulas also give the relation  (at zero elevation)  between the geodetic latitude  j  and the (useless)  geocentric  latitude  j:

tg j0   =   ( b 2/ a 2 )  tg j

To see that, notice that we have   tg j0 = z/x   when  q = 0  and  h = 0.

How do I find the radius of the Earth at 51° North?

The term is ambiguous.  I'll compute two related quantities:

1. The distance from the center of the Earth to a point at a latitude L of 51°.
2. The radius of that latitude's parallel.

Before we do a precise computation, let's do the usual rough one by considering that the Earth is a perfect sphere whose radius is the "conventional" radius which is defined to be exactly R=6371000m. With this approximation, we have:

1. A (constant) distance to the center equal to R, namely 6371 km.
2. A parallel of radius R cos(L), or about 4009.4 km when L is 51°.

A much better approximation is to consider that the Earth matches exactly the regular shape against which its irregularities are charted. That shape is called the "reference ellipsoid" and its dimension have been precisely defined once and for all by the IUGG in 1980:

The meridian is a perfect ellipse whose equatorial radius is exactly a = 6378137m and whose polar radius is "approximately" b = 6356752.3141m. So far so good.

Now, what does a latitude L correspond to on that ellipse?
It is not the so-called "geocentric" latitude (the angle between the line to the center of the Earth and the plane of the equator). Instead the latitude L is the geodetic latitude: the angle between your local vertical (which is the line perpendicular to the ellipsoid's surface) and the equatorial plane. L is the latitude you would get from local astronomical observations. With the spheric approximation, we did not have to worry about this fine point, because both definitions amount to the same thing. In the case of the ellipse they are slightly different. How different? Well, if we call C the geocentric latitude, the difference L-C is given by:

```L - C = 692.74" sin(2L) - 1.16" sin(4L).
```

For L = 51°, L-C is thus about 678.07378" or about 0.1888358°. So the geocentric latitude C is about 50.811646°.

Let x be the radius of your parallel and y its distance to the equatorial plane. We have y = x tan(C) = (1.22663011194) x, while the equation of the ellipse gives you (with the above values for a and bx2/a2 + y2/b2 = 1.

Replace y by x tan(C) and solve for x to obtain the value of x, whereas the distance to the center of the Earth is simply x/cos(C) (its square is x2+y2):

1. The distance to the center of the Earth is 6365264.58 m (that's about 5.7 km less than the conventional radius of the Earth R).
2. The radius of the parallel is x = 4022.031 km (that's about 12.6 km more than what we got from the spherical approximation).

yonda1234 (2001-04-28)   Applying Girard's Formula
How can I find the area of a spherical polygon formed by a series of points on the Globe, given by their latitudes and longitudes?

Here, we assume the Globe is a perfect sphere.  For better precision, we should consider it to be an oblate ellipsoid instead.  I've worked out elsewhere the formula to use for the surface area of a patch in this case.  The result is surprisingly simple for a polygonal patch where vertices are connected by some special curves on the ellipsoid.

A basic result of spherical geometry  (called Girard's Theorem)  states that the surface area of a spherical triangle on a sphere of radius R is equal to R2(A+B+C-p) , where A, B and C are the inside angles of the triangle. You could dissect your polygon into triangles and add up the results obtained from Girard's formula, but there's a more practical way to proceed (whose validity may be established using such a virtual dissection):

Consider the sum S of all the inside angles at each of the n vertices of your polygon (see below for a recipe to compute these angles from your list of spherical coordinates). The surface area of your polygon is simply:

R2 [ S - (n-2)p ]

The polygon need not be convex, it's only assumed that the polygonal line does not intersect itself (or else, the formula would only hold for a critical matching definition of inside angles and inside area; see footnote below).

Therefore, the only real problem is to compute the relevant angles from your latitude/longitude list. Well, on a sphere of unit radius, a point of latitude u and longitude v has cartesian coordinates (cos(u)cos(v), cos(u)sin(v), sin(u)). To compute the angle at point B in your polygon, you need to consider this vector for B as well as for the previous point (A, say) and the next one (C, say). The cross products BxA and BxC give you the directions perpendicular to the planes of the dihedral angle you're after. Divide these two vectors by their length to obtain two unit vectors U and V. The scalar product of U and V is the cosine of the angle x you want (if your polygonal line is an approximation to a smooth curve, there won't be too much bending at each corner and x will be close to p). Note, however, that the positive angles x and (2p-x) have the same cosine; you must choose whichever corresponds to the inside of your polygonal line. That's it. I hope this helps...

Footnote:   The only consistent way to define which of the two possible angles is the  inside  one is to always put it on the same side with respect to your progression along the polygon line  (the usual convention is that the inside is to your left).  That's critical when the line self-intersects, in which case the  inside  angle occasionally faces "outside".

(2002-12-01)   Kepler's Third Law
The relation between distances and periods of orbiting bodies.

Johannes Kepler (1571-1630) was the first to observe that the square of the period of a planet around the Sun is proportional to the cube of the size of its orbit.  More precisely, the size of an elliptical orbit should be defined as its major radius (a), also called its semimajor axis (which happens to be equal to the average distance of the planet to the Sun).

This is now known as Kepler's Third Law of planetary motion.  It occurred to Kepler on March 8, 1618; more than 12 years after he had formulated his first two laws.  [He didn't accept his own idea until better computations finally allowed him to formulate the third law, on May 15, 1618.]  Kevin S. Brown remarks that the introduction of logarithms by John Napier (in 1614) is likely to have been instrumental in Kepler's discovery of the third law...

Kepler discovered his first two laws in 1605 and published both in 1609:  The first law is that orbits are ellipses of which the Sun is a focal point, whereas the second law states that a straight line from the Sun to the planet "sweeps out equal areas in equal time intervals".  Oddly enough, the second law was actually discovered first...  Voltaire (1694-1778)  is credited with popularizing Kepler's three "laws" with their Newtonian explanation  (1745).

Kepler's laws are now seen as a straight consequence of  Newtonian mechanics, involving the masses of two orbiting bodies  (Kepler's original laws being recast as the special case where one mass is vastly larger than the other).  In its most general form, the third law may be expressed in terms of the following relation, involving Newton's constant of gravity (G), the masses of the two bodies that orbit each other (M and m), their average distance (R = the major radius of the orbit of one body, if the other is considered fixed) and the period of revolution (T):

4 p2 R 3   =   G (M + m) T 2

This relation holds for SI units, or within any other consistent system of physical units.  However, it's worth noting that, for the motion of a small mass around the Sun, we may choose to express distances in astronomical units and times in sidereal years, which makes the relation boil down to:

R 3   =   T 2