Further Applications of Trigonometry

10.2 Non-Right Triangles: Law of Cosines

Law of Cosines

Law of Cosines

Theorem: Law of Cosines

For any triangle ABC, the following are true.

$$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)$$

We can use the law of cosines to solve triangles in which we have two sides and know the angle between them. These types of problems are commonly known as side angle side triangles or SAS.

Side Angle Side Case

Example: SAS

Solve the triangle ABC with $B=72^\circ$, $a=6.5$ and $c=5$

Show Solution
\[ \begin{align*} a &=6.5 \quad& A&=\underline{\phantom{xxxx}} \\ b &=\underline{\phantom{xxxx}} & B&=72^\circ \\ c &=5 & C&=\underline{\phantom{xxxx}} \end{align*} \]

Because the angle that we know is between the two sides that we know, this is the perfect problem for law of cosines. We'll start by finding that missing side.

\[ \begin{align*} b^2&=a^2+c^2-2ac\cos(B) \\ b^2&=6.5^2+5^2-2(6.5)(5)\cos(72^\circ) \\ b &=\sqrt{6.5^2+5^2-2(6.5)(5)\cos(72^\circ)} \approx 6.87 \end{align*} \]
\[ \begin{align*} a &=6.5 \quad& A&=\underline{\phantom{xxxx}} \\ b &=6.87 & B&=72^\circ \\ c &=5 & C&=\underline{\phantom{xxxx}} \end{align*} \]

Now we have enough information to start using the law of sines to find the missing angles.

$$ \frac{\sin(A)}{a}=\frac{\sin(B)}{b} \implies \frac{\sin(A)}{6.5}=\frac{\sin(72^\circ)}{6.87} \implies A=\sin^{-1}\left(\frac{6.5\sin(72^\circ)}{6.87}\right)\approx 64.14^\circ $$

We needn't worry about a second triangle here even though we used the inverse sine, because we already have all 3 sides. Using the fact that the angles in the triangle need to add up to 180 we can find the missing angle $180-72-64.14=43.86$.

\[ \begin{align*} a &=6.5 \quad& A&=64.14^\circ\\ b &=6.87 & B&=72^\circ \\ c &=5 & C&=43.86^\circ \end{align*} \]

Example: SAS

Solve the following triangle ABC.

Triangle ABC with side a = 5.9, side c = 6.8, and included angle B = 114.6 degrees
Show Solution

From the diagram we have $a=5.9$, $c=6.8$, and $B=114.6^\circ$.

\[ \begin{align*} a &=5.9 \quad& A&=\underline{\phantom{xxxx}} \\ b &=\underline{\phantom{xxxx}} & B&=114.6^\circ \\ c &=6.8 & C&=\underline{\phantom{xxxx}} \end{align*} \]

Because we know two sides and the included angle, we start with the law of cosines to find $b$.

\[ \begin{align*} b^2&=a^2+c^2-2ac\cos(B) \\ b^2&=5.9^2+6.8^2-2(5.9)(6.8)\cos(114.6^\circ) \\ b&=\sqrt{5.9^2+6.8^2-2(5.9)(6.8)\cos(114.6^\circ)} \approx 10.70 \end{align*} \]
\[ \begin{align*} a &=5.9 \quad& A&=\underline{\phantom{xxxx}} \\ b &=10.70 & B&=114.6^\circ \\ c &=6.8 & C&=\underline{\phantom{xxxx}} \end{align*} \]

Now we can use the law of sines for one angle, then angle sum for the last angle.

$$ \frac{\sin(A)}{a}=\frac{\sin(B)}{b} \implies \frac{\sin(A)}{5.9}=\frac{\sin(114.6^\circ)}{10.70} \implies A=\sin^{-1}\left(\frac{5.9\sin(114.6^\circ)}{10.70}\right)\approx 30.10^\circ $$

$$ C=180^\circ-114.6^\circ-30.10^\circ\approx 35.30^\circ $$

\[ \begin{align*} a &=5.9 \quad& A&=30.10^\circ \\ b &=10.70 & B&=114.6^\circ \\ c &=6.8 & C&=35.30^\circ \end{align*} \]
MyOpenMath: Try your own!

Side Side Side Case

It's also possible to solve triangles of which we know 3 sides but none of the angles using the law of cosines.

Example: SSS

Solve the following triangle ABC.

Triangle ABC with sides a = 8, b = 12, and c = 11
Show Solution

From the diagram we have $a=8$, $b=12$, and $c=11$.

\[ \begin{align*} a &=8 \quad& A&=\underline{\phantom{xxxx}} \\ b &=12 & B&=\underline{\phantom{xxxx}} \\ c &=11 & C&=\underline{\phantom{xxxx}} \end{align*} \]

With SSS, use law of cosines to find one angle first. We'll find $A$.

\[ \begin{align*} a^2&=b^2+c^2-2bc\cos(A) \\ 8^2&=12^2+11^2-2(12)(11)\cos(A) \\ \cos(A)&=\frac{12^2+11^2-8^2}{2(12)(11)}=\frac{201}{264} \\ A&=\cos^{-1}\left(\frac{201}{264}\right)\approx 40.42^\circ \end{align*} \]

Now find $B$ the same way.

\[ \begin{align*} b^2&=a^2+c^2-2ac\cos(B) \\ 12^2&=8^2+11^2-2(8)(11)\cos(B) \\ \cos(B)&=\frac{8^2+11^2-12^2}{2(8)(11)}=\frac{41}{176} \\ B&=\cos^{-1}\left(\frac{41}{176}\right)\approx 76.53^\circ \end{align*} \]

Then use angle sum for $C$.

$$ C=180^\circ-40.42^\circ-76.53^\circ\approx 63.05^\circ $$

\[ \begin{align*} a &=8 \quad& A&=40.42^\circ \\ b &=12 & B&=76.53^\circ \\ c &=11 & C&=63.05^\circ \end{align*} \]

Example: SSS

Solve the following triangle ABC with $a=115$, $b=125$, and $c=100$

Show Solution

We know all three sides, so this is an SSS problem.

\[ \begin{align*} a &=115 \quad& A&=\underline{\phantom{xxxx}} \\ b &=125 & B&=\underline{\phantom{xxxx}} \\ c &=100 & C&=\underline{\phantom{xxxx}} \end{align*} \]

Use law of cosines to find $A$.

\[ \begin{align*} a^2&=b^2+c^2-2bc\cos(A) \\ 115^2&=125^2+100^2-2(125)(100)\cos(A) \\ \cos(A)&=\frac{125^2+100^2-115^2}{2(125)(100)}=\frac{12400}{25000} \\ A&=\cos^{-1}\left(\frac{12400}{25000}\right)\approx 60.26^\circ \end{align*} \]

Use law of cosines again to find $B$.

\[ \begin{align*} b^2&=a^2+c^2-2ac\cos(B) \\ 125^2&=115^2+100^2-2(115)(100)\cos(B) \\ \cos(B)&=\frac{115^2+100^2-125^2}{2(115)(100)}=\frac{7600}{23000} \\ B&=\cos^{-1}\left(\frac{7600}{23000}\right)\approx 70.70^\circ \end{align*} \]

Then use angle sum for the final angle.

$$ C=180^\circ-60.26^\circ-70.70^\circ\approx 49.03^\circ $$

\[ \begin{align*} a &=115 \quad& A&=60.26^\circ \\ b &=125 & B&=70.70^\circ \\ c &=100 & C&=49.03^\circ \end{align*} \]
MyOpenMath: Try your own!

Word Problems

Example: Memorial

A local memorial is V-shaped with equal sides of length $246$ ft. The angle between these sides is $125^\circ$. Find the distance between the ends of the two sides.

Show Solution

Let the unknown distance between the two ends be $d$. The two known sides are each $246$ ft and the included angle is $125^\circ$, so law of cosines gives:

\[ \begin{align*} d^2&=246^2+246^2-2(246)(246)\cos(125^\circ) \\ d&=\sqrt{246^2+246^2-2(246)(246)\cos(125^\circ)} \\ d&\approx 436.4 \end{align*} \]

The distance between the two ends is approximately $\boxed{436.4\text{ ft}}$.

Example: Satellite Calculations

A satellite calculates the distances between two cities by pinging them. City A is $370$km away and city B is $350$km away. The angle between these measurements is $2.1^\circ$. What is the distance between the two cities? Round to the nearest tenth of a kilometer.

Show Solution

Let $d$ be the distance between the two cities. The satellite-to-city distances are $370$ km and $350$ km with included angle $2.1^\circ$, so use law of cosines:

\[ \begin{align*} d^2&=370^2+350^2-2(370)(350)\cos(2.1^\circ) \\ d&=\sqrt{370^2+350^2-2(370)(350)\cos(2.1^\circ)} \\ d&\approx 23.96 \end{align*} \]

Rounded to the nearest tenth, the distance between the cities is $\boxed{24.0\text{ km}}$.

Example: Pilot Navigation

A pilot flies in a straight path for 2 hours and 30 mins. She then makes a course correction, heading $15^\circ$ to the right of her original course and flies 2 hours in the new direction. If she maintains a constant speed of 600 miles per hour, how far is she from her starting position? Round your answer to two decimal places.

Show Solution

First convert the travel times into distances.

$$ 2\text{ hours and }30\text{ min} = 2.5\text{ hours} $$

$$ 600(2.5)=1500 $$

$$ 600(2)=1200 $$

So the two legs of the trip are $1500$ miles and $1200$ miles. Because the pilot changes course by $15^\circ$, the interior angle of the triangle is $180^\circ-15^\circ=165^\circ$.

Let $d$ be the distance from her starting position.

\[ \begin{align*} d^2&=1500^2+1200^2-2(1500)(1200)\cos(165^\circ) \\ d&=\sqrt{1500^2+1200^2-2(1500)(1200)\cos(165^\circ)} \\ d&\approx 2677.19 \end{align*} \]

The pilot is approximately $\boxed{2677.19\text{ miles}}$ from her starting position.

MyOpenMath: Try your own!