Toby draws a triangle that has two side lengths of 8 inches and 5 inches. He measures the included angle with a protractor and gets \begin{align*}75^\circ\end{align*}

### Law of Cosines

The Law of Cosines can be used to solve for the third side of a triangle when two sides and the included angle are known in a triangle. consider the non right triangle below in which we know \begin{align*}a, b\end{align*}

Now we can use the Pythagorean Theorem to relate the lengths of the segments in each of the right triangles shown.

Triangle 1: \begin{align*}x^2+k^2=a^2\end{align*}

Triangle 2: \begin{align*}(b-x)^2+k^2=c^2\end{align*}

Since both equations are equal to \begin{align*}k^2\end{align*}

\begin{align*}a^2-x^2 &=c^2-(b-x)^2 \\
a^2-x^2 &=c^2-(b^2-2bx+x^2) \\
a^2-x^2 &=c^2-b^2+2bx-x^2 \\
a^2 &=c^2-b^2+2bx \\
a^2+b^2-2bx &=c^2\end{align*}

Recall that we know the values of \begin{align*}a\end{align*}

\begin{align*} \cos C=\frac{x}{a} \quad \text{so} \quad x=a \cos C\end{align*}

Finally, we can replace \begin{align*}x\end{align*}

Keep in mind that \begin{align*}a\end{align*}

Let's find \begin{align*}c\end{align*}

Replacing the variables in the formula with the given information and solve for \begin{align*}c\end{align*}

\begin{align*}c^2 &=6^2+12^2-2(6)(12) \cos 80^\circ \\
c^2 & \approx 154.995 \\
c & \approx 12.4\end{align*}

Now, let's find \begin{align*}a\end{align*}

This time we are given the sides surrounding angle \begin{align*}A\end{align*}

\begin{align*}a^2 &=16^2+22^2-2(16)(22) \cos 43^\circ \\
a^2 & \approx 225.127 \\
a & \approx 15 \end{align*}

Finally, let's solve the following problem.

Rae is making a triangular flower garden. One side is bounded by her porch and a second side is bounded by her fence. She plans to put in a stone border on the third side. If the length of the porch is 10 ft and the length of the fence is 15 ft and they meet at a \begin{align*}100^\circ\end{align*} angle, how many feet of stone border does she need to create?

Let the two known side lengths be \begin{align*}a\end{align*} and \begin{align*}b\end{align*} and the angle between is \begin{align*}C\end{align*}. Now we can use the formula to find \begin{align*}c\end{align*}, the length of the third side.

\begin{align*}c^2 &=10^2+15^2-2(10)(15) \cos 100^\circ \\ c^2 & \approx 377.094 \\ c & \approx 19.4\end{align*}

So Rae will need to create a 19.4 ft stone border.

### Examples

#### Example 1

Earlier, you were asked to find the length of the third side given a triangle that has two sides of length 5 inches and 8 inches and an included angle of \begin{align*}75^\circ\end{align*}.

We are trying to find \begin{align*}c\end{align*}. We are given \begin{align*}m \angle C=75^\circ, a = 8\end{align*} and \begin{align*}b = 5\end{align*}.

Replacing the variables in the formula with the given information and solve for \begin{align*}c\end{align*}:

\begin{align*}c^2 &=8^2+5^2-2(8)(5) \cos 75^\circ \\ c^2=64 + 25 - 80 \cos 75^\circ \\ c^2=89 - 80(0.26)\\ c^2 & \approx 68.2 \\ c & \approx 8.26\end{align*}

Therefore, the third side is approximately 8.26 inches long.

#### Example 2

Find \begin{align*}c\end{align*} when \begin{align*}m \angle C=75^\circ, a = 32\end{align*} and \begin{align*}b = 40\end{align*}.

\begin{align*}c^2 &=32^2+40^2-2(32)(40) \cos 75^\circ \\
c^2 & \approx 1961.42 \\
c & \approx 44.3\end{align*}

#### Example 3

Find \begin{align*}b\end{align*} when \begin{align*}m \angle B=120^\circ, a = 11\end{align*} and \begin{align*}c =17\end{align*}.

\begin{align*}b^2 &=11^2+17^2-2(11)(17) \cos 120^\circ \\
b^2 & \approx 597 \\
b & \approx 24.4\end{align*}

#### Example 4

Dan likes to swim laps across a small lake near his home. He swims from a pier on the north side to a pier on the south side multiple times for a workout. One day he decided to determine the length of his swim. He determines the distances from each of the piers to a point on land and the angles between the piers from that point to be \begin{align*}50^\circ\end{align*}. How many laps does Dan need to swim to cover 1000 meters?

\begin{align*}c^2 &=30^2+35^2-2(30)(35) \cos 50^\circ \\
c^2 & \approx 775.146 \\
c & \approx 27.84\end{align*}

Since each lap is 27.84 meters, Dan must swim \begin{align*}\frac{1000}{27.84} \approx 36\end{align*} laps.

### Review

Use the Law of Cosines to find the value of \begin{align*}x\end{align*}, to the nearest tenth, in problems 1 through 6.

For problems 7 through 10, find the unknown side of the triangle. Round your answers to the nearest tenth.

- Find \begin{align*}c\end{align*}, given \begin{align*}m \angle C=105^\circ\end{align*}, \begin{align*}a = 55\end{align*} and \begin{align*}b = 61\end{align*}.
- Find \begin{align*}b\end{align*}, given \begin{align*}m \angle B=26^\circ\end{align*}, \begin{align*}a = 33\end{align*} and \begin{align*}c = 24\end{align*}.
- Find \begin{align*}a\end{align*}, given \begin{align*}m \angle A=77^\circ\end{align*}, \begin{align*}b = 12\end{align*} and \begin{align*}c = 19\end{align*}.
- Find \begin{align*}b\end{align*}, given \begin{align*}m \angle B=95^\circ\end{align*}, \begin{align*}a = 28\end{align*} and \begin{align*}c = 13\end{align*}.
- Explain why when \begin{align*}m \angle C=90^\circ\end{align*}, the Law of Cosines becomes the Pythagorean Theorem.
- Luis is designing a triangular patio in his backyard. One side, 20 ft long, will be up against the side of his house. A second side is bordered by his wooden fence. If the fence and the house meet at a \begin{align*}120^\circ\end{align*} angle and the fence is 15 ft long, how long is the third side of the patio?

### Answers for Review Problems

To see the Review answers, open this PDF file and look for section 13.15.