Applications
The theorem is used in triangulation, for solving a triangle or circle, i.e., to find (see Figure 3):
- the third side of a triangle if one knows two sides and the angle between them:
- the angles of a triangle if one knows the three sides:
- the third side of a triangle if one knows two sides and an angle opposite to one of them (one may also use the Pythagorean theorem to do this if it is a right triangle):
These formulas produce high round-off errors in floating point calculations if the triangle is very acute, i.e., if c is small relative to a and b or γ is small compared to 1. It is even possible to obtain a result slightly greater than one for the cosine of an angle.
The third formula shown is the result of solving for a the quadratic equation a2 − 2ab cos γ + b2 − c2 = 0. This equation can have 2, 1, or 0 positive solutions corresponding to the number of possible triangles given the data. It will have two positive solutions if b sin γ < c < b, only one positive solution if c ≥ b, and no solution if c < b sin γ. These different cases are also explained by the Side-Side-Angle congruence ambiguity.
Read more about this topic: Law Of Cosines