User:Neil Parker/Sandbox

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Pythagoras' Theorem and the Platonic Sequence: A Common Genesis[edit]

Pythagoras' Theorem

Figure 1

In the diagram COD is a diameter with O the centre. Right triangle OAB has sides x,y,r as shown.Let angle AOB = θ and , since this is an external angle of isosceles triangle DOB, angle D is θ/2...

Angle CBD stands on the diameter and is therefore

Angle C is complementary to angle D and to angle ABC making the latter also equal to θ/2.

Triangles ACB and ABD are right triangles with angle D = angle ABC = θ/2. Therefore they are similar. Hence:

The Platonic Sequence.

Figure 2

In the same diagram (Figure 2) let AC = 1 unit. (compared with Figure 1 we are simply scaling everything by a factor r – x). Then:

It can be seen that the scaled right triangle OAB in Figure 2 has sides which fit the Platonic sequence and since Figure 1 and Figure 2 are otherwise identical, it should be clear that the Platonic sequence is in fact a core expression of the Pythagorean identity. In particular rational triples arise if t is a rational number m/n:

To obtain Pythagorean triples with integer sides we simply scale the above by a factor to give:

All Pythagorean triples are therefore scaled versions of equivalent (ie equi-angular) Platonic sequence triangles which have rational sides. If by definition Platonic sequence triangles must have integer sides, we should rather use the term half angle cot sequence in the above context.

Figure 3

As one would expect there is a corresponding half angle tan sequence: refer to figure 3 and let AD = 1 unit. (compared with Figure 1 we are now scaling everything by a factor r + x). Then:

Once again rational triples arise if t is a rational number m/n where m<n in this instance.

Diophantus II.VIII and the Platonic Sequence[edit]

Diophantus II.VIII: Intersection of line CB and the circle has rational solutions for x and y

"To divide a square into a sum of two squares
To divide 16 into a sum of two squares

Let the first summand be and thus the second . The latter is to be a square. I form the square of the difference of an arbitrary multiple of x diminished by the root of 16, that is, diminished by 4. I form, for example, the square of 2x-4. It is . I put this expression equal to and subtract 16. In this way I obtain , hence .

Thus one number is 256/25 and the other 144/25. The sum of these numbers is 16 and each summand is a square."

Without in any way detracting from the method described above, we generalize to solve the problem for any given square which we will represent algebraically as . Also since Diophantus refers to an "arbitrary multiple of x" we will use the letter t to represent that coefficient. Then:

"Thus one number is and the other is . The sum of these numbers is and each summand is a square."

Diophantus II.VIII: Generalized solution in which triangle OAB is a rational triple if line CB has a rational gradient t

The specific results obtained by Diophantus may be obtained by substituting a=4 and t=2 in the above algebraic expressions. In effect his solution yields the following rational triple representing the sides of triangle OAB (it is assumed a and t are both rationals):

We see that Diophantus' solution is in fact a cleverly disguised 3,4,5 triple!

The algebraic solution needs only one additional algebraic step to arrive at the Platonic sequence and that is to multiply all sides of the above triple by a factor . Notice also that if a=1, (unit circle) the sides (OB,OA,AB) reduce to:

In modern notation this is just written in terms of the half angle cot which in the particular example given by Diophantus has a value of 2, the "arbitrary coefficient of x". Intriguing that this "arbitrary coefficient" has become the cornerstone of the Diophantine triple generator!

Diophantus of Alexandria. Arithmeticorum Lib II Quaestio VIII
Heath, Sir Thomas L. Diophantus of Alexandria: A Study in the History of Greek Algebra. Dover.
Bashmakova, Isabella Grigoryevna. Diophantus and Diophantine Equations . The Mathematical Association of America. USA, 1997.
Both as quoted by Aaron Zerhusen, Chris Rakes, & Shasta Meece.Diophantine Equations

Further Reading:
Fermat's Last Theorem and Diophantus II.VIII

Using Ptolemy's Theorem[edit]

Proof of Law of Cosines using Ptolemy's Theorem

Referring to the diagram, triangle ABC with sides AB=c, BC=a and AC=b is drawn inside its circumcircle as shown. Triangle ABD is constructed congruent to triangle ABC with AD = BC and BD = AC. Perpendiculars from D and C meet base AB at E and F respectively. Then:

Now the Law of Cosines is rendered by a straightforward application of Ptolemy's theorem to cyclic quadrilateral ABCD:

Plainly if angle B is 90 degrees, then ABCD is a rectangle and application of Ptolemy's theorem yields Pythagoras' Theorem:

Using Power of a Point Theorem[edit]

This proof along with that using Pythagoras theorem are of considerable historical significance since both have their origins in Euclid's Elements and both are referred to in the ground breaking work of Nicolaus Copernicus: "De Revolutionibus Orbium Coelestium". On Page 20 and Page 21 of Book 1 Copernicus describes two techniques for determining angles given all three sides of a triangle. These techniques correspond respectively to the Pythagorean and Power of Points derivations of the Law of Cosines.

Replica of diagrams in Book 1, Page 21 of "De Revolutionibus Orbium Coelestium"

Fig 1 and Fig 2 are replicas of the diagrams from Page 21 of De Revolutionibus Orbium Coelestium.In Fig 1 triangle ABC is drawn with B an acute angle. With C as centre and BC (=a) as radius semi-circle DBF is constructed with DF a diameter and D a point on AC. The circle meets side AB at E and EC is joined forming isosceles triangle ECB with EB = 2acos(B).Power of Points Theorem (intersecting secants theorem) is applied to point A outside the circle:

It will be no different in the case of Fig 2 where angle B is obtuse:

Proof of Law of Cosines using Power of a Point Theorem

In addition to the two cases dealt with above, we also need to consider the situation shown in the diagram where Power of Point theorem is applied about point B inside the construction circle.

Triangle ABC is drawn with side AB=c,BC=a and CA=b. With A as centre construct circle DCE with radius b and diameter DE passing through B. CB produced meets the circle at F. Since triangle CAF is isosceles:


Now apply the Power of a Point Theorem (intersecting chords theorem) to point B inside the circle:

Proof using the Law of Sines[edit]

Ptolemy's Theorem

In cyclic quadrilateral ABCD the sum of products of opposite sides is equal to the product of diagonals. Referring to the diagram:

The proof which follows is substantively similar to the previous but adopts a different methodology and concludes with an interestingly symmetric formula for the product of diagonals and sum of products of opposite sides.

Preliminary Observations and Identities

In the diagram sides AB,BC,CD and DA are labelled and and subtend angles and respectively. Applying sum of angles in triangle ABC it should be noted that . Therefore the sum of any two angles is supplementary with the sum of the other two and any single angle is supplementary with the sum of the other three. In general for supplementary angles x and y:


We will also need the identity and the following product to sum identity:



Apply the sine rule to triangles ABC, ADC and ABD within their common circumscribing circle ABCD radius r:

From this we obtain:

The product to sum identity has been applied twice and the middle two terms cancel out on account of being cosines of supplementary angles.

Similarly we can obtain an expression for the product of diagonals:

Once again the product to sum identity has been applied and the second term has been re-written in terms of its suppplementary angle.

We may now present Ptolemy's theorem with an addendum by way of the "marrying formula" for product of diagonals and sum of products of opposite sides:

where r is the radius of the circumscribing circle and are the angles subtended by sides respectively.

"Fluffy unsourced essay"[edit]

Although this proof involves some interesting trigonometric manipulations, its relative complexity underlines the exquisite simplicity and elegance of the original geometric proof nominally ascribed to Ptolemy but the actual origins of which disappear into the mists of antiquity - surely the product of some genius amongst those erudite and resourceful minds which over millenia conceived of,designed and brought to fruition the Great Pyramid(s) of Egypt. For it is no exaggeration to say that this crucial theorem is the 'mathematical DNA' which underpins the science of geodesy and only in comparitively recent times have we begun to understand the Pyramids not merely as tombs for the Pharaohs but as geodesic models of our planet built to a precision before which we can only stand in awe.

The Master Theorem and its Corollaries[edit]

In the case of a circle of unit diameter the sides of any cyclic quadrilateral ABCD are numerically equal to the sines of the angles and which they subtend. Similarly the diagonals are equal to the sine of the sum of whichever pair of angles they subtend. We may then write Ptolemy's Theorem in the following trigonometric form:

Corollary 1: Pythagoras' Theorem

Applying certain conditions to the subtended angles and it is possible to derive a number of important corollaries using the above as our starting point. In what follows it is important to bear in mind that the sum of angles .

Corollary 1. Pythagoras' Theorem[edit]

Let and (Since opposite angles of a cyclic quadrilateral are supplementary). Then:

Corollary 2. The Law of Cosines[edit]

Corollary 2: The Law of Cosines

Let . The rectangle of corollary 1 is now a symmetrical trapezium with equal diagonals and a pair of equal sides. The parallel sides differ in length by 2x units where

It will be easier in this case to revert to the standard statement of Ptolemy's Theorem:

The cosine rule for triangle ABC.

Corollary 3: Compound Angle Sine (+)[edit]


Formula for compound angle sine (+)

Corollary 4: Compound Angle Sine (-)[edit]


Formula for compound angle sine (-).

This derivation corresponds to the 'Third Theorem' as chronicled by Ptolemy in Almagest. In particular if the sides of a pentagon (subtending 360) and of a hexagon (subtending 300) are given, a chord subtending 60 may be calculated. This was a critical step in the ancient method of calculating tables of chords.

Corollary 5: Compound Angle Cosine (+)[edit]

This corollary is the core of the "Fifth Theorem" as chronicled by Ptolemy in Almagest.


Formula for compound angle cosine (+)

Despite lacking the dexterity of our modern trigonometric notation, it should be clear from the above corollaries that in Ptolemy's theorem (or more simply the 'Second Theorem') the ancient world had at its disposal an extremely flexible and powerful trigonometric tool which enabled the cogniscenti of those times to draw up accurate tables of chords (corresponding to tables of sines) and to use these in their attempts to understand and map the cosmos as they saw it. Since tables of chords were drawn up by Hipparchus three centuries before Ptolemy, we must assume he knew of the 'Second Theorem' and its derivatives. Following the trail of ancient astronomers, history records the star catalogue of Timocharis of Alexandria. If, as seems likely, the compilation of such catalogues required an understanding of the 'Second Theorem' then the true origins of the latter disappear thereafter into the mists of antiquity but it cannot be unreasonable to presume that the astronomers, architects and construction engineers of ancient Egypt may have had some knowledge of it.


The golden ratio follows from this appliation of Ptolemy's theorem
  • Any square can be inscribed in a circle whose center is the barycenter of the square. If the common length of its four sides is equal to then the length of the diagonal is equal to according to the Pythagorean theorem and the relation obviously holds.
  • More generally, if the quadrilateral is a rectangle with sides a and b and diagonal c then Ptolemy's theorem reduces to the Pythagorean theorem. In this case the center of the circle coincides with the point of intersection of the diagonals. The product of the diagonals is then c2, the right hand side of Ptolemy's relation is the sum a2 + b2.
  • A more interesting example is the relation between the length a of the side and the (common) length b of the 5 chords in a regular pentagon. In this case the relation reads b2 = a2 + ab which yields the golden ratio
Side of the inscribed decagon
  • If now diameter AE is drawn bisecting DC so that DE and CE are sides c of an inscribed decagon, Ptolemy's Theorem can again be applied - this time to cyclic quadrilateral ADEC:

where k is the golden ratio.

Whence the side of the inscribed decagon is obtained in terms of the circle diameter. Pythagoras' Theorem applied to right triangle AED then yields "b" in terms of the diameter and "a" the side of the pentagon is thereafter calculated as .

"The diameter of a circle being given, the sides of the triangle, tetragon, pentagon, hexagon and decagon, which the same circle circumscribes, are also given."

De Revolutionibus Orbium Coelestium: Liber Primum: Theorem Primum

When applied repeatedly, Ptolemy's theorem allows to compute the length of all diagonals for a polygon inscribed in a circle with vertices P1, ..., Pn, if the sides are given together with all the length values of the "next to sides" chords connecting two vertices Pi and Pi+2 (with indices taken modulo n).


[1]. Then again [1]

  1. ^ a b Ptolemy's Theorem Cite error: Invalid <ref> tag; name "X" defined multiple times with different content (see the help page).

Time Continuous Mortgage Model[edit]

In the same way that it is possible to derive the formula for continuous compounding by taking to infinity the frequency (N) of compounding periods (N = 12 for monthly compounding), we can derive a formula for a 'continuous payment' mortgage.

In this article the derivation is presented and the result compared with a well known physical system which exhibits the same mathematical characteristics. The time continuous mortgage function obeys a first order linear differential equation and an alternative derivation thereof is obtained by solving the equation using Laplace transforms.

Derivation of Time Continuous Equation[edit]

The classical mortgage formula to determine the monthly payment on a loan of amount P taken out for a period of n months at a monthly interest rate of i% is:

We begin with a small adjustment of the formula: replace i with r/N where r is the annual interest rate and N is the annual frequency of compounding periods (N = 12 for monthly payments). Also replace n with NT where T is the total loan period in years. In this more general form of the equation we are calculating x as the fixed payment corresponding to frequency N. For example if N = 365 , x corresponds to a daily fixed payment:

Note that Nx is simply the amount paid per year - in effect an annual repayment rate . It is well established that:

Applying the same principle to the formula for annual repayment, we can determine a limiting value:

Figure 1

Having determined and noting that the balance due P(t) on a loan t years after its inception is simply the present value of the remaining payments, we may re-arrange the above equation and write:

The graph(s) in the diagram are a comparision of balance due on a mortgage (1 million for 20 years @ r = 10%) calculated firstly according to the above time continuous model and secondly using the Excel PV function. As may be seen the curves are virtually indistinguishable - calculations effected using the model differ from those effected using the Excel PV function by a mere 0.3% (max). The data from which the graph(s) were derived can be viewed here.

Comparision with Similar Physical Systems[edit]

Define the 'reverse time' variable z = T - t. (t=0, z=T and t=T, z=0). Then:

This may be recognized as a solution to the 'reverse time' differential equation:

Electrical/electronic engineers and physicists will be familiar with an equation of this nature: it is an exact analogue of the type of differential equation which governs (for example) the charging of a capacitor in an RC circuit:

The key characteristics of such equations are explained in detail in the Wiki page on RC circuits. For home owners with mortgages the important parameter to keep in mind is the time constant of the equation which is simply the reciprocal of r the annual interest rate. So (for example) the time constant when the interest rate is 10% is 10 years and the period of a home loan should be determined - within the bounds of affordability - as a minimum multiple of this if the objective is to minimise interest paid on the loan.

Ordinary Time Differential Equation[edit]

The concept of a 'reverse time variable' is somewhat abstract: it was employed above to demonstrate the similarity between the equations governing mortgage balance and physical systems such as the RC circuit referred to.

In ordinary time - given interest rate r and annual repayment rate - the mortgage balance function satisfies the following differential equation:

From this we may obtain the Laplace transform P(s):

Using a table of LaPlace transforms and their time domain equivalents, P(t) may be determined:

In order to fit this solution to the particular start and end points of the mortgage function we need to introduce a time shift of T years (T = loan period) to ensure the function reaches zero at the end of the loan period:

Note that both the original solution and 'time shifted' version satisfy the original differential equation whence both are derived.

Calculation of Accumulated Interest and Principal Payments[edit]

Re-arranging the original differential equation we obtain:

Integrating both sides of the equation yields:

The first integral on the right hand side determines the accumulated interest payments from time of inception to time t whilst the second determines the accumulated principal payments over the same period. The sum of these interest and principal payments must equal the cumulative fixed payments at time t ie Mat. Evaluating the first integral on the right we obtain an expression for I(t), the interest paid:

Unsuprisingly the second integral evaluates to P0 - P(t) and therefore:

The reader may easily verify that this expression is algebraically identical to the one above.

Calculation of Interest Rate[edit]

In the discrete time interval model, calculation of a mortgage based interest rate given the remaining parameters has not been possible using analytic methods. Implementations such as the Excel 'Rate' function employ a numerical 'trial and improvement' method to determine interest rate. At first glance this would also seem to be the case for the continuous repayment model. Given

we may write

In order to visualise the above as a function of r (for which we wish to determine zeroes), it will be helpful to select numerical values of P0, Ma and T as 10000, 6000 and 2 respectively and plot as shown at right. It will be noted that the function has a minimum value which can be determined by differentiation:

Noting that the function is approximately parabolic between the roots at r=0 and the sought value, we may approximate the required root as:

Using this as a starting point, increasingly accurate values for the root may be determined by repeated iterations of the Newton/Rhapson algorithm:

However some experimentation on Wolfram alpha reveals that an exact analytical solution employing the Lambert-W or 'product log' function can be obtained. Setting s = MaT/P0

Concluding Remarks[edit]

The concept of a 'continuous repayment' mortgage is a somewhat theoretical construct. Whether it has practical value or not is a question that would need to be carefully considered by economists and actuarials. An obvious question which may be asked is what is the 'real world' meaning of the limiting annual payment referred to in many of the calculations effected above? However the 'time continuous' model does provide some meaningful insights into the behaviour of the discrete mortgage balance function - in particular that it is largely governed by a time constant equal to the reciprocal of r the nominal annual interest rate. And if a mortgage were to be paid off via fixed daily amounts, then balance due calculations effected using the model would - in general - be accurate to within a small fraction of a percent.


  • Kreyszig, Erwin, Advanced Engineering Mathematics (1998, Wiley Publishers, USA), ISBN 0471154962.
  • Munem, M.A and Foulis D.J, Algebra and Trigonometry with Applications (1986, Worth Publishers, USA), ISBN 0879012811