<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="description">
    <name>
      <text>5.1.13 (Cosine rule)</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<h3>Cosine rule</h3>
<p>The sine rule is not the only way that we can deal with angles and lengths of a given triangle. We can also use the <em>cosine rule</em>. The <em>cosine rule</em> relates the three sides of a triangle and one of the angles. We use the cosine rule in a similar manner to the sine rule and the rule we decide to use depends on the information we are given about the initial triangle.</p>
<p> </p>
<p>The <strong>cosine rule</strong> is stated as follows.</p>
<p>In any triangle \(ABC\) then 
\[ 
a^2 = b^2 + c^2 - 2bc \cos A \qquad \mbox{or} \qquad b^2 = a^2 + c^2 - 2ac \cos B \qquad \mbox{or} \qquad c^2 = a^2 + b^2 - 2ab \cos C.
 \]
</p>
<h3>Proof</h3>
<p>As we did with the formula for the area of a general triangle, we shall prove the cosine rule for an acute and an obtuse triangle, so consider the diagram below.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="@@PLUGINFILE@@/Cosine%20rule%20proof.png" alt="diagram of an acute and obtuse triangle for proving the cosine rule" width="1243" height="462" /></p>
<br/>
<p>In both triangles we have drawn the height \(h\) from the point \(C\) to the line \(AB\) (which has been extended in the obtuse case), so that it meets this line at the point \(D\). Let \(AD = x\) and \(CD = h\), then we can apply Pythagoras' Theorem in the triangle \(BCD\) in the acute case,
\[
\begin{align*}
a^2 &= h^2 + (c-x)^2
\\
\implies a^2 &= h^2 + c^2 -2cx + x^2
\end{align*}
\]
and in the obtuse case to obtain
\[
\begin{align*}
a^2 &= h^2 + (c+x)^2
\\
\implies a^2 &= h^2 + c^2 +2cx + x^2.
\end{align*}
\]
<p>
<p>Note that in both cases, applying Pythagoras to the triangle \(ADC\) gives \(h^2 + x^2 = b^2\). Therefore \(h^2 = b^2 - x^2\) and we can then substitute this value of \(h\) into the equations above to obtain</p>
<p>acute case: \(a^2 = b^2 + c^2 -2cx\)</p>
<p>obtuse case: \(a^2 = b^2 + c^2 +2cx\).</p>
<p>Now consider the triangle \(ADC\), this is a right-angled triangle so we can use normal trigonometry in both cases:</p>
<p>acute case: 
\[
\begin{align*}
\cos A &= \frac{x}{b}
\\
\implies x &= b \cos A
\\
\implies a^2 &= b^2 + c^2 -2bc \cos A.
\end{align*}
\]</p>
<p>obtuse case:
\[
\begin{align*}
\cos (180^\circ -A) &= \frac{x}{b}
\\
\implies -\cos A &= \frac{x}{b}
\\
\implies x &= -b \cos A
\\
\implies a^2 &= b^2 + c^2 -2bc \cos A.
\end{align*}
\]</p>
<p>Hence, in both cases we have that \(a^2 = b^2 + c^2 -2bc \cos A\), which is what we wanted to show. Swapping the labelling for \(a,b,c\) and \(A,B,C\) shows the other versions of the cosine rule using the same arguments, therefore the proof is complete.</p>]]></text>
<file name="Cosine rule proof.png" path="/" encoding="base64">[encoded data, 113272 characters]</file>
    </questiontext>
    <generalfeedback format="html">
      <text/>
    </generalfeedback>
    <defaultgrade>0</defaultgrade>
    <penalty>0</penalty>
    <hidden>0</hidden>
    <idnumber/>
  </question>
</quiz>
