In lesson  5.01 Law of sines , we learned about a new tool to solve for missing sides and angles in oblique triangles, and how to distinguish the ambiguous case. We will learn a different tool that can also be used for finding missing sides and angles in triangles, and encounter the ambiguous case in a different way.
The law of cosines is a useful equation that relates the sides of a triangle to the cosine of one of its angles. The law of cosines can be used to solve any triangle where two sides and any angle are given (SAS or SSA) or all three sides are given (SSS).
c^2=a^2+b^2-2ab\cos{C}
b^2=a^2+c^2-2ac\cos{B}
a^2=b^2+c^2-2bc\cos{A}
If using the law of cosines for two sides and the non-included angle (SSA) to solve for a missing side, we could encounter the ambiguous case. However, it will come up through examining the discriminant of the resulting quadratic:
If the quadratic has two solutions, there are two possible triangles
If the quadratic has one solution, one triangle exists
If the quadratic has no solutions, no triangle exists
Examples
Example 1
Consider the diagram shown below:
a
Formulate a plan for proving the law of cosines: a^2=b^2+c^2-2bc \cos A.
Worked Solution
Create a strategy
The law of cosines contains calculations for the cosines of angles and the Pythagorean theorem. In order to calculate the cosine of an angle or use the Pythagorean theorem, we need to have a right triangle.
So, let's divide \triangle ABC into two right triangles by constructing an altitude \overline{CD} from \angle C to \overline{AB}. We can label the height of the segment as h, then label \overline{AD} as x and \overline{BD} as c-x, since we'll be using the adjacent sides of the angles with cosine.
Apply the idea
After constructing two right triangles from the given triangle, we can use the Pythagorean theorem and \cos \theta = \dfrac{\text{adjacent}}{\text{hypotenuse}} to begin proving the law of cosines.
b
Use your plan from part (a) to prove the law of cosines for any triangle.
Worked Solution
Create a strategy
For \triangle BCD, we can write an equation for the Pythagorean theorem in terms of a^2:a^2 = h^2 + \left( c - x \right)^2.
For \triangle ACD, we can write the an equation for the Pythagorean theorem in terms of h^2:h^2 = b^2 - x^2 and the trigonometric ratio \cos A = \dfrac{x}{b}.
We can substitute the expressions for h^2 and x in the first equation and use that to show the law of cosines.
Apply the idea
From \triangle ACD:
\displaystyle \cos A
\displaystyle =
\displaystyle \dfrac{x}{b}
Sine of \angle A
\displaystyle b \cdot \cos A
\displaystyle =
\displaystyle x
Multiply both sides of the equation by b
Substituting the expressions from \triangle ACD, we have:
\displaystyle a^2
\displaystyle =
\displaystyle h^2 + \left( c - x \right) ^2
Pythagorean theorem
\displaystyle a^2
\displaystyle =
\displaystyle b^2- x^2 + \left( c - x \right)^2
Substitute h^2=b^2 - x^2
\displaystyle a^2
\displaystyle =
\displaystyle b^2- \left(b \cos A \right)^2 + \left( c - b \cos A \right)^2
Substitute x=b \cdot \cos A
\displaystyle a^2
\displaystyle =
\displaystyle b^2 - \left(b \cos A \right)^2 - \left(c-b \cos A \right) \left( c-b \cos A \right)
Expand the binomials to prepare for distribution
\displaystyle a^2
\displaystyle =
\displaystyle b^2 - \left(b \cos A \right)^2 + c^2 - bc \cos A - bc \cos A + \left( b \cos A \right)^2
Distribute
\displaystyle a^2
\displaystyle =
\displaystyle b^2 + c^2 - 2bc \cos A
Combine like terms
Example 2
Find the value of x using the law of cosines. Round your answer to two decimal places.
Evaluate the exponents, multiplication, addition, and subtraction
Reflect and check
Remember that when evaluating the square root, the answers can be \pm, and since we are referring to a length in this problem, the only solution is the positive square root.
Rounding errors can cause a large amount of variation in our solutions. When possible, it's best to leave expressions as exact values until the final calculation.
Example 3
A goal has posts that are 2 \text{ m} apart. Deepa shoots for the goal when she is 2.6 \text{ m} from one post and 3.1 \text{ m} from the other post.
Find the measure of the angle, x, in which she can score a goal. Round your answer to two decimal places.
Worked Solution
Create a strategy
Label the side lengths and angle measures using labels from the law of cosines: a=2, b=3.1, c=2.6, and A=x. Then, we'll substitute the values into the law of cosines and solve for the unknown angle.
Given the following measurements in a triangle, find the value of missing side length c. Round to two decimal places.
A= 68.7 \degree, a=88, and b=92
Worked Solution
Create a strategy
Draw and label a diagram.
From this diagram we can see that we were given two sides and their non-included angle. This is an example of the ambiguous case and when we solve we may find one, two, or no solutions to this problem.
Since we are given m \angle A, substitute the given values into a^2=b^2+c^2-2bc\cos{A} and solve for c.
Subtract 7744 from both sides and commutative property of addition
In order to solve for c, substitute the values from the equation which we can write as x^2-66.8x+720=0 into the quadratic formula, remembering that the value of x is the missing side length c:
At this point, we know that there is another triangle that exists with the given values. We can find the other possible angle measure for \angle B by subtracting 76.92 \degree from 180 \degree and getting \angle B_2= 103.08 \degree.
Working through solution 1 we have: A=68.7 \degree, a=88, b=92, and B_1=76.92 \degree. We can find the measure of \angle C_1 using the triangle sum theorem: 68.7 \degree + 76.92 \degree + m \angle C_1 = 180 \degree, so m \angle C_1 = 34.38 \degree. Finally, we can write a proportion for the law of sines again to determine the missing side length c_1:
Multiply both sides of the equation by \dfrac{88}{\sin 68.7 \degree}
\displaystyle c_1
\displaystyle =
\displaystyle 53.33
Evaluate the multiplication and division
This is approximately one of the possible side lengths we found for the triangle using the law of cosines.
Now, working through solution 2 we have: A=68.7 \degree, a=88, b=92, and B_2=103.08 \degree. We can find the measure of \angle C_2 using the triangle sum theorem:68.7 \degree + 103.08 \degree + m \angle C_2 = 180 \degree, so m \angle C_2 = 8.22 \degree. Finally, we can write a proportion for the law of sines again to determine the missing side length c_2:
Multiply both sides of the equation by \dfrac{88}{\sin 68.7 \degree}
\displaystyle c_2
\displaystyle =
\displaystyle 13.50
Evaluate the multiplication and division
This is approximately the other possible side length we found for the triangle using the law of cosines.
Idea summary
We can apply the law of cosines to find missing values in an oblique triangle. Given an angle and its opposite side plus one additional side or angle or all three sides, we are guaranteed one unique solution:
c^2=a^2+b^2-2ab\cos{C}
b^2=a^2+c^2-2ac\cos{B}
a^2=b^2+c^2-2bc\cos{A}
The ambiguous case occurs when using the law of cosines to solve a triangle given two sides and the non-included angle. Use these rules for determining the possible solution:
Case 1: No triangle exists. This is the case when the discriminant of the quadratic is negative
Case 2: Exactly one triangle exists. This is the case when the discriminant of the quadratic is zero
Case 3: Two possible triangles exist. This is the case when the discriminant of the quadratic is positive
Outcomes
G.SRT.D.10 (+)
Prove the laws of sines and cosines and use them to solve problems.
G.SRT.D.11 (+)
Understand and apply the law of sines and the law of cosines to find unknown measurements in right and non-right triangles.