Law of Cosines: Formulas, Proofs, and Solved Problems

Aturan kosinus

The law of cosines consists of two formulas that relate the lengths of the sides and the measures of the angles in any triangle using trigonometric concepts. As the name suggests, the law of cosines involves the cosine function.

Law of Cosines

The law of cosines (also known as the cosine formula or cosine rule) is a theorem used to determine the length of the side opposite an angle by using the relationship between the lengths of the two sides enclosing the angle and the cosine of that angle.
Aturan kosinusIn triangle $ABC,$ the following holds:
$$\begin{aligned} a^2 & = b^2 + c^2- 2bc \cos A \\ b^2 & = a^2 + c^2- 2ac \cos B \\ c^2 & = a^2 + b^2- 2ab \cos C \end{aligned}$$

A formal proof of the law of cosines can be seen in the following panel.

Proof

Construct triangle $ABC$ as follows.
Law of Cosines
Draw the altitude of triangle $ABC$ from $C$ to side $AB$ so that line $CD$ is formed.

In right triangle $ADC,$ the following trigonometric ratios apply.
$$\begin{aligned} \sin A & = \dfrac{CD}{AC} = \dfrac{CD}{b} \Rightarrow CD = b \sin A \\ \cos A & = \dfrac{AD}{AC} = \dfrac{AD}{b} \Rightarrow AD = b \cos A \end{aligned}$$Meanwhile,
$$BD = AB-AD = c-b \cos A.$$Then, in right triangle $BDC,$ the Pythagorean theorem applies.
$$\begin{aligned} BC^2 & = BD^2 + CD^2 \\ a^2 & = (c-b \cos A)^2 + (b \sin A)^2 \\ a^2 & = (c^2-2bc \cos A + b^2 \cos^2 A) + (b^2 \sin^2 A) \\ & = c^2-2bc \cos A + b^2(\sin^2 A + \cos^2 A) \\ & = c^2-2bc \cos A + b^2(1) \\ & = b^2 + c^2-2bc \cos A \end{aligned}$$By using another altitude and a similar process, the following three symmetric formulas are obtained.
$$\boxed{\begin{aligned} a^2 & = b^2 + c^2-2bc \cos A \\ b^2 & = a^2 + c^2-2ac \cos B \\ c^2 & = a^2 + b^2-2ab \cos C \end{aligned}}$$Therefore, the Law of Cosines is proven. $\blacksquare$

[collapse]

To gain a deeper understanding of this material, several problems and their solutions are provided below. Hopefully, they will be useful.

Note: You are expected to have studied the law of sines first because some problems involve the use of both the law of sines and the law of cosines simultaneously.

Multiple Choice Section

Given triangle $ABC$ as shown in the following figure.
Law of Cosines
The length of $AC$ is $\cdots~\text{cm}.$
A. $\sqrt{33}$                      D. $\sqrt{43}$
B. $\sqrt{37}$                      E. $\sqrt{47}$
C. $\sqrt{41}$

Solution

From the given figure, the following information is known.

  • $AB = 6$ cm.
  • $BC = 7$ cm.
  • $\angle B = 60^\circ.$

Using the law of cosines with respect to $\angle B,$ we obtain
$$\begin{aligned} AC^2 & = AB^2 + BC^2-2 \cdot AB \cdot BC \cdot \cos B \\ & = (6)^2 + (7)^2-2 \cdot 6 \cdot 7 \cdot \cos 60^\circ \\ & = 36 + 49-\cancel{2} \cdot 6 \cdot 7 \cdot \dfrac{1}{\cancel{2}} \\ & = 36 + 49-42 \\ & = 43 \\ AC & = \sqrt{43}~\text{cm}. \end{aligned}$$Therefore, the length of $AC$ is $\boxed{\sqrt{43}~\text{cm}}.$
(Answer D)

[collapse]

A triangle has side lengths $5$ cm, $6$ cm, and $\sqrt{21}$ cm. The cosine value of the smallest angle in the triangle is $\cdots \cdot$
A. $\dfrac13$                     D. $\dfrac34$
B. $\dfrac12$                     E. $\dfrac35$
C. $\dfrac23$

Solution

The following information is known.

  • $a = 5$ cm.
  • $b = 6$ cm.
  • $c = \sqrt{21}$ cm.

Side $c$ is the shortest side because $\sqrt{21} < \sqrt{25} = 5$ and $\sqrt{21} < \sqrt{36} = 6.$
The smallest angle lies opposite the shortest side, namely $\sqrt{21}$ cm. Suppose the smallest angle is $𝑋.$ Using the law of cosines, we obtain
$$\begin{aligned} c^2 & = a^2 + b^2-2ab \cos X \\ (\sqrt{21})^2 & = (5)^2 + (6)^2-2 \cdot 5 \cdot 6 \cdot \cos X \\ 21 & = 25 + 36-60 \cos X \\ 21 & = 61-60 \cos X \\ 60 \cos X & = 40 \\ \cos X & = \dfrac{40}{60} = \dfrac23. \end{aligned}$$Therefore, the cosine value of the smallest angle in the triangle is $\boxed{\dfrac23}.$
(Answer C)

[collapse]

The side lengths of $\triangle ABC$ are in the ratio $6 : 5 : 4$. The cosine of the largest angle of the triangle is $\cdots \cdot$
A. $\dfrac12$                 C. $\dfrac34$                  E. $\dfrac56$
B. $\dfrac23$                 D. $\dfrac45$

Solution

Consider the following sketch.
Suppose that $AC = 6, AB = 5$, and $BC = 4.$
Using the law of cosines, the value of each angle cosine can be determined because the lengths of all three sides of the triangle are known.
The cosine of angle $A$ is
$\begin{aligned} \cos A & = \dfrac{AC^2+AB^2-BC^2}{2 \cdot AC \cdot AB} \\ & = \dfrac{6^2+5^2-4^2}{2 \cdot 6 \cdot 5} \\ & = \dfrac{36+25-16}{60} \\ & = \dfrac{45}{60} = \dfrac34. \end{aligned}$
The cosine of angle $B$ is
$\begin{aligned} \cos B & = \dfrac{AB^2+BC^2-AC^2}{2 \cdot AB \cdot BC} \\ & = \dfrac{5^2+4^2-6^2}{2 \cdot 5 \cdot 4} \\ & = \dfrac{25+16-36}{40} \\ & = \dfrac{5}{40} = \dfrac18. \end{aligned}$
The cosine of angle $C$ is
$\begin{aligned} \cos A & = \dfrac{AC^2+BC^2-AB^2}{2 \cdot AC \cdot BC} \\ & = \dfrac{6^2+4^2-5^2}{2 \cdot 6 \cdot 4} \\ & = \dfrac{36+16-25}{48} \\ & = \dfrac{27}{48} = \dfrac{9}{16}. \end{aligned}$
Since $\dfrac18 < \dfrac{9}{16} < \dfrac34,$ the greatest cosine value is at angle $A$, namely $\cos A = \dfrac34.$
Tip: The smaller the side opposite an angle in a triangle, the greater the cosine value of that angle.
(Answer C)

[collapse]

A regular $12$-gon is inscribed in a circle with radius $8~\text{cm}$. The side length of the regular $12$-gon is $\cdots~\text{cm}.$
A. $8\sqrt{2-\sqrt3}$
B. $8\sqrt{2-\sqrt2}$
C. $8\sqrt{3-\sqrt2}$
D. $8\sqrt{3-\sqrt3}$
E. $8\sqrt{3 + \sqrt2}$

Solution

Consider the following sketch.
In triangle $OAB$, it is known that $r = OB = OA = 8~\text{cm}$ and $\angle AOB = 360^{\circ} \div 12 = 30^{\circ}.$ The side length $AB$ can be calculated using the law of cosines.

$$\begin{aligned} AB^2 & = OA^2+OB^2-2 \cdot OA \cdot OB \cdot \cos 30^{\circ} \\ AB^2 & = 8^2+8^2-2 \cdot 8 \cdot 8 \cdot \dfrac12\sqrt3 \\ AB^2 & = 128- 64\sqrt3 \\ AB^2 & = 64(2-\sqrt3) \\ AB & = 8\sqrt{2-\sqrt3}~\text{cm}\end{aligned}$$Therefore, the side length of the regular $12$-gon is $\boxed{8\sqrt{2-\sqrt3}~\text{cm}}.$
(Answer A)

[collapse]

The value of $\cos \theta$ in the figure below is $\cdots \cdot$
Chord quadrilateral ABCD in a circleA. $-1$                    C. $-\dfrac23$                 E. $\dfrac23$
B. $-\dfrac57$                  D. $1$

Solution

Draw a line from point $A$ to point $C$, call it line $AC$.
Notice that $\angle ABC = \theta$ so the angle opposite to it is $\angle ADC = 180^{\circ}- \theta.$
Note: The sum of opposite angles in a cyclic quadrilateral is $\color{red}{180^{\circ}}.$
Using the law of cosines in $\triangle ABC$ and $\triangle ADC$, the equation for the length of $AC$ is obtained, namely
$$\boxed{AB^2+BC^2-2(AB)(BC) \cos \theta= AD^2+CD^2-2(AD)(CD) \cos (180^{\circ}-\theta)}$$It is known that $AB = 1$, $BC = 2$, $CD = 3$, and $AD = 4$, and also $\cos (180^{\circ}-\theta) =-\cos \theta$ so that
$$\begin{aligned} (1)^2+(2)^2 -2(1)(2) \cos \theta & = (4)^2+(3)^2-2(3)(4)(-\cos \theta) \\ 5-4 \cos \theta & = 25+24 \cos \theta \\ 28 \cos \theta & =-20 \\ \cos \theta & =-\dfrac{20}{28} =-\dfrac57. \end{aligned}$$Therefore, the value of $\boxed{\cos \theta =-\dfrac57}.$
(Answer B)

[collapse]

Observe the following quadrilateral $PQRS$.
The length of $RS = \cdots~\text{cm}.$

A. $6\sqrt2$                       D. $9\sqrt2$
B. $6\sqrt3$                       E. $9\sqrt3$
C. $12$

Solution

The following information is known.

  • $PS = 9$ cm.
  • $PQ = 9\sqrt3$ cm.
  • $\angle SPQ = \angle QSR = 30^\circ.$
  • $\angle QRS = 60^\circ.$

In triangle $PQS$, the length of $QS$ can be calculated using the law of cosines, namely
$$\begin{aligned} QS^2 & = PS^2+PQ^2-2 \cdot PS \cdot PQ \cdot \cos 30^{\circ} \\ & = 9^2+(9\sqrt3)^2-2 \cdot 9 \cdot 9\sqrt3 \cdot \dfrac12\sqrt3 \\ & = 81 + 243- 243 \\ QS & = \sqrt{81} = 9~\text{cm}. \end{aligned}$$Next, use the law of sines in triangle $QRS$ to find the length of $RS.$
$$\begin{aligned} \dfrac{QS}{\sin 60^{\circ}} & = \dfrac{RS}{\sin 90^{\circ}} \\ \dfrac{9}{\frac12\sqrt3} & = \dfrac{RS}{1} \\ RS & = \dfrac{18}{\sqrt3} = 6\sqrt3~\text{cm} \end{aligned}$$Therefore, the length of $\boxed{RS = 6\sqrt3~\text{cm}}.$
(Answer B)

[collapse]

Consider the following quadrilateral $ABCD$.
law of cosines
The length of $AD$ is $\cdots$ cm.
A. $2\sqrt7$                         D. $6$
B. $4\sqrt6$                         E. $8$
C. $2\sqrt{19}$

Solution

From the given figure, the following information is known.

  • $CD = 4\sqrt3$ cm.
  • $BC = 5\sqrt2$ cm.
  • $\angle ABC = 45^\circ.$
  • $\angle BAC = \angle ACD = 30^\circ.$

First, find the length of $AC$ using the law of sines in $\Delta ABC.$
$$\begin{aligned} \dfrac{AC}{\sin \angle ABC} & = \dfrac{BC}{\sin \angle BAC} \\ \dfrac{AC}{\sin 45^\circ} & = \dfrac{5\sqrt2}{\sin 30^\circ} \\ \dfrac{AC}{\cancel{\frac12}\sqrt2} & = \dfrac{5\sqrt2}{\cancel{\frac12}} \\ AC & = 5\sqrt2 \cdot \sqrt2 = 10~\text{cm} \end{aligned}$$After that, find the length of $AD$ using the law of cosines in $\Delta ACD.$
$$\begin{aligned} AD^2 & = AC^2 + CD^2-2 \cdot AC \cdot CD \cdot \cos \angle ACD \\ & = (10)^2 + (4\sqrt3)^2-2(10)(4\sqrt3) \cdot \cos 30^\circ \\ & = 100 + 48-\cancel{2}(10)(4\sqrt3) \cdot \dfrac{1}{\cancel{2}}\sqrt3 \\ & = 148-40(3) \\ & = 28 \\ AD & = \sqrt{28} = 2\sqrt7~\text{cm}. \end{aligned}$$Therefore, the length of $AD$ is $\boxed{2\sqrt7~\text{cm}}.$
(Answer A)

[collapse]

Consider the following quadrilateral $ABCD$.
law of cosines
The length of $CD$ is $\cdots$ cm.
A. $4\sqrt2$                            D. $8\sqrt2$
B. $4\sqrt3$                            E. $12$
C. $6\sqrt2$

Solution

From the given figure, the following information is known.

  • $BC = 5\sqrt2$ cm.
  • $AB = \sqrt{74}$ cm.
  • $AD = 12$ cm.
  • $\angle ACB = 45^\circ.$
  • $\angle CAD = 60^\circ.$

First, find the length of $AC$ using the law of cosines in $\Delta ABC.$
$$\begin{aligned} AB^2 & = AC^2 + BC^2-2 \cdot AC \cdot BC \cdot \cos \angle ACB \\ (\sqrt{74})^2 & = AC^2 + (5\sqrt2)^2-2(AC)(5\sqrt2) \cdot \cos 45^\circ \\ 74 & = AC^2 + 50-\cancel{2}(AC)(5\sqrt2) \cdot \dfrac{1}{\cancel{2}}\sqrt2 \\ 74 & = AC^2 + 50-10AC \\ AC^2-10AC-24 & = 0 \\ (AC-12)(AC+2) & = 0. \end{aligned}$$The last equation shows that the only possible value of $AC$ is $AC = 12$ cm.
Next, consider $\Delta ACD.$ Notice that $AD = AC = 12$ cm so that $\angle ADC = \angle ACD.$ On the other hand, $\angle ADC + \angle ACD = 120^\circ$ because the sum of interior angles in a triangle is always $180^\circ.$ Therefore, it can be concluded that $\angle ADC = \angle ACD = 60^\circ.$ Consequently, $\Delta ACD$ is an equilateral triangle so that $CD = AC = AD = 12$ cm.
Therefore, the length of $CD$ is $\boxed{12~\text{cm}}.$
(Answer E)

[collapse]

In triangle $ABC$, the side lengths are $AB = 15$ cm, $BC = 14$ cm, and $AC = 13$ cm. The value of $\tan C = \cdots \cdot$
A. $\dfrac{5}{13}$              C. $\dfrac{12}{13}$               E. $\dfrac{13}{12}$
B. $\dfrac{5}{12}$              D. $\dfrac{12}{5}$

Solution

Consider the following sketch of triangle $ABC$.
Since all three side lengths of the triangle are known, we can first determine the value of $\cos C$ using the law of cosines.

$$\begin{aligned} \cos C & = \dfrac{BC^2+AC^2-AB^2}{2 \cdot BC \cdot AC} \\ & = \dfrac{14^2+13^2-15^2}{2 \cdot 14 \cdot 13} \\ & = \dfrac{196+169-225}{2 \cdot 14 \cdot 13} \\ & = \dfrac{\cancelto{10}{140}}{2 \cdot \cancel{14} \cdot 13} = \dfrac{5}{13} \end{aligned}$$Using the right triangle approach, suppose the adjacent side to $\angle C$ is $5$ and the hypotenuse of $\angle C$ is $13.$ Consequently, the opposite side length is $\sqrt{13^2-5^2} = 12.$ This means that $\tan C = \dfrac{\text{opposite}}{\text{adjacent}} = \dfrac{12}{5}.$
(Answer D)

[collapse]

If in triangle $ABC$ the relation $a^2(1+\cos A) = 2bc \sin^2 A$ holds, then triangle $ABC$ is a $\cdots \cdot$
A. equilateral triangle
B. right triangle
C. isosceles triangle
D. scalene triangle
E. obtuse triangle

Solution

Use the law of cosines, namely $a^2 = b^2+c^2-2bc \cos A,$ along with the Pythagorean identity $\sin^2 A = 1-\cos^2 A.$ Thus, we obtain
$$\begin{aligned} a^2(1+\cos A) & = 2bc \sin^2 A \\ (b^2+c^2-2bc \cos A)(1+\cos A) & = 2bc(1-\cos^2 A) \\ (b^2+c^2-2bc \cos A)\cancel{(1+\cos A)} & = 2bc\cancel{(1+\cos A)}(1-\cos A) \\ b^2+c^2-\bcancel{2bc \cos A} & = 2bc-\bcancel{2bc \cos A} \\ b^2-2bc+c^2 & = 0 \\ (b-c)^2 & = 0 \\ b & = c. \end{aligned}$$Therefore, it can be concluded that triangle $ABC$ is an isosceles triangle because two of its sides have equal lengths.
(Answer C)

[collapse]

A car travels from point $A$ for $16~\text{km}$ in the direction of $40^{\circ}$, then turns and continues for $24~\text{km}$ toward point $B$ in the direction of $160^{\circ}$. The distance between $A$ and $B$ is $\cdots~\text{km}.$
A. $21$                     D. $32$
B. $8\sqrt7$                     E. $8\sqrt{19}$
C. $8\sqrt{10}$

Solution

Place point $C$ and use an auxiliary line as shown in the figure below.
From the figure, we obtain $\angle ACB = 20^{\circ} + 40^{\circ} = 60^{\circ}.$ Next, using the law of cosines, we obtain

$$\begin{aligned} AB^2 & = AC^2+BC^2-2 \cdot AC \cdot BC \cdot \cos \angle ACB \\ AB^2 & = 16^2+24^2-2 \cdot 16 \cdot 24 \cdot \cos 60^{\circ} \\ AB^2 & = 256+576-768 \cdot \dfrac12 \\ AB^2 & = 448 \\ AB & = \sqrt{448} = \sqrt{64 \times 7} = 8\sqrt7~\text{km}. \end{aligned}$$Therefore, the distance between $A$ and $B$ is $\boxed{8\sqrt7~\text{km}}.$
(Answer B)

[collapse]

A ship sails from Port A to Port B for $200$ miles in the direction of $35^{\circ}$. From Port B, the ship sails for $300$ miles toward Port C in the direction of $155^{\circ}$. The distance between Port A and Port C is $\cdots$ miles.
A. $100\sqrt{2}$                      D. $100\sqrt{13}$
B. $100\sqrt{3}$                      E. $100\sqrt{19}$
C. $100\sqrt{7}$

Solution

Consider the following sketch.
Sketch of a Law of Cosines Word Problem(The initial side for measuring angles always starts from the positive $X$-axis)
The length of $AC$ can then be determined using the law of cosines.
$$\begin{aligned} AC^2 & = AB^2 + BC^2-2 \cdot AB \cdot BC \cdot \cos 60^{\circ} \\ AC^2 & = (200)^2 + (300)^2-2 \cdot 200 \cdot 300 \cdot \dfrac{1}{2} \\ AC^2 & = 40.000 + 90.000-60.000 \\ AC^2 & = 70.000 \\ AC & = \sqrt{70.000} = 100\sqrt{7} \end{aligned}$$Therefore, the distance between Port A and Port C is $\boxed{100\sqrt{7}~\text{miles}}.$
(Answer C)

[collapse]

A ship sails eastward for $120$ km, then turns to a bearing of $60^{\circ}$ and continues for $100$ km before stopping. The distance from the ship’s starting point to its stopping point is $\cdots$ km.
A. $25\sqrt{50}$                      D. $27\sqrt{66}$
B. $20\sqrt{91}$                      E. $24\sqrt{70}$
C. $24\sqrt{66}$

Solution

Consider the following figure.
Sketch of a Law of Cosines Word ProblemNotice that the steering wheel is turned by $60^{\circ}$ at point $B$, meaning that the supplementary angle $\angle ABC = 60^{\circ}.$ The measurement of angles always starts from the positive $X$-axis.
Suppose point $A$ is the starting point and point $C$ is the stopping point of the ship.

Notice that $\angle ABC = 90^{\circ} + 30^{\circ} = 120^{\circ}.$
Since two sides and the included angle are known, to determine the required distance, namely the length of $AC$, we can use the law of cosines.
$$\begin{aligned} AC^2 & = AB^2 + BC^2-2 \cdot AB \cdot BC \cdot \cos \angle ABC \\ & = 120^2 + 100^2-2 \cdot 120 \cdot 100 \cdot \cos 120^{\circ} \\ & = 14.400 + 10.000-2 \cdot 120 \cdot 100 \cdot \left(-\dfrac12\right) \\ & = 24.400 + 12.000 \\ & = 36.400 = 100 \times 4 \times 91 \\ AC & = \sqrt{100 \times 4 \times 91} \\ & = 10 \times 2 \times \sqrt{91} = 20\sqrt{91} \end{aligned}$$Therefore, the distance from the ship’s starting point to its stopping point is $\boxed{20\sqrt{91}}$ km.
(Answer B)

[collapse]

A car travels from point A for $16$ km in the direction of $40^{\circ}$, then turns and continues for $24$ km toward point B in the direction of $160^{\circ}$. The distance between A and B is $\cdots$ km.
A. $21$                           D. $32$
B. $8\sqrt{7}$                    E. $8\sqrt{19}$
C. $8\sqrt{10}$

Solution

Consider the following sketch.
Sketch of a Law of Cosines Word ProblemIn triangle $ABC$ above, it is known that $AC = 16~\text{km}$, $CB = 24~\text{km},$ and $\angle ACB = 60^{\circ}.$ Using the law of cosines, we obtain

$$\begin{aligned} AB^2 & = AC^2 + CB^2-2 \cdot AC \cdot CB \cdot \cos 60^{\circ} \\ AB^2 & = (16)^2 + (24)^2-2 \cdot 16 \cdot 24 \cdot \dfrac{1}{2} \\ AB^2 & = 256 + 576-384 \\ AB^2 & = 448 \\ AB & = \sqrt{448} = 8\sqrt{7}. \end{aligned}$$Therefore, the distance from A to B is $\boxed{8\sqrt{7}~\text{km}}.$
(Answer B)

[collapse]

Suppose $a, b,$ and $c$ are the side lengths of triangle $ABC$, respectively. If $(a+b+c)(a-b+c) = 3ac,$ then the measure of the angle opposite side $b$ is $\cdots \cdot$
A. $30^{\circ}$                 C. $60^{\circ}$                  E. $90^{\circ}$
B. $45^{\circ}$                 D. $75^{\circ}$

Solution

Notice that
$\begin{aligned} (a+b+c)(a-b+c) & = 3ac \\ (a+c+b)(a+c-b) & = 3ac \\ (a+c)^2-b^2 & = 3ac \\ (a^2+2ac+c^2)-b^2 & = 3ac \\ a^2+c^2-ac & = b^2. \end{aligned}$
Suppose $B$ is the angle opposite side $b$. Now, using the law of cosines, we obtain
$\begin{aligned} \cos B & = \dfrac{a^2+c^2-b^2}{2ac} \\ & = \dfrac{a^2+c^2-(a^2+c^2-ac)}{2ac} \\ & = \dfrac{ac}{2ac} = \dfrac12. \end{aligned}$
Since $\cos B = \dfrac12$, the possible value of $B$ is $60^{\circ}.$
Therefore, the measure of the angle opposite side $b$ is $\boxed{60^{\circ}}.$
(Answer C)

[collapse]

Given triangle $ABC$ with point $D$ on $AB$ and point $E$ on $AC$ such that line segment $DE$ is formed. If $AD = 5,$ $DB = 3,$ $EC = 6,$ $AE = 4,$ and $BC = 8,$ then the length of line segment $DE$ is $\cdots \cdot$
A. $4$                    C. $6$                   E. $8$
B. $5$                    D. $7$

Solution

Consider $\triangle ABC.$ Using the law of cosines with respect to angle $A,$ we obtain
$$\begin{aligned} BC^2 & = AB^2 + BC^2-2 \cdot AB \cdot BC \cos A \\ 8^2 & = 8^2 + 10^2-2 \cdot 8 \cdot 10 \cos A \\ \cancel{64} & = \cancel{64} + 100-160 \cos A \\ \cos A & = \dfrac{100}{160} = \dfrac58. \end{aligned}$$Now consider $\triangle ADE.$ Using the law of cosines with respect to angle $A,$ we obtain
$$\begin{aligned} DE^2 & = AD^2 + AE^2-2 \cdot AD \cdot AE \cos A \\ DE^2 & = 5^2+4^2-\cancel{2} \cdot 5 \cdot \cancel{4} \cdot \dfrac{5}{\cancel{8}} \\ DE^2 & = 25 + 16-25 \\ DE^2 & = 16 \\ DE & = 4. \end{aligned}$$Therefore, the length of line segment $DE$ is $\boxed{4}.$
(Answer A)

[collapse]

Essay Section

Consider quadrilateral $ABCD$ as shown in the figure below.
law of cosines
Determine the length of $BC.$

Solution

From the given figure, the following information is known.

  • $AB = 2\sqrt6$ cm.
  • $DC = 7$ cm.
  • $\angle BAD = \angle BDC = 60^\circ.$
  • $\angle ADB = 45^\circ.$

First, find the length of $BD$ using the law of sines in $\Delta ABD.$
$$\begin{aligned} \dfrac{BD}{\sin \angle BAD} & = \dfrac{AB}{\sin \angle ADB} \\ \dfrac{BD}{\sin 60^\circ} & = \dfrac{2\sqrt6}{\sin 45^\circ} \\ \dfrac{BD}{\cancel{\frac12}\sqrt3} & = \dfrac{2\sqrt6}{\cancel{\frac12} \sqrt2} \\ \dfrac{BD}{\sqrt3} & = 2\sqrt3 \\ BD & = 2\sqrt3 \cdot \sqrt3 = 2 \cdot 3 = 6~\text{cm}. \end{aligned}$$Next, using the law of cosines in $\Delta BCD,$ we determine the length of $BC.$
$$\begin{aligned} BC^2 & = BD^2 + DC^2-2 \cdot BD \cdot DC \cdot \cos \angle BDC \\ & = (6)^2 + (7)^2-2(6)(7) \cdot \cos 60^\circ \\ & = (6)^2 + (7)^2-\cancel{2}(6)(7) \cdot \dfrac{1}{\cancel{2}} \\ & = 36 + 49-42 \\ & = 43 \\ BC & = \sqrt{43}~\text{cm} . \end{aligned}$$Therefore, the length of $BC$ is $\boxed{\sqrt{43}}$ cm.

[collapse]

Consider the following triangle $PQR.$
law of cosines
Determine the value of $x$ that satisfies the condition given in the figure.

Solution

From the given figure, the following information is known.

  • $PQ = (x + 1)$ cm.
  • $PR = (x-1)$ cm.
  • $QR = 2\sqrt{x+2}$ cm.
  • $\angle P = 60^\circ.$

Using the law of cosines with respect to $\angle P,$ we obtain
$$\begin{aligned} QR^2 & = PQ^2 + PR^2-2 \cdot PQ \cdot PR \cdot \cos P \\ (2\sqrt{x+2})^2 & = (x+1)^2 + (x-1)^2 -2(x+1)(x-1) \cdot \cos 60^\circ \\ 4(x + 2) & = (x^2 + 2x + 1) + (x^2-2x+1)-\cancel{2}(x+1)(x-1) \cdot \dfrac{1}{\cancel{2}} \\ 4x + 8 & = (2x^2 + 2)-(x^2-1) \\ 4x + 8 & = x^2 + 3 \\ x^2-4x-5 & = 0 \\ \color{red}{(x-5)}\color{blue}{(x+1)} & = 0. \end{aligned}$$The last equation gives $\color{red}{x-5=0}$ or $\color{blue}{x+1=0},$ which means $x = 5$ or $x = -1.$ Note that $x = -1$ is impossible because it would make the side length $PR$ equal to $0.$
Therefore, the value of $x$ that satisfies the condition is $\boxed{x = 5}.$

[collapse]

Given $\triangle ABC$ with $a+c = 12$ cm and $b + c = 13$ cm, and $\angle A = 60^{\circ}$. Determine the value of $a$.

Solution

Consider the following sketch of $\triangle ABC.$
Since $a + c = 12$ cm, it follows that $c = (12-a)$ cm.

Also note that
$\begin{aligned} (a + c)-(b+c) & = 12-13 \\ a-b & = -1 \\ b & = (a+1)~\text{cm}. \end{aligned}$
Next, to determine the value of $a,$ we use the law of cosines.
$$\begin{aligned} a^2 & = b^2+c^2-2bc \cos A \\ a^2 & = (a+1)^2+(12-a)^2-2(a+1)(12-a) \cos 60^{\circ} \\ a^2 & = (a^2+2a+1)+(144-24a+a^2)-\cancel{2}(-a^2+11a+12) \cdot \dfrac{1}{\cancel{2}} \\ a^2 & = a^2+2a+1+144-24a+a^2+a^2-11a-12 \\ a^2 & = 3a^2-33a+133 \\ 0 & = 2a^2-33a + 133 \\ 0 & = (2a-19)(a-7) \end{aligned}$$Thus, we obtain $a = \dfrac{19}{2}$ or $a = 7$.
Therefore, the value of $a$ is $\boxed{a = \dfrac{19}{2}~\text{or}~a = 7}.$

[collapse]

In the figure below, $ABCD$ is a cyclic quadrilateral (the sum of opposite angles is $180^{\circ}$). Prove that $$\cos \theta = \dfrac{c^2+d^2-a^2-b^2}{2(ab+cd)}.$$

Solution

If diagonal $BD$ is drawn in quadrilateral $ABCD,$ then by using the law of cosines in $\triangle ABD$ and $\triangle BCD,$ we obtain
$\begin{cases} BD^2 = c^2+d^2-2cd \cos \theta~~~~(\cdots 1) \\ BD^2 = a^2+b^2-2ab \cos C.~~~~(\cdots 2) \end{cases}$
In a cyclic quadrilateral, the sum of opposite angles is $180^{\circ}$ so that
$\theta + \angle C = 180^{\circ} \iff \angle C = 180^{\circ}-\theta.$
Equation $2$ can then be rewritten as
$BD^2 = a^2+b^2-2ab \cos (180^{\circ}-\theta).$
Using the angle relation identity, we obtain
$BD^2 = a^2+b^2+2ab \cos \theta.~~~(\cdots 3)$
Eliminate $BD^2$ from equations $1$ and $3$ to obtain
$$c^2+d^2-2cd \cos \theta-a^2-b^2-2ab \cos \theta = 0.$$Substitute and simplify.
$\begin{aligned}-2 \cos \theta(ab + cd) & = a^2+b^2-c^2-d^2 \\-2\cos \theta & = \dfrac{a^2+b^2-c^2-d^2}{ab+cd} \\ \cos \theta & = \dfrac{c^2+d^2-a^2-b^2}{2(ab+cd)} \end{aligned}$

Therefore, it is proven that $\boxed{\cos \theta = \dfrac{c^2+d^2-a^2-b^2}{2(ab+cd)}}.$

[collapse]

Given $\triangle ABC$ where $CD$ is a median, that is, a line segment dividing side $AB$ into two equal parts. Using the law of cosines, prove that:
a. $CD^2 = \dfrac12a^2 + \dfrac12b^2-\dfrac14c^2$
b. $4CD^2 = a^2+b^2+2ab \cos C$

Solution

Answer a)
Notice that $\angle ADC + \angle BDC = 180^{\circ}$ (the two angles form a straight angle), and we may also write $\angle BDC = 180^{\circ}-\angle ADC.$ By using the law of cosines in $\triangle ADC$ and $\triangle BDC,$ we obtain the following two equations.

$$\begin{cases} b^2 = \frac14c^2 + CD^2-2 \cdot \dfrac12 \cdot c \cdot CD \cos \angle ADC \\ a^2 = \frac14c^2 + CD^2-2 \cdot \dfrac12 \cdot c \cdot CD \cos \angle (180^{\circ}-ADC) \end{cases}$$Also note that $\cos \angle (180^{\circ}-ADC) =-\cos ADC.$ This means
$$\begin{cases} b^2 = \frac14c^2 + CD^2-2 \cdot \frac12 \cdot c \cdot CD \cos \angle ADC \\ a^2 = \frac14c^2 + CD^2 + 2 \cdot \frac12 \cdot c \cdot CD \cos ADC \end{cases}$$Add the two equations above to obtain
$\begin{aligned} b^2+a^2 & = \dfrac12c^2 + 2CD^2 \\ 2CD^2 & = a^2+b^2-\dfrac12c^2 \\ CD^2 & = \dfrac12 a^2+\dfrac12b^2-\dfrac14c^2. \end{aligned}$
Therefore, it is proven that $CD^2 = \dfrac12a^2 + \dfrac12b^2-\dfrac14c^2.$
Answer b)
Using the law of cosines with respect to side $AB,$ we obtain
$c^2 = a^2+b^2-2ab \cos C.$
Based on answer a, we know that
$CD^2 = \dfrac12a^2 + \dfrac12b^2-\dfrac14c^2.$
This equation is equivalent to
$4CD^2 = 2a^2 + 2b^2-c^2.$
Substitute $c^2 = a^2+b^2-2ab \cos C,$ and we get
$$\begin{aligned} 4CD^2 & = 2a^2 + 2b^2-(a^2+b^2-2ab \cos C) \\ & = a^2+b^2 + 2ab \cos C. \end{aligned}$$Therefore, it is proven that $4CD^2 = a^2+b^2+2ab \cos C.$

[collapse]

In $\triangle ABC,$ the ratio of the side lengths is given by $$a : b : c = 2 : \sqrt6 : (\sqrt3+1).$$Determine the measures of angles $A, B,$ and $C.$

Solution

Suppose $k$ is a positive real number. From the given ratio, we have $a = 2k,$ $b = k\sqrt6,$ and $c = (\sqrt3+1)k.$
Using the law of cosines, we obtain
$$\begin{aligned} \cos A & = \dfrac{b^2+c^2-a^2}{2bc} \\ & = \dfrac{(k\sqrt6)^2+((\sqrt3+1)k)^2-(2k)^2}{2(k\sqrt6)(\sqrt3+1)k} \\ & = \dfrac{6k^2+(\sqrt3+1)^2k^2-4k^2}{2k^2\sqrt6(\sqrt3+1)} \\ & = \dfrac{2\color{red}{k}^2+(4+2\sqrt3)\color{red}{k}^2}{6\color{red}{k}^2\sqrt2 + 2\color{red}{k}^2\sqrt6} \\ & = \dfrac{2+(4+2\sqrt3)}{6\sqrt2 + 2\sqrt6} \\ & =\dfrac{3+\sqrt3}{3\sqrt2 + \sqrt6} \times \color{blue}{\dfrac{3\sqrt2-\sqrt6}{3\sqrt2- \sqrt6}} \\ & =\dfrac{9\sqrt2-3\sqrt6+3\sqrt6-3\sqrt2}{18-6} \\ & = \dfrac{6\sqrt2}{12} = \dfrac12\sqrt2 \\ \Rightarrow A & = 45^{\circ}. \end{aligned}$$Using the same method, we obtain
$$\begin{aligned} \cos B & = \dfrac{a^2+c^2-b^2}{2ac} \\ & = \dfrac{(2k)^2+((\sqrt3+1)k)^2-(k\sqrt6)^2}{2(2k)(\sqrt3+1)k} \\ & = \dfrac{4k^2+(\sqrt3+1)^2k^2-6k^2}{4k^2(\sqrt3+1)} \\ & = \dfrac{-2\color{red}{k}^2+(4+2\sqrt3)\color{red}{k}^2}{(4\color{red}{k}^2\sqrt3 + 4\color{red}{k}^2} \\ & = \dfrac{-2+(4+2\sqrt3)}{4\sqrt3 + 4} \\ & =\dfrac{1+\sqrt3}{2\sqrt3 + 2} \times \color{blue}{\dfrac{2\sqrt3-2}{2\sqrt3-2}} \\ & = \dfrac{2\sqrt3-2+6-2\sqrt3}{12-4} \\ & = \dfrac{4}{8} = \dfrac12 \\ \Rightarrow B & = 60^\circ. \end{aligned}$$In $\triangle ABC,$ the sum of all interior angles is $180^\circ,$ so $$\angle C = 180^\circ-45^\circ-60^\circ=75^\circ.$$ Therefore, the measures of angles $A, B,$ and $C$ are respectively $45^\circ, 60^\circ,$ and $75^\circ.$

[collapse]