Poland Problems of Applied Sciences, 2017, Vol. 7, pp. 031 – 046 Szczecin dr n. tech. Andrzej Antoni CZAJKOWSKI a, mgr in ż., naucz. dypl. Sławomir Wawrzyniec SNASTIN a naucz. dypl. Lech Adam REWKOWSKI b a Higher School of Technology and Economics in Szczecin, Faculty of Automotive Systems Wy ższa Szkoła Techniczno-Ekonomiczna w Szczecinie, Wydział Systemów Automotive b 18 High School in the Complex School No. 5 in Szczecin 18 Liceum Ogólnokształc ące w Zespole Szkół Nr 5 w Szczecinie

ANALYTICAL AND NUMERICAL SOLVING OF RIGHT TRIANGLES WITH GIVEN AND , BISECTOR OR MEDIAN OF A TRIANGLE

Abstract

Introduction and aims: The paper shows the analytical models of solving right triangles with appropriate discussion. For right triangles have been discussed six cases taking into account the altitude, bisector and median of a triangle. The main aim of this paper is not only to create some analytical algorithms for solving , but also their implementation in programs MS- Excel, MathCAD and Mathematica. Material and methods: Elaboration of six analytical cases of solving right triangles has been made on the basis of the relevant trigonometric properties occurring in a right triangle. In the paper have been used some analytical and numerical methods by using MS-Excel, MathCAD and Mathematica programs. Results: As some results have been obtained numerical algorithms in the programs MS-Excel, MathCAD and Mathematica for six analytical cases of solving right triangles taking into account the altitude, bisector and median of a triangle. Conclusion: Created numerical algorithms of solving the right triangles in the programs MS- Excel, MathCAD and Mathematica allow for faster significant performance calculations than the traditional way of using logarithms and logarithmic tables. Keywords: Trigonometry, right triangle, angle, bisector, median, triangle altitude, solving, numerical algorithms, MS-Excel, MathCAD, Mathematica. (Received: 01.10.2017; Revised: 15.10.2017; Accepted: 25.10.2017)

ANALITYCZNO-NUMERYCZNE ROZWI ĄZYWANIE TRÓJK ĄTÓW PROSTOK ĄTNYCH GDZIE DANE S Ą K ĄT I WYSOKO ŚĆ , DWUSIECZNA LUB ŚRODKOWA TRÓJKĄTA

Streszczenie

Wst ęp i cele: W pracy pokazano analityczne modele rozwi ązywania trójk ątów prostok ątnych wraz z odpowiedni ą dyskusj ą. Dla trójk ątów prostok ątnych omówiono sze ść przypadków z uwzgl ędnie- niem wysoko ści, dwusiecznej i środkowej trójk ąta. Głównym celem jest pracy jest nie tylko utwo- rzenie algorytmów analitycznych rozwi ązywania takich trójk ątów lecz równie ż ich implementacja w programach MS-Excel, MathCAD i Mathematica. Materiał i metody: Opracowanie sze ściu analitycznych przypadków rozwi ązywania trójk ątów prostok ątnych wykonano opieraj ąc si ę odpowiednich własno ściach trygonometrycznych wyst ępu- jących w trójk ącie prostok ątnym. Zastosowano metod ę analityczn ą i numeryczn ą wykorzystuj ąc programy MS-Excel, MathCAD i Mathematica. Wyniki: Otrzymano algorytmy numeryczne w programach MS-Excel, MathCAD i Mathematica dla sze ściu analitycznych przypadków rozwi ązywania trójk ątów prostok ątnych z uwzgl ędnieniem wysoko ści, dwusiecznej i środkowej trójk ąta. Wniosek: Utworzone algorytmy numeryczne rozwi ązywania trójk ątów prostok ątnych w progra- mach MS-Excel, MathCAD oraz Mathematica, pozwalaj ą na znaczne szybsze wykonanie oblicze ń ni ż drog ą tradycyjn ą z u życiem logarytmów i tablic logarytmicznych. Słowa kluczowe: Trygonometria, trójk ąt prostok ątny, kąt, dwusieczna, wysoko ść trójk ąta, algo- rytmy numeryczne, MS-Excel, MathCAD, Mathematica. (Otrzymano: 01.10.2017; Zrecenzowano: 15.10.2017; Zaakceptowano: 25.10.2017)

© A.A. Czajkowski, S.W. Snastin, L.A. Rewkowski 2017 Trigonometry / Trygonometria A.A. Czajkowski, S.W. Snastin, L.A. Rewkowski

1. Introduction to trigonometry

1.1. Definitions of

Let be given the right triangle ABC (angle ACB is the right angle) (Fig. I).

B β c a

• α C A b

Fig. I. The right triangle with catheti a and b and c Source: Elaboration of the Authors where a, b, c mean respectively the length of shorter cathetus, greater cathetus and hypote- nuse. The sides a, b and c satisfy the condition: a2 + b2 = c2 (1) and acute α and β satisfying the following condition [3],[4]: π α =β+ . (2) 2 Definition 1. The sine of acute angle is the ratio of the length of cathetus opposite this angle to the length of hypotenuse, which express the formulae [7], [10]: a b sin( α) = , sin( β) = . (3) c c Definition 2 . The cosine of acute angle is the ratio of the length of cathetus adjacent this angle to the length of hypotenuse, which express the formulae [7], [10]: b a cos( α) = , cos( β) = . (4) c c Definition 3 . The tangent of acute angle is the ratio of the length of cathetus opposite this angle to the length of cathetus adjacent to that angle, which express the formulae [7], [10]: a b tg( α) = , tg( β) = . (5) b a Definition 4 . The cotangent of acute angle is the ratio of the length of cathetus adjacent this angle to the length of cathetus opposite to that angle, which express the formulae [7], [10]:

32 Analytical and numerical solving of right triangles with given angle and altitude, bisector or median of a triangle

b a ctg( α) = , ctg( β) = . (6) a b

Theorem 1 . (Basic relationships in the triangle)

In any length of each side of a triangle is less than the sum of the length of the other side and higher than the absolute value of the difference in length of the sides [11], [13]-[16]: | c b | b − c | < a < b + ,c (7) | c a | a − c | < b < a + ,c (8) | b a | a − b | < c < a + b . (9)

1.2. Solving right triangles with given angle and altitude, bisector or median of a triangle

For the right triangle ABC shown in figure I, there are six cases of solving which are given below (Tab. 1).

Tab. 1. The discussion of solutions for the right triangles

Case: Data: Solution:

π Ac Ac 2A c 1 A =β α− a = b = c = c cos( α) sin( α) sin(2 α) α 2

π Ac Ac 2A c 2 A α = β− a = b = c = c sin( β) cos( β) sin(2 β) β 2

π α π α  −    π π α Bβ cos   Bβ cos  −  =β α− =  −   4 2   4 2  3 Bβ a Bβ cos   b = = 2  4 2  α c α )(tg sin( α)

 β  π β β Bβ cos   α = β− =   =   β  2  4 Bβ a Bβ cos   b Bβ cos   )(tg = 2  2   2 c β cos( β)

M2 ⋅ α)(tg 2M 2M π a = b b = b c = b 5 Mb =β α− + 2 α 1+ tg4 2 α)( cos( α) 1+ tg4 2 α)( α 2 1 tg4 )(

M2 ⋅ctg β)( M2 2M π a = b b = b c = b 6 Mb α = β− + 2 β + 2 β sin( β) 1+ ctg4 2 β)( β 2 1 ctg4 )( 1 ctg4 )(

Notes :

Ac – an altitude for the triangle side c, Bβ – a bisector of the angle β,

Mb – a median of the triangle side b.

33 A.A. Czajkowski, S.W. Snastin, L.A. Rewkowski

2. Solving of right triangles

2.1. Case 1: Altitude of a triangle and an angle by the greater cathetus

‹ Definition 5: The altitude of a triangle is the perpendicular dropped from a vertex onto the opposite side. ‹ Problem: Solve a right triangle with given the altitude of triangle and the angle by the big- ger cathetus.

2.1.1. Theoretical analysis

‹ Let be the right triangle as shown on the figure 1.

B D β c a A c • α C A b

Fig. 1. Right triangle ABC with given altitude Ac and the angle α Source: Elaboration of the Authors

‹ Data in ∆ABC: Length of the altitude Ac of a triangle and a measure of the angle α. ‹ Unknown in ∆ABC: Length of the triangle sides a, b and c and a measure of the angle β. ‹ Solution: ♦ From the properties of angles in a right triangle we obtain: π =β α− . (10) 2 ♦ From ∆BCD we obtain: A A A c = sin( β), a = c , a = c . (11) a sin( β) cos( α) ♦ From ∆ACD we have: A A c = sin( α), b = c . (12) b sin( α) ♦ From ∆ABC we know, that: a 2 + b2 = 2 ,c c = a 2 + b2 . (13) ♦ From the formulae (11)-(13) implies, that:

A2 A2 A2[sin 2 (α) + cos 2 (α)] A A2 c = c + c = c = c = c . (14) sin 2 (α) cos 2 (α) sin 2 (α)cos 2 (α) sin( α)cos( α) sin( 2α) π A A A2 ‹ Answer: =β − α, a = c , b = c , c = c . 2 cos( α) sin( α) sin( 2α)

34 Analytical and numerical solving of right triangles with given angle and altitude, bisector or median of a triangle

2.1.2. Numerical algorithms in MS-Excel, MathCAD and Mathematica programs

For numerical analysis we take into account: the altitude A c = 12,9 and angle α = 31 ° ♦ Program MS-Excel 7.0 [2],[8] Algorithm: Commentary:

A6=12,9 Given length of the altitude A c A7=31 Given measure of the angle α [º] A8=A7*PI()/180 Command for the angle α [rad], α = 0,541 A9=90-A7 Command for the angle β [º] A10=A6/COS(A8) Command for calculation of the side a A11=A6/SIN(A8) Command for calculation of the side b A12=2*A6/SIN(2*A8) Command for calculation of the side c 59 Result: measure of the angle β [º] 15,0 Result: length of the side a 25,0 Result: length of the side b 29,2 Result: length of the side c ♦ Program MathCAD 15 [9],[12] Algorithm: Commentary:

Ac:= 12.9 Given length of the altitude A c α0:= 31 Given measure of the angle α [º] α0 ⋅ π α := = 0.541052 Command for the angle α [rad] 180 β :0 = 90 − α0 = 95 Command for the angle β [º] Ac :a = = .51 049571 cos( α) Command and result: length of the side a Ac :b = = .25 046692 sin( α) Command and result: length of the side b Ac2 :a = = .29 220307 sin(2 α) Command and result: length of the side c ♦ Program Mathematica 7.0 [1],[5],[6] Algorithm: Commentary:

Ac:= 12.9 Given length of the altitude A c A0:= 31 Given measure of the angle α [º] A:=A0*N[ π]/180 Command for the angle α [rad] α = 0.541036 B=90-A0 Command for the angle β [º] a=Ac/Cos[A] Command: length of the side a b=Ac/Sin[A] Command: length of the side b c=2*Ac/Sin[2*A] Command: length of the side c 59 Result: measure of the angle β [º] 15.0494 Result: length of the side a 25.0474 Result: length of the side b 29.2208 Result: length of the side c Numerical results: a =15,0 b = 25,0 c = 29,2 α = 59 °.

35 A.A. Czajkowski, S.W. Snastin, L.A. Rewkowski

2.2. Case 2: Altitude of a triangle and an angle by the shorter cathetus

‹ Theorem 2: The three altitudes of any triangle insert in one point. ‹ Problem: Solve a right triangle with given the altitude of triangle and an angle by the shorter cathetus.

2.2.1. Theoretical analysis

‹ Let be a right triangle as shown on the figure 2.

B β D c a Ac • α C A b

Fig. 2. Right triangle ABC with given altitude Ac and the angle β Source: Elaboration of the Authors

‹ Data in ∆ABC: Length of the altitude Ac of the triangle and a measure of the angle β. ‹ Unknown in ∆ABC: Length of the triangle sides a, b and c and a measure of the angle α. ‹ Solution: ♦ From the properties of angles in a right triangle we obtain: π α = β− . (15) 2 ♦ From ∆BCD we have: A A c = sin( β), a = c . (16) a sin( β) ♦ From ∆ACD we obtain: A A A c = sin( α), b = c , b = c . (17) b sin( α) cos( β) ♦ From ∆ABC we know, that:

a 2 + b2 = 2 ,c c = a 2 + b2 . (18) ♦ From the formulae (16)-(18) implies, that:

A2 A2 A2[sin 2 β)( + cos 2 β)]( A A2 c = c + c = c = c = c . (19) sin 2 β)( cos 2 β)( sin 2 β)( cos 2 β)( sin( β)cos( β) sin( 2β) π A A A2 ‹ Answer: α = β− , a = c , b = c , c = c . 2 sin( β) cos( β) sin( β)2

36 Analytical and numerical solving of right triangles with given angle and altitude, bisector or median of a triangle

2.2.2. Numerical algorithms in MS-Excel, MathCAD and Mathematica programs

For numerical analysis, we take altitude A c = 12,9 and the angle β = 59 ° ♦ Program MS-Excel 7.0 [2],[8] Algorithm: Commentary:

A6=12,9 Given length of the altitude A c A7=59 Given measure of the angle β [º] A8=A7*PI()/180 Command for the angle β [rad], α = 1.030 A9=90-A7 Command for the angle α [º] A10=A6/SIN(A8) Command for calculation of the side a A11=A6/COS(A8) Command for calculation of the side b A12=2*A6/SIN(2*A8) Command for calculation of the side c 31 Result: measure of the angle α [º] 15,0 Result: length of the side a 25,0 Result: length of the side b 29,2 Result: length of the side c ♦ Program MathCAD 15 [9],[12] Algorithm: Commentary:

Ac:= 12.9 Given length of the altitude A c β0:= 59 Given measure of the angle β [º] β0 ⋅ π β := = .1 029744 Command for the angle β [rad] 180 α :0 = 90 − β0 = 31 Command for the angle α [º] Ac :a = =15.049571 sin( β) Command and result: length of the side a Ac :b = = .25 046692 cos( β) Command and result: length of the side b Ac2 :a = = .29 220307 sin(2 β) Command and result: length of the side c ♦ Program Mathematica [1],[5],[6] Algorithm: Commentary:

Ac:= 12.9 Given length of the altitude A c B0:= 59 Given measure of the angle β [º] B:=A0*N[ π]/180 Command for the angle β [rad] β = 0.541036 A=90-B0 Command for the angle α [º] a=Ac/Sin[B] Command: length of the side a b=Ac/Cos[B] Command: length of the side b c=2*Ac/Sin[2*B] Command: length of the side c 31 Result: measure of the angle α [º] 15.0498 Result: length of the side a 25.0454 Result: length of the side b 29.2194 Result: length of the side c Numerical results: a =15,0 b = 25,0 c = 29,2 α = 31 °.

37 A.A. Czajkowski, S.W. Snastin, L.A. Rewkowski

2.3. Case 3: Bisector and an angle opposite the bisector

‹ Definition 6: Any one of the three bisectors of the interior angles of a triangle is called a bisector of the triangle. ‹ Problem: Solve a right triangle with given bisector and an angle opposite the bisector. 2.3.1. Theoretical analysis

‹ Let be a right triangle as shown on the figure 3.

B

β c a Bβ

• α A C D b

Fig. 3. Right triangle with given the bisector B β and the angle α Source: Elaboration of the Authors

‹ Data in ∆ABC: Length of the bisector Bβ and a measure of the angle α. ‹ Unknown in ∆ABC: Length of the triangle sides a, b and c and a measure of the angle β. ‹ Solution: ♦ From the properties of angles in a right triangle we obtain: π =β α− . (20) 2 ♦ From ∆BCD we get: a  β   β   π α  = cos  , a = Bβ ⋅cos  , a = Bβ ⋅cos  −  (21) Bβ  2   2   4 2  ♦ From ∆ABC we have: a a = sin( α ,) c = , (22) c sin( α) b = (osc α ,) b = c⋅ (osc α ,) b = a ⋅ctg (α .) (23) c ♦ From the formulae (21)-(23) implies, that:  π α  Bβ ⋅cos  −   4 2  c = . (24) sin( α) ♦ From the formulae (23)-(24) implies, that:  π α  Bβ ⋅cos  −   4 2  b = . (25) tg( α)  π α   π α  Bβ ⋅ cos  −  Bβ ⋅cos  −   π α   4 2   4 2  ‹ Answer: =β 90 α−° , a = Bβ ⋅ cos  − , b = , c = .  4 2  α)(tg sin( α)

38 Analytical and numerical solving of right triangles with given angle and altitude, bisector or median of a triangle

2.3.2. Numerical algorithms in MS-Excel, MathCAD and Mathematica programs For numerical analysis, we assume that the bisector B β = 17,3 and angle α = 31 ° ♦ Program MS-Excel 7.0 [2],[8] Algorithm: Commentary:

A6=17,3 Given length of the bisector B β A7=31 Given measure of the angle α [º] A8=A7*PI()/180 Command for the angle α [rad], α = 0,541 A9=90-A7 Command for the angle β [º] A10=A6*COS((PI()/4)-(A8/2)) Command for calculation of the side a A11=A6*COS((PI()/4)-(A8/2))/TAN(A8) Command for calculation of the side b A12=A6*COS((PI()/4)-(A8/2))/SIN(A8) Command for calculation of the side c 59 Result: measure of the angle β [º] 15,1 Result: length of the side a 25,1 Result: length of the side b 29,2 Result: length of the side c ♦ Program MathCAD 15 [9],[12] Algorithm: Commentary:

Bb:= 17.7 Given length of the bisector B β α0:= 31 Given measure of the angle α [º] α0 ⋅ π α := = 0.541052 Command for the angle α [rad] 180 β :0 = 90 − α0 = 95 Command for the angle β [º]  π α  :a = Bb ⋅cos  −  = .51 049571  4 2  Command and result: length of the side a  π α  cos  −   4 2  Command and result: length of the side b :b = Bb ⋅ = .25 046692 tan( α)  π α  cos  −   4 2  Command and result: length of the side c :a = Bb ⋅ = .29 220307 sin( α) ♦ Program Mathematica 7.0 [1],[5],[6] Algorithm: Commentary:

Bb:= 17.3 Given length of the bisector Bβ A0:= 31 Given measure of the angle α [º] A:=A0*N[ π]/180 Command for the angle α [rad] α = 0.541036 B=90-A0 Command for the angle β [º] a=Bb*Cos[(3.1415/4)-(A/2)] Command: length of the side a b=Bb*Cos[(3.1415/4)-(A/2)]*Cot[A] Command: length of the side b c=Bb*Cos[(3.1415/4)-(A/2)]*(1/Sin[A]) Command: length of the side c 59 Result: measure of the angle β [º] 15.0573 Result: length of the side a 25.0604 Result: length of the side b 29.2361 Result: length of the side c Numerical results: a =15,0 b = 25,0 c = 29,2 β = 59 °.

39 A.A. Czajkowski, S.W. Snastin, L.A. Rewkowski

2.4. Case 4: Bisector and an angle through which the bisector passes

‹ Theorem 3: The three bisectors of a triangle are concurrent (meet in one point). ‹ Problem: Solve a right triangle with given a bisector and an angle through which the bisector passes.

2.4.1. Theoretical analysis

‹ Let be a triangle as shown on the figure 4.

B

β c a Bβ α • A C D b

Fig. 4. Right triangle with given the bisector B β and the angle β Source: Elaboration of the Authors

‹ Data in ∆ABC: Length of the bisector Bβ and a measure of the angle β. ‹ Unknown in ∆ABC: Length of the triangle sides a, b and c and a measure of angle α. ‹ Solution: ♦ From the properties of acute angles in a right triangle we get: π α = β− . (26) 2 ♦ From ∆BCD we get: a  β   β  = cos  , a = Bβ ⋅cos  . (27) Bβ  2   2  ♦ From ∆ABC we have: a  π  a = sin( α) = sin  β−  = cos( β), c = , (28) c  2  cos( β) b  π  = (osc α) = osc  β−  = sin( β), b = c⋅sin( β). (29) c  2  ♦ From the formulae (27) and (28) we obtain:  β  Bβ ⋅cos    2  c = . (30) cos( β) ♦ From the formulae (29) and (30) we obtain:  β  b = Bβ ⋅cos  ⋅ β .)(gt (31)  c   β  Bβ ⋅cos   π  β   β   2  ‹ Answer: =α β− , a = Bβ ⋅cos  , b = Bβ ⋅cos   ⋅ β),(tg c = . 2  2   2  cos( β)

40 Analytical and numerical solving of right triangles with given angle and altitude, bisector or median of a triangle

2.4.2. Numerical algorithms in MS-Excel, MathCAD and Mathematica programs For numerical analysis, we assume that Bβ = 17,3 and angle β = 59 ° ♦ Program MS-Excel 7.0 [2],[8] Algorithm: Commentary:

A6=17,3 Given length of the bisector B β A7=59 Given measure of the angle β [º] A8=A7*PI()/180 Command for the angle β [rad], α = 1,030 A9=90-A7 Command for the angle α [º] A10=A6*COS(A8/2) Command for calculation of the side a A11=A6*COS(A8/2)/(1/TAN(A8)) Command for calculation of the side b A12=A6*COS(A8/2)/(COS(A8)) Command for calculation of the side c 31 Result: measure of the angle α [º] 15,1 Result: length of the side a 25,1 Result: length of the side b 29,2 Result: length of the side c ♦ Program MathCAD 15 [9],[12] Algorithm: Commentary:

Bb:= 17.3 Given length of the bisector B β β0:= 59 Given measure of the angle β [º] β0 ⋅ π β := = .1 029744 Command for the angle β [rad] 180 α :0 = 90 − β0 = 31 Command for the angle α [º]  β  :a = Bb ⋅ cos   =15.049571 Command and result: length of the side a  2   β  :b = Bb ⋅ cos   ⋅ tan( β) = .25 046692 Command and result: length of the side b  2   β  cos   Command and result: length of the side c  2  :a = Bb ⋅ = .29 220307 cos( β) ♦ Program Mathematica 7.0 [1],[5],[6] Algorithm: Commentary:

Bb:= 17.3 Given length of the bisector Bβ B0:= 59 Given measure of the angle β [º] B:=A0*N[ π]/180 Command for the angle β [rad] β = 1.02971 A=90-B0 Command for the angle α [º] a=Bb*Cos[B/2] Command: length of the side a b=Bb*Cos[B/2]*Tan[B] Command: length of the side b c=Bb*Cos[B/2]*(1/Cos[B]) Command: length of the side c 31 Result: measure of the angle α [º] 15.0573 Result: length of the side a 25.0578 Result: length of the side b 29.2338 Result: length of the side c Numerical results: a =15,0 b = 25,0 c = 29,2 α = 31 °.

41 A.A. Czajkowski, S.W. Snastin, L.A. Rewkowski

2.5. Case 5: Median and an angle opposite the median

‹ Definition 7: The line segment connecting a vertex of a triangle with the midpoint of the opposite side is called a median of the triangle. ‹ Problem: Solve a right triangle with given median and an angle opposite the median.

2.5.1. Theoretical analysis

‹ Let be a triangle as shown on the figure 5.

B β c a M b • α C A b D

Fig. 5. The right triangle with given median M b and the angle α Source: Elaboration of the Authors

‹ Data in ∆ABC: Length of median Mb and a measurement of the angle α. ‹ Unknown in ∆ABC: Length of the triangle sides a, b and c and a measure of angle β. ‹ Solution: ♦ From the properties of angles in a right triangle we obtain: π =β α− . (32) 2 ♦ From ∆ABC we have: a = sin( α), a = c⋅sin( α), (33) c b = cos( α), b = c⋅cos( α). (34) c ♦ From ∆BCD and Pythagoras theorem we have: b2 a 2 + = M2 . (35) 4 b ♦ From the formulae (33)-(35) we determine:

2 2 α + 1 2 2 α = 2 = 2Mb c sin )( c cos )( Mb , c . (36) 4 cos( α) 1+ tg4 2 α)( ♦ From the formulae (34) and (36) we determine: α = 2Mb )(tg = 2Mb a , b . (37) cos( α) 1+ tg4 2 α)( cos( α) 1+ tg4 2 α)( π M2 α)(tg M2 M2 ‹ Answer: =β α− , a = b , b = b , c = b . 2 cos( α 1) + tg4 2 α)( cos( α 1) + tg4 2 α)( cos( α 1) + tg4 2 α)(

42 Analytical and numerical solving of right triangles with given angle and altitude, bisector or median of a triangle

2.5.2. Numerical algorithms in MS-Excel, MathCAD and Mathematica programs

For numerical analysis, we assume that the median Mb = 19,6 and angle α = 31 ° ♦ Program MS-Excel 7.0 [2],[8] Algorithm: Commentary:

A6=19,6 Given length of the median Mb A7=31 Given measure of the angle α [º] A8=A7*PI()/180 Command for the angle α [rad], α = 0,541 A9=90-A7 Command for the angle β [º] A10=2*A6*TAN(A8)/PIERWIASTEK(1+4*(TAN(A8))^2) Command for calculation of the side a A11=2*A6/PIERWIASTEK(1+4*(TAN(A8))^2) Command for calculation of the side b A12=2*A6/(COS(A8)*PIERWIASTEK(1+4*(TAN(A8))^2)) Command for calculation of the side c 59 Result: measure of the angle β [º] 15,1 Result: length of the side a 25,1 Result: length of the side b 29,3 Result: length of the side c ♦ Program MathCAD 15 [9],[12] Algorithm: Commentary: Mb:= 19.6 Given length of the median Mb α0:= 31 Given measure of the angle α [º] α0 ⋅ π α := = 0.541052 Command for the angle α [rad] 180 β :0 = 90 − α0 = 95 Command for the angle β [º] 2⋅Mb ⋅tan( α) :a = = .51 065977 2 Command and result: length of the side a 1+ 4⋅(tan( α)) ⋅ = 2 Mb = :b .25 073977 Command and result: length of the side b 1+ 4⋅(tan( α)) 2 ⋅ = 2 Mb = :a .29 252162 Command and result: length of the side c cos( α 1) + 4⋅(tan( α)) 2

♦ Program Mathematica 7.0 [1],[5],[6] Algorithm: Commentary:

Mb:= 19.3 Given length of the median M b A0:= 31 Given measure of the angle α [º] A:=A0*N[ π]/180 Command for the angle α [rad] α = 0.541052 B=90-A0 Command for the angle β [º] a=2*Mb*Tan[A]/Sgrt[1+4*(Tan[A])^2] Command: length of the side a b=2*Mb/Sgrt[1+4*(Tan[A])^2] Command: length of the side b c=2*Mb/Cos[A]*Sgrt[1+4*(Tan[A])^2] Command: length of the side c 59 Result: measure of the angle β [º] 14.8354 Result: length of the side a 24.6902 Result: length of the side b 28.8044 Result: length of the side c Numerical results: a =15,0 b = 25,0 c = 29,0 β = 59 °.

43 A.A. Czajkowski, S.W. Snastin, L.A. Rewkowski

2.6. Case 6: Median and an angle through which the median passes

‹ Theorem 4: The three medians of a triangle meet in one point (i.e. centre of triangle). ‹ Problem: Solve a right triangle with given median and an angle through which the median passes.

2.6.1. Theoretical analysis

‹ Let be a triangle as shown on the figure 6.

B β c a M b • α C A b D

Fig. 6. The right triangle with given median M b and the angle β Source: Elaboration of the Authors

‹ Data in ∆ABC: Length of median Mb and a measurement of the angle β. ‹ Unknown in ∆ABC Length of the triangle sides a, b and c and a measure of angle α. ‹ Solution: ♦ From the properties of acute angles in a right triangle we obtain: π α = β− . (38) 2 ♦ From ∆ABC we have: a = cos( β), a = c⋅cos( β), (39) c b = sin( β), b = c⋅sin( β). (40) c ♦ From ∆BCD and Pythagoras theorem we have: b2 a 2 + = M2 . (41) 4 b ♦ From the formulae (39)-(41) we determine:

2 2 β + 1 2 2 β = 2 = 2Mb c cos )( c sin )( Mb , c . (42) 4 sin( β) 1+ ctg4 2 β)( ♦ From the formulae (39)-(42) we determine: β = 2Mbctg )( = 2Mb a , b . (43) 1+ ctg4 2 β)( 1+ ctg4 2 β)(

π 2M ctg β)( 2M 2M ‹ Answer: α = β− , a = b , b = b , c = b . 2 1+ ctg4 2 β)( sin( β) 1+ ctg4 2 β)( 1+ ctg4 2 β)(

44 Analytical and numerical solving of right triangles with given angle and altitude, bisector or median of a triangle

2.6.2. Numerical algorithms in MS-Excel, MathCAD and Mathematica programs For numerical analysis, we assume that Mb = 19,6 and angle β = 59 ° ♦ Program MS-Excel 7.0 [2],[8] Algorithm: Commentary: A6=19,6 Given length of the median Mb A7=59 Given measure of the angle β [º] A8=A7*PI()/180 Command for the angle β [rad], β = 1,030 A9=90-A7 Command for the angle α [º] A10=2*A6*(1/TAN(A8))/PIERWIASTEK(1+4*(1/TAN(A8))^2) Command for calculation of the side a A11=2*A6/PIERWIASTEK(1+4*(1/TAN(A8))^2) Command for calculation of the side b A12=2*A6/(SIN(A8)*PIERWIASTEK(1+4*(1/TAN(A8))^2)) Command for calculation of the side c 31 Result: measure of the angle β [º] 15,1 Result: length of the side a 25,1 Result: length of the side b 29,3 Result: length of the side c ♦ Program MathCAD 15 [9],[12] Algorithm: Commentary: Mb:= 19.3 Given length of the median Mb β0:= 59 Given measure of the angle β [º] β0 ⋅ π β := = .1 029744 Command for the angle β [rad] 180 α :0 = 90 − β0 = 31 Command for the angle α [º] 2⋅Mb :a = = 14.835376 2 Command and result: length of the side a  1  tan( β 1) + 4   tan( β)  2⋅ Mb :b = = .42 690211 2 Command and result: length of the side b  1  1+ 4   tan( β)  2⋅Mb :c = = .82 804425 2 Command and result: length of the side c  1  sin( β 1) + 4   tan( β)  ♦ Program Mathematica 7.0 [1],[5],[6] Algorithm: Commentary: Mb:= 19.3 Given length of the median Mb B0:= 59 Given measure of the angle β [º] B:=A0*N[ π]/180 Command for the angle β [rad] β = 1.02974 A=90-B0 Command for the angle α [º] a=2*Mb*Cot[B]/Sgrt[1+4*(Cot[B])^2] Command: length of the side a b=2*Mb/Sgrt[1+4*(Cot[B])^2] Command: length of the side b c=2*Mb/Sin[B]*Sqrt[1+4*(Cot[B])^2] Command: length of the side c 31 Result: measure of the angle α [º] 14.8354 Result: length of the side a 24.6902 Result: length of the side b 28.8044 Result: length of the side c Numerical results: a =15,0 b = 25,0 c = 29,0 α = 31 °.

45 A.A. Czajkowski, S.W. Snastin, L.A. Rewkowski

3. Conclusions

• Discussed analytical models of solving right triangles allow to perform the other theoreti- cal considerations in each of the six basic cases, taking into account the definition of trigo- nometric functions and the corresponding properties and formulae. • Created numerical algorithms of solving the right triangles in MS-Excel, MathCAD, and Mathematica programs allow for significant execution of faster calculations than the tradi- tional way of using logarithms and logarithmic tables.

Literature

[1] Abel M.L., Braselton J.P.: Mathematica by example, Revised edition. Georgia Southern University, Department of Mathematics and Computer Science, Statesboro, Georgia, AP Professional A Division of Harcourt Brace & Company, Boston San Diego New York Lon- don Sydney Tokyo Toronto 1993. [2] Bourg D.M.: Excel in science and technology. Recipes. HELION Pub. House, Gliwice 2006 (in Polish). [3] Bronsztejn I.N., Siemiendiajew K.A., Musiol G., Mühlig H.: Modern compendium of mathematics. Polish Scientific Publishers, Warsaw 2004 (in Polish). [4] Dolciani M.P., Berman S.L., Wooton W., Meder A.E.: Modern algebra and trigonometry. Structure and Method. Book Two . Houghton Mifflin Company, Boston New York Atlanta Geneva, Ill. Dallas Palo Alto 1965. [5] Drwal G., Grzymkowski R., Kapusta A., Słota D.: Mathematica 4, Jacek Skalmierski Pub- lishing House, Gliwice 2000 (in Polish). [6] Dziubi ński I., Świ ątkowski T. (Editors): Mathematical guide. Polish Scientific Publishers, Warsaw 1978 (in Polish). [7] Gabszewicz Z.: Trigonometry. Handbook for trainees in the field of secondary schools course. Set of tasks. Gebethner & Wolff Publishing House, Cracov, Gebethner & Company, Warsaw 1907 (in Polish). [8] Gonet M.: Excel in scientific computing and engineering. HELION Publishing House, Gli- wice 2010 (in Polish). [9] Jakubowski K.: MathCAD 2000 Professional, EXIT Publishing House, Warsaw 2000. [10] Neill Hugh: Trigonometry. A complete introduction. Teach Yourself, 2013. [11] Nowosiłow S.I.: Special lecture of trigonometry. Polish Scientific Publishers, Warsaw 1956 (in Polish). [12] Paleczek W.: MathCAD 12, 11, 2001i, 2001, 2000 in algorithms, EXIT Publishing House, Warsaw 2005 (in Polish). [13] Pokorny E.J.: Trigonometry for the self-taught. Polish Betting School Publishing (PZWS), Warsaw 1962 (in Polish). [14] Wojtowicz Wł.: Trigonometry. The 5 th edition. Polish Betting School Publishing (PZWS), Warsaw1948, (in Polish). [15] Wojtowicz Wł., Bielecki B., Czy żykowski M.: Trigonometry for classes X-XI. The 16 th edi- tion. Polish Betting School Publishing (PZWS), Warsaw 1964, (in Polish). [16] Young J.W., Morgan F.M .: Plane trigonometry and numerical computation ,The MacMillan Company, New York 1919.

46