Precalculus

Trigonometry

Trigonometry Logo

Law of Cosines

Solved Problems

Click or tap a problem to see the solution.

Example 1

Find the least diagonal of a regular hexagon with side length a.

Example 2

Two sides of a triangle are equal to a and b. The angle between them is 135°. Find the third side c.

Example 3

The middle side of a triangle is \(1\) greater than the least side and \(1\) less than the greatest side. The cosine of the middle angle is equal to \(\frac{3}{5}.\) Find the area of the triangle.

Example 4

In a triangle \(ABC,\) the side \(AB\) is \(7,\) the midline parallel to the side \(AC\) is \(3,\) and the angle \(\angle C = 120^\circ.\) Find the side \(BC.\)

Example 5

Given a triangle whose sides are \(a, b,\) and \(c;\) \(m_a\) is the length of the median drawn from the vertex \(A\) to side \(a.\) Prove that \[m_a^2 = \frac{1}{4}\left( {2{b^2} + 2{c^2} - {a^2}} \right).\]

Example 6

Prove that the sum of the squares of the diagonals of a parallelogram is equal to the sum of the squares of its sides.

Example 1.

Find the least diagonal of a regular hexagon with side length \(a.\)

Solution.

A regular hexagon with the least diagonal
Figure 4.

The internal angle in a regular hexagon is \(120^\circ.\) Using the Cosine Rule, we get

\[{d^2} = {a^2} + {a^2} - 2{a^2}\cos 120^\circ = 2{a^2} - 2{a^2} \cdot \left( { - \frac{1}{2}} \right) = 2{a^2} + {a^2} = 3{a^2}.\]

Then the least diagonal is equal to

\[d = a\sqrt 3 .\]

Example 2.

Two sides of a triangle are equal to \(a\) and \(b.\) The angle between them is \(135^\circ.\) Find the third side \(c.\)

Solution.

By the Cosine Rule, we have

\[{c^2} = {a^2} + {b^2} - 2ab\cos 135^\circ .\]

Calculate \(\cos 135^\circ\) using the Reduction Identity:

\[\cos 135^\circ = \cos \left( {180^\circ - 45^\circ } \right) = - \cos 45^\circ = - \frac{{\sqrt 2 }}{2}.\]

Hence,

\[{c^2} = {a^2} + {b^2} - 2ab\left( { - \frac{{\sqrt 2 }}{2}} \right) = {a^2} + {b^2} + ab\sqrt 2 , \Rightarrow c = \sqrt {{a^2} + {b^2} + ab\sqrt 2 } .\]

Example 3.

The middle side of a triangle is \(1\) greater than the least side and \(1\) less than the greatest side. The cosine of the middle angle is equal to \(\frac{3}{5}.\) Find the area of the triangle.

Solution.

Let \(x\) be the length of the middle side. Then the other sides of the triangles are equal to \(x - 1\) and \(x + 1.\)

In any triangle, the mid-sized side and mid-sized angle are opposite to each other. Hence, using the Law fo Cosines, we can write:

\[\frac{3}{5} = \frac{{{{\left( {x - 1} \right)}^2} + {{\left( {x + 1} \right)}^2} - {x^2}}}{{2\left( {x - 1} \right)\left( {x + 1} \right)}}.\]

Solve this equation for \(x:\)

\[\frac{3}{5} = \frac{{{x^2} - \cancel{{2x}} + 1 + \cancel{{{x^2}}} + \cancel{{2x}} + 1 - \cancel{{{x^2}}}}}{{2\left( {x - 1} \right)\left( {x + 1} \right)}}, \Rightarrow \frac{3}{5} = \frac{{{x^2} + 2}}{{2\left( {{x^2} - 1} \right)}}, \Rightarrow 5{x^2} + 10 = 6{x^2} - 6, \Rightarrow {x^2} = 16.\]

The negative root \(x = -4\) does not make sense. Hence, \(x = 4.\) The other two sides are equal \(x - 1 = 3\) and \(x + 1 = 5.\)

Note that this triangle satisfies the Pythagorean theorem:

\[{3^2} + {4^2} = {5^2}.\]

In such a case, the area of the triangle is

\[A = \frac{{3 \cdot 4}}{2} = 6.\]

Example 4.

In a triangle \(ABC,\) the side \(AB\) is \(7,\) the midline parallel to the side \(AC\) is \(3,\) and the angle \(\angle C = 120^\circ.\) Find the side \(BC.\)

Solution.

A triangle with a midline
Figure 5.

The midline \(KM\) is half the length of the side \(AC,\) that is, \(AC = 6.\)

Let \(x\) be the length of the side \(BC.\) Write the Cosine Rule for the triangle \(ABC:\)

\[A{B^2} = A{C^2} + B{C^2} - 2 \cdot AC \cdot BC \cdot \cos 120^\circ .\]

Recall that \(\cos 120^\circ = - \cos 60^\circ = - \frac{1}{2}.\) Then

\[{7^2} = {6^2} + {x^2} - 2 \cdot 6 \cdot x \cdot \left( { - \frac{1}{2}} \right), \Rightarrow 49 = 36 + {x^2} + 6x, \Rightarrow {x^2} + 6x - 13 = 0.\]

Find the discriminant of the quadratic equation:

\[D = {6^2} - 4 \cdot 1 \cdot \left( { - 13} \right) = 36 + 52 = 88.\]

The roots of the equation are

\[{x_{1,2}} = \frac{{ - 6 \pm \sqrt {88} }}{2} = \frac{{ - 6 \pm 2\sqrt {22} }}{2} = - 3 \pm \sqrt {22} .\]

We choose the positive root, so

\[BC = x = - 3 + \sqrt {22} .\]

Example 5.

Given a triangle whose sides are \(a, b,\) and \(c;\) \(m_a\) is the length of the median drawn from the vertex \(A\) to side \(a.\) Prove that \[m_a^2 = \frac{1}{4}\left( {2{b^2} + 2{c^2} - {a^2}} \right).\]

Solution.

A triangle with the median from vertex A to side a.
Figure 6.

Use the Law of Cosines for the triangle \(ABC:\)

\[{c^2} = {a^2} + {b^2} - 2ab\cos \gamma.\]

Solve this equation for \(\cos \gamma:\)

\[\cos \gamma = \frac{{{a^2} + {b^2} - {c^2}}}{{2ab}}.\]

Apply now the Law of Cosines to the triangle \(AMC\) taking into account that \(CM = \frac{{BC}}{2} = \frac{a}{2}.\) This yields:

\[m_a^2 = {\left( {\frac{a}{2}} \right)^2} + {b^2} - 2 \cdot \frac{a}{2} \cdot b\cos \gamma = \frac{{{a^2}}}{4} + {b^2} - ab\cos \gamma .\]

Subctitute \(\cos \gamma\) found above:

\[m_a^2 = \frac{{{a^2}}}{4} + {b^2} - ab \cdot \frac{{{a^2} + {b^2} - {c^2}}}{{2ab}} = \frac{{{a^2}}}{4} + {b^2} - \frac{{{a^2} + {b^2} - {c^2}}}{2} = \frac{{{a^2} + 4{b^2} - 2{a^2} - 2{b^2} + 2{c^2}}}{4} = \frac{{2{c^2} + 2{b^2} - {a^2}}}{4} = \frac{1}{4}\left( {2{c^2} + 2{b^2} - {a^2}} \right).\]

Example 6.

Prove that the sum of the squares of the diagonals of a parallelogram is equal to the sum of the squares of its sides.

Solution.

Consider a parallelogram \(ABCD\) with sides \(a, b\) and diagonals \(d_1,\) \(d_2.\)

A parallelogram with the diagonals d1 and d2
Figure 7.

Denote the angle \(A\) by \(\alpha.\) The other angle \(B\) is then equal to

\[\angle B = 180^\circ - \alpha .\]

Applying the Law of Cosines to the triangle \(ABC,\) we can write:

\[A{C^2} = A{B^2} + B{C^2} - 2 \cdot AB \cdot BC \cdot \cos \left( {180^\circ - \alpha } \right).\]

By the Reduction Identity,

\[\cos \left( {180^\circ - \alpha } \right) = - \cos \alpha .\]

This yields:

\[d_1^2 = {a^2} + {b^2} - 2ab\left( { - \cos \alpha } \right) = {a^2} + {b^2} + 2ab\cos \alpha .\]

Similarly we find the square of the diagonal \(d_2:\)

\[B{D^2} = A{B^2} + A{D^2} - 2 \cdot AB \cdot AD \cdot \cos \alpha ,\]

or

\[d_2^2 = {a^2} + {b^2} - 2ab\cos \alpha .\]

Calculate the sum of the squares of the diagonals:

\[d_1^2 + d_2^2 = {a^2} + {b^2} + \cancel{{2ab\cos \alpha }} + {a^2} + {b^2} - \cancel{{2ab\cos \alpha }} = 2\left( {{a^2} + {b^2}} \right).\]

The right-hand side represents the sum of the squares of four sides of the parallelogram.

Page 1 Page 2