^{1} This part (Part 1) will contain the necessary mathematical and non-mathematical tools which Abū al-Wafāʾ needed for the solutions? i.e. this section will include Abū al-Wafāʾ's main achievements in trigonometry.
^{2} This part (Part 2) will show that one of Abū al-Wafāʾ's methods for the Qibla is still the easiest.
^{3} The Qibla, which is deeply related to the daily observance of the second pillar of Islam, was a constant generator of a scientific environment inside the Arabic-Islamic civilization. This environment, which encouraged and motivated scientists, was behind many great achievements and discoveries, particularly in plane and spherical trigonometry and their applications in spherical astronomy. The Arab scientists who worked and made contributions in solving the problem of the Qibla were: al-Khwārizmī (d. c. 850), Ḥabash al-Ḥāsib (d. between 864 and 874), al-Nayrīzī (d. c. 940), al-Battānī (d. 929), Abū al-Wafāʾ (d. either in 997 or 998), Ibn Yūnus (d. 1009), al-Sijzī (d. c.1020), Abū Naṣr (d. 1036), Ibn al-Haytham (d. 1041), al-Bīrunī (d. 1048), al-Ṭūsī (d. 1274), Ibn al-Shāṭir (d. 1375), and al-Khalīlī (d. c. 1380), among others.
^{4} Abū al-Wafāʾ was born in Būzjān, a city in Iran, on 10 June 940 and died either in 997 or in 998 in Baghdad. At the time of Abū al-Wafāʾ, there were other distinguished scientists in Baghdad, such as al-Qūhī and al-Sijzī, and others outside Baghdad, such as Abū Naṣr ibn ʿIrāq, Abū Maḥmūd al-Khujandī, Kūshyār ibn Labbān, and Abū Rayḥān al-Bīrūnī.
^{5} The Almagest of Abū al-Wafāʾ consists of seven books, and the solutions of the Qibla appear in chapter 16 of Book IV (in chapter 15 he discusses the determination of the distance between locations as introduction to the Qibla). The pure mathematical achievements appear in chapters 5 and 6 of Book I (plane trigonometry) and chapter 1 of Book II (spherical trigonometry).
^{6} In the case when the person is facing true south, the Qibla is the supplementary angle (angle CBM).
^{7} This formula is known as the four-parts formula, and will be discussed in the conclusion. To apply formula (1) all over the globe there are some conditions, but the formula is perfect for the northern hemisphere (as in the particular case in Fig. 1). Abū al-Wafāʾ only deals with the northern hemisphere and with positive values for the terrestrial longitude and latitude.
^{8} Smart W. M., Text-Book on Spherical Astronomy (Cambridge, 1965), p. 12.
^{9} The distance between Mecca and the location, e.g. arc BM in Fig. 1.
^{10} λ _{e} will be explained later under points 1.5 and 1.6.
^{11} All these methods and their proofs will be discussed.
^{12} At that time in the Arabic scientific culture, the rule was also known as The Compound Ratio.
^{13} This is found in a collection of eleven treatises on astronomy and geometry by different well-known muslim scientists [as al-Khwārizmī (d. c. 850), al-Sijzī, and al-Qūhī] printed in Hyderabad (India) in 1948 (Arabic).
^{14} Before al-Nayrīzī and al-Khāzin, Thābit ibn Qurra (d. 901) worked on the quadrilateral and simplified it by discussing many simple cases; see H. Bellosta, “Le traité de Thābit ibn Qurra sur La figure secteur”, P. Crozet, “Thābit ibn Qurra et la composition des rapports” and Eberhard Knobloch, “La traduction latine du livre de Thābit ibn Qurra sur la figure secteur”, in Rashed R. (ed.), Thābit ibn Qurra, Science and Philosophy in Ninth-Century Baghdad, Scientia Graeco-Arabica, vol. 4 (Berlin/New York, 2009), respectively pp. 335–90, 391–535, 537–97.
^{15} Kitāb fī mā yaḥtāj ilayh al-kuttāb wa-al-ʿummāl min ʿilm al-ḥisāb (Book on What is Necessary From the Science of Arithmetic for Scribes and Businessmen). Saidan A.S.: “The arithmetic of Abū'l- Wafāʾ”, Isis, 65 (1974): 367–74. Also, Saidan A.S., Arabic Arithmetic - ʿIlm al-ḥisāb al-ʿarabi (Amman, 1971), pp. 58–268.
^{16} Kitāb fī mā yaḥtāj ilayh al-ṣāniʿ min al-aʿmāl al-handasiyya (Book on What is Necessary From Geometric Construction for the Artisan). Al-Ali S. A., Mā yaḥtāj ilayh al-ṣāniʿ min al-aʿmāl al-handasiyya (Baghdad, 1979). This book has been studied by several historians, like F. Woepcke, H. Suter, A. Youschkevitch, and S. Krasnova.
^{17} This is mentioned in al-Fihrist.
^{18} Neugebauer O. and Rashed R., “Sur une construction du miroir parabolique par Abū al-Wafāʾ al-Būzjānī”, Arabic Sciences and Philosophy, 9 (1999): 261–77.
^{19} Toomer G. J., “The chord table of Hipparchus and the early history of Greek trigonometry”, Centaurus, 18 (1973): 6–28.
^{20} The chord was the only function used in the Greek period. Toomer G. J., Ptolemy's Almagest (London, 1984).
^{21} Kennedy E. S., “The history of trigonometry”, in Studies in the Islamic Exact Sciences (Beirut, 1983), pp. 3–29.
^{23} It also means “fold” in Latin.
^{24} This is almost a century and half after Abū al-Wafāʾ's death.
^{25} In a circle with radius 1, it is defined as: x = 1 − cos x line AC in Fig. 2. Abū al-Wafāʾ tabulates its values in the table of sines, but ignores it in his spherical theorems and deals with the cosine instead.
^{26} The answers will be written in the sexagesimal system as Abū al-Wafāʾ did. He usually uses the jummal arithmetic (the Arabic alphabet; which was common in astronomy at that time) to express the numerals, but sometimes the numerals of these forms which are (from left to right): 9, 8, 7, 6, 5, 4, 3, 2, 1, 0. He also uses a circle of radius 1 on many occasions (restricted to the functions tangent, cotangent, secant, and cosecant); see footnote 70 below.
^{27} When a number is written in sexagesimal notation, as is common today, the semicolon “;” separates the integral part from the fractional part. Since Abū al-Wafāʾ, in most of his numerical examples, uses a circle of radius 60, to obtain the same answers as those of Abū al-Wafāʾ, for the trigonometric values, move the semicolon “;” one place to the right.
^{28} Regarding the edited texts of Abū al-Wafāʾ, see Moussa A., Almagest Abī al-Wafāʾ al-Būzjānī (Beirut, 2010). In the original texts, the phrases that are bound by parentheses [ ] are additions or explanations.
^{29} This is a corollary of proposition 15 of Book IV of the Elements.
^{30} Abū al-Wafāʾ discusses the determination of these two values in section 7 of chapter 5 of Book I, after he has proved the half, double, sum, and difference formulas for sines. Computation of these two values is independent of the trigonometric formulas, and therefore I place them here.
^{31} The calculations of the side of the hexagon and the decagon were known to mathematicians before Abū al-Wafāʾ; see Rashed R., Œuvre mathématique d'al-Sijzī. Volume 1: Géométrie des coniques et théorie des nombres au X^{e} siècle, Les Cahiers du Mideo, 3 (Louvain-Paris, 2004). See also Rashed R., Les mathématiques infinitésimales du IX^{e} au XI^{e} siècle, vol. III: Ibn al-Haytham. Théorie des coniques, constructions géométriques et géométrie pratique (London, 2000).
^{32} Proposition 9, book XIII of the Elements.
^{33} This is because, in the right angle triangle OAB, side OA, which is the radius, is also the side of the hexagon.
^{34} By substituting the value of the side of the decagon, in the second method, one obtains the new formula for the side of the pentagon expressed only in terms of the radius.
^{35} All places are correct.
^{36} The more accurate result is 1; 10, 32, 3, 13, 44.
^{37} The more accurate answer is 0; 51, 57, 41, 29, 13, 58, 58.
^{38} Abū al-Wafāʾ usually ignores the word “respectively”.
^{39} DB, the diameter, is equal to 2.
^{40} “Minutes” means that the number (in sexagesimal system) is divided by 60, i.e. as if the number is divided by 10 in the decimal system.
^{41} This might show how important the versed sine was. In his table of sines, he tabulates the values of the versed sine and not the cosine. On the contrary, in his spherical trigonometry and his astronomical applications he very rarely uses the versed sine (maybe only on two or three occasions), but the cosine tens of tens.
^{42} The more accurate result is 0; 0, 29, 27, 7, 34, 9. His result is correct to 9 decimal places.
^{43} Notice that he also does not deduce the half formula directly from the sum formula by putting x = y.
^{44} The first figure is for the sum case, and the second is for the difference. Abū al-Wafāʾ presents three figures for three different cases for the difference, and one figure for the sum case.
^{45} In both circles, 1 and 2 of Fig. 6, the sine of arc AC is the wanted. In circle 1, arc AC is the sum of arcs AB and BC, and in circle 2, it is the difference between arcs AB and BC.
^{47} Notice that he determines sin 7.5° from sin 30° by applying the half formula twice. The more accurate results are respectively 0; 36, 31, 32, 28, 7, 11 and 0; 22, 57, 39, 37, 17, 0.
^{48} Aaboe A., Episodes from the Early History of Astronomy (New York, 2001).
^{49} To express the conclusion that DJ ≪ CI, Abū al-Wafāʾ writes: “thus DJ is much smaller than CI”.
^{50} He first approximates the sine of half degree, and then uses the double formula to compute sin 1°.
^{51} The scales are not correct. The figure is identical to the figure that Abū al-Wafāʾ uses.
^{52} Abū al-Wafāʾ expresses 1/4 as one-fourth, 1/8 as one-eight, 1/16 as half one-eight, and 15/32 as 15 out of 32.
^{53} The more accurate result is 0; 0, 35, 20, 32, 27, 30, 59.
^{54} The more accurate result is 0; 0, 29, 27, 7, 34, 9.
^{55} In the section of half formula he calculates it and obtains 0; 0, 29, 27, 7, 34, 49.
^{56} The more accurate result is 0; 23, 33, 42, 23, 45, 48. The results of these three values are correct to either 8 or 9 decimal places.
^{57} Notice that Abū al-Wafāʾ is able to move the terms of the inequality from this side to that of the inequality.
^{58} The more accurate result is 0; 0, 31, 24, 55, 54, 0, 12. His answer was correct to 8 decimal places.
^{59} The more accurate result is 0; 1, 2, 49, 43, 11, 14, 44. His answer was correct to 8 decimal places.
^{60} The Greek mathematicians tried to solve the problem of trisection of an angle with the ruler and compass. In his Almagest, Ptolemy also mentioned that one can not find “chord of half” from “chord of one and half” by geometrical means (ruler and compass).
^{61} The approximation of sin 1° was raised by al-Khāzin and also discussed by Abū al-Jūd (fl. in 10^{th} century); see Rashed R., “Les constructions géométriques entre géométrie et algèbre: L'épître d'Abū al-Jūd à al-Bīrūnī”, Arabic Sciences and Philosophy, 20.1 (2010): 1–51.
^{62} Debarnot M.-Th., “Trigonometry”, in Rashed R. (ed.), Encyclopedia of the History of Arabic Science, 3 vols. (London and New York, 1996), vol. II, pp. 495–538.
^{63} The values that were computed directly from the basic values were of higher accuracy (about 11 decimal places), but those computed by using the approximated value sin 1° were of lesser accuracy (about 8 decimal places).
^{64} This column will be used for linear approximation, i.e. to approximate the sine values that are not in the table; see next section. In his table of chords, Ptolemy also had such a column.
^{65} Here the accuracy of course is not as high as in the table of sines.
^{66} This kind of computation is important as he uses it also in determination of the Qibla.
^{67} The figure appears on folio 13 of his Almagest.
^{68} Let its value be x.
^{69} He will use it only once in one of his methods for determining the distance between two locations.
^{70} For more details about Fig. 9 and the development of the trigonometric functions, see Moussa A., “The trigonometric functions as they were in the Arabic-Islamic civilization”, Arabic Sciences and Philosophy, 20.1 (2010): 93–104.
^{71} As if the number is divided by 10 in the decimal system.
^{72} This second column will end with zero as the first one ended with 90. In this original text, a phrase was underlined for importance.
^{73} In this regard, see also the paragraph “The Tangent Rule” and footnote 88.
^{74} He was contemporary to Abū al-Wafāʾ.
^{75} Even at the time of al-Ṭūsī, they were known under this name. In his The Quadrilateral, al-Ṭūsī himself referred to them under this same expression: al-shakl al-mughnī.
^{76} Abū al-Wafāʾ used it in one of his earlier works as mentioned in the introduction.
^{77} Muʿādh al-Jayyānī (d. 1097), Spanish-Arab mathematician, in his treatise Kitāb Majhūlat qisiy al-kura (The Book on Unknown Arcs of a Sphere), proved the law of sines by means of Menelaus's theorem.
^{78} The main source here is al-Bīrūnī's book Keys of Astronomy; see Debarnot M.-Th., Al-Bīrūnī Kitāb Maqālīd ʿIlm al-Hayʾa (Damas, 1985).
^{80} There is no need here to show these cases and their proofs. This could be a subject of another occasion.
^{81} Notice that Abū al-Wafāʾ worked out the cosine rule for a spherical triangle with only one right angle, before he proved the law of sines.
^{82} It was the most used in the applications together with the tangent rule.
^{83} Only one proof will be discussed.
^{84} For example, in his Keys of Astronomy, the young al-Bīrūnī was aware of the importance of this point and stated: “The proofs would be easy for those who could imagine the lines inside the sphere”.
^{85} Only the original texts of the proofs of the sine and tangent rules will be presented here in this paper as they are the most important, and the two other theorems (cosine rule and law of sines) were proved by direct application of the sine rule, as will be shown. ﺍ = A, ب = B, ج = C, د = D, ﻫ = E, ﺯ = G, ﺡ = H, ﻁ = I, ﻱ = J, ﻚ = K.
^{86} The letters used in the proof coincide also with Fig. 10.
^{87} As a consequence: also the secant and cosecant. This is obvious because of the relationships among the trigonometric functions (appeared before under point 1.2).
^{88} The reason was actually the concept “infinity”. In modern mathematics, particularly in analysis and set theory, the tangent function, which gives a one-to-one correspondence between ] − π/2, π/2[ and (the real numbers) is usually a good example on showing that the number of points in the real number line is equal to the number of points in any segment of that line.
^{89} As noticed, Abū al-Wafāʾ formulated the sine rule and tangent rule together in one paragraph.
^{90} The letters used in the proof coincide also with Fig. 12.
^{91} Later al-Bīrūnī classified the spherical triangles by their angles in a systematic way, giving formulas for each, enabling one to determine the unknown sides and angles (of the spherical triangle) from the known sides and angles.
^{92} This work of al-Ṭūsī is the same as Napier's rules for right-angled spherical triangles; this will be used in the conclusion.
^{93} Point A is a pole for circle EDG.
^{94} In his proof, notice that he again works entirely on the surface of the sphere by direct application of the proven sine rule (as in the case of the cosine rule and the other form of the sine rule mentioned before).
^{95}
$\widehat{B}$
and
$\widehat{C}$
are respectively the angles
B and
C of the spherical triangle
ABC.
^{96} Hipparchus, Ptolemy, al-Khwārizmī, Ḥabash, al-Nayrīzī, al-Khāzin, and al-Battānī.
^{97} Abū Naṣr, al-Sijzī, al-Khujandī, and al-Bīrūnī.
^{98} Al-Jayyānī proved the law of sines by means of Menelaus's theorem.
^{99} This is the first known book on trigonometry as an independent science.
^{100} This will be used in the example he gives on determination of the Qibla.
^{101} At that time he was the ruler of the Buyid dynasty.
^{103} This is not found in Abū al-Wafāʾ's Almagest, but coincides with his description.
^{104} The modern data is officially about 33; 21, so there are about 4 seconds in difference. If one calculated the latitude of al-Raqqa according to al-Battānī's data, it would be 36; 01, and the modern data is given to be about 35; 56. Again, about 5 seconds in difference. Notice that they both determined the obliquity of the ecliptic to be 23; 35, so their observations and instruments were approximately of the same degree of accuracy. The modern data are according to worldatlas.com.
^{105} In his methods and computations Abū al-Wafāʾ was interested in the northern locations.
^{106} The more accurate result is 0; 33, 2, 36, 17, 23.
^{107} In his applications, he also used the values 0; 50, 4, 52, 10 and 0; 50, 4, 52, 40. The more accurate result is 0; 50, 4, 52, 32, 35.
^{108} In his applications, he also used the values: 0; 39, 35, 15, 56 and 0; 39, 35, 15, 26. The more accurate result is 0; 39, 35, 15, 55, 31.
^{109} The more accurate result is 1; 30, 56, 13, 56, 24.
^{110} Al-Battānī emphasized that the length of the stick should be equal to half the radius in order to achieve the best result.
^{111} To find point C, find the midpoint of chord AB; this was what al-Battānī suggested.
^{112} This is a collection of treatises on different subjects. In the margins of the papers that were taken from Abū al-Wafāʾ's Almagest, it is stated clearly that: “Taken from Abū al-Wafāʾ”. And the writing style of these papers is precisely the same as that of Almagest; see Kennedy E. S., “Applied mathematics in the tenth century: Abū'l-Wafāʾ calculates the distance Baghdad – Mecca”, Historia Mathematica, 11 (2) (1984): 193–206. Kennedy did not notice that it was a part of Abū al-Wafāʾ's Almagest.
^{113} Abū al-Wafāʾ presented it in chapter 16.
^{114} It will be used as numerical example.
^{115} Such terms were used before Abū al-Wafāʾ, e.g. Ḥabash used the equated longitude and the equated latitude; this is according to al-Bīrūnī in his Keys of Astronomy.
^{116} Regarding the longitudes, Abū al-Wafāʾ, in his Almagest, surprisingly, does not mention a word about determination of the longitudes, and he uses the data that were available at his time; these data probably go back to al-Khwārizmī. But towards the end of his life, in the year 997, Abū al-Wafāʾ was involved in a project together with al-Bīrūnī, using a lunar eclipse as a time signal, to determine the difference in longitude between their cities; Baghdad and Kath (a city in Uzbekistan). In fact, the difference in longitude is sufficient for the Qibla (no need for the individual longitudes if the difference is known). Later, in his works, al-Bīrūnī used methods depending on the distance between locations to determine the difference in longitude. In general, finding the longitudes was a huge project, and it was properly fixed only in modern times, e.g. after the invention of radio signals. See Kennedy, “Mathematical geography”, pp. 185–200, see also D. A. King, “Astronomy and Islamic society”, in Rashed (ed.), Encyclopedia of the History of Arabic Science, vol. I, pp. 128–84.
^{117} This method for determining the distance was adopted by al-Bīrūnī and appeared in his Keys of Astronomy.
^{118} In this case the minimum of the two latitudes is ϕ _{1}; the latitude of Mecca.
^{119} Abū al-Wafāʾ here uses the versed sine; he uses it very rarely despite the fact that he tabulated its values together with the sine. There is a proof given by Debarnot in “Trigonometry”. Her proof should not be far from that of Abū al-Wafāʾ; the techniques she used were also used in his Almagest. There is also another proof for the method by analemma given by Kennedy “Applied mathematics in the tenth century” in the same reference.
^{120} i.e. shifting the semicolon “;” one place to the left; division by 60.
^{121} The longitude is measured from west.
^{122} The more accurate product is 0; 2, 54, 41, 24, 41, 42, 42. Moreover: sin 3 = 0; 3, 8, 24, 33, 59 and cos 22 = 0; 55, 37, 51, 42, 45.
^{123} The answer is correct. His answers in this example were accurate because the numbers 3 and 22 were in his table of sines.
^{124} The quotient was correct.
^{125} The product was correct. When Abū al-Wafāʾ wanted to find the inverse of cosine, he used to find the inverse of sine and subtract the answer from ninety. The same did al-Bīrūnī, see Bruins E. M., “Ptolemaic and Islamic trigonometry, the problem of the Qibla”, Journal for the History of Arabic Science, 9 (1991): 45–68.
^{126} This was his result using the first method. In the numerical example he gave for the second distance method his answer was: 11; 43, 11, 48. Abū al-Wafāʾ was aware of this change and stated in the preface of his Almagest the following: “If there were different answers in the examples [for the same problem], the reader must not distrust our work; these changes are due to the approximations made to sines, chords, and tangents”.
^{127} In this particular case, one should face true south and turn along the west arc AC to face Mecca.
^{128} Approximately at May 28 and July 16. Al-Ṭūsī's results are the degree 8 of Gemini and 23 of Cancer. For this method and other approximation methods see King D. A., Astronomy in the Service of Islam, Variorum (Aldershot, 1993); see also King, “Astronomy and Islamic society”.
^{129} This first method is formula (3) in the introduction.
^{130} sin λ _{e} = sin Δ λ cos ϕ _{1}. This method for finding the direction of the Qibla was also adopted by al-Bīrūnī and appeared in his Keys of Astronomy.
^{131} This second method is formula (2) in the introduction.
^{132} The first two methods are the same. In the first one, he applied the sine rule, and in the second, he applied the law of sines. In his Keys of Astronomy, al-Bīrūnī did not apply the law of sines for this method but the sine rule.
^{133} In the conclusion, it will be shown that this third method gives formula (1).
^{134} Notice that arc BF is the difference between arcs BG and FG.
^{135} This third method for finding the direction of the Qibla was also adopted by al-Bīrūnī and appeared in his Keys of Astronomy. In his work, Taḥdīd, al-Bīrūnī derived spherical methods (or ‘a spherical method’) for the Qibla somehow similar to the first and second methods; see King, Astronomy in the Service of Islam.
^{136} In case ϕ _{2} < ϕ _{1}, see the determination of λ _{e} and ϕ _{e} under “the first method for the distance”.
^{137} The more accurate quotient is 0; 24, 16, 29, 25, 45.
^{138} The product was correct.
^{139} The quotient was correct.
^{140} This means the person should face true south and turn to the west 13 minutes and 49 seconds to face Mecca. In the other two numerical examples, his answer was 13; 49, 9, 19 in both examples.
^{141} They can be determined from the given geographical coordinates of B and Mecca M (as will be shown). In the figure, point N is the North Pole.
^{142} i.e. a formula for four consecutive parts (of the six parts of the triangle), as in Fig. 23.
^{143} There is a proof for this formula in Smart; see footnote 8 and Green R. M., Spherical Astronomy (Cambridge, 1985), p. 11.
^{144} Arc BN is the complement of the latitude of B, and arc MN is the complement of the latitude of M.
^{145} Notice that it does not matter whether ϕ _{2} < ϕ _{e} or ϕ _{2} > ϕ _{e} because either the angle or its supplement is the wanted, and Abū al-Wafāʾ dealt only with positive numbers, and used to take the absolute value of the difference.
^{146} In his applications, Abū al-Wafāʾ replaces tangent (cotangent) with its reciprocal cotangent (tangent) many times in his applications, as explained after the proof of the law of sines.
^{147} In his works e.g. Keys of Astronomy, al-Bīrūnī acknowledged Abū al-Wafāʾ as the discoverer of the last two points and credited them to him (al-Ṭūsī did the same in his famous work The Quadrilateral), and he highly appreciated the two points and considered them a great contribution to astronomy, and he described Abū al-Wafāʾ's methods for the Qibla as easy methods; see footnotes 70 and 92.