Appendix
A-7: Trigonometry
Example A-7.2
Two sides of a triangle have lengths a = 5 and b = 2 and the angle between them is C=52°. Use the Law of Sines and the Law of Cosines to find the other side c and the other two angles A and B opposite a and b, respectively.
Law of Sines:
sinAa=sinBb=sinCc
Law of Cosines:
c2=a2+b2−2 a b cosC
Solution
Maple Solution - Interactive
Use the Law of Cosines to find side c
Type the relevant equation.
Context Panel: Solve≻Numerically Solve Select the positive value.
c2=25+4−20 cos52⋅π180→solve−4.084944369,4.084944369
Use the Law of Sines to find angle A
Type the relevant equation, using the value of c computed above.
Context Panel: Solve≻Solve
5sinA=4.084944369sin52⋅π/180→solve1.303659266
Convert angle A to degrees
Context Panel: Approximate≻10 (digits)
180− 1.303659266⋅180/π→at 10 digits105.3058262
Because a2=25>b2+c2≐4+16≐20, angle A must fall in the second quadrant.
Maple Solution - Coded
Although the approach implemented above will work, the following variant, based on forming a sequence of three equations in A, B, c, each from the Law of Cosines, also works. The numeric solution of these equations will return angle A in the second quadrant.
Write a sequence of three equations in A,B,c
q≔c2=25+4−20 cos52⋅π180,25=c2+4−4 c cosA,4=25+c2−10 c cosB
Obtain a numeric solution via the fsolve command, imposing ranges on the variables.
fsolveq,A,B,c,A=0..π,B=0..π,c=0..5
A=1.837933386,B=0.3960880560,c=4.084944369
Use evalf to convert angle A to degrees.
evalf1.837933386⋅180/π
105.3058260
Apply the convert command with option degrees.
convert1.837933386,degrees
330.8280095⁢degreesπ
<< Previous Example Section A-7 Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2024. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
For more information on Maplesoft products and services, visit www.maplesoft.com
Download Help Document