<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="description">
    <name>
      <text>6.1.12 (Example of showing a line is tangent)</text>
    </name>
    <questiontext format="moodle_auto_format">
      <text><![CDATA[<h3>Examples</h3>

<ol type = "a">
<li>Find the points where the line \(y = 2x+6\) intersects the circle with equation \(x^2 + y^2 + 2x + 2y - 8 = 0\).</li>
<li>Show that the line with equation \(x + y = 4\) is tangent to the circle with equation \(x^2 + y^2 + 6x + 2y - 22 = 0\).</li>
</ol>

<h3>Solutions</h3>

<ol type = "a">
<li>We substitute \(y = 2x + 6\) into the equation for the circle. This gives:
\[
\begin{align*}
x^2 + (2x+ 6)^2 + 2x + 2(2x+6) -8 &= 0
\\
x^2 + 4x^2 + 24x +36 + 2x + 4x + 12 - 8 &= 0
\\
5x^2 + 30x + 40 &= 0
\\
5(x^2 + 6x + 8) &= 0
\\
5(x+2)(x+4) &= 0.
\end{align*}
\]
For this to be equal to zero either \(x+2 = 0\) or \(x+ 4 = 0\) thus either \(x = -2\) or \(x = -4\) and thus \(y = 2(-2) + 6 = 2\) or \(y = 2(-4) + 6 = -2\). Therefore the circle and the line meet at the points \((-2,2)\) and \((-4,-2)\).</li>
<li>Substitute y using the equation of the straight line to get:
\[
\begin{align*}
x^2 + y^2 + 6x + 2y - 22 &= 0
\\
x^2 + (4-x)^2 + 6x + 2(4-x) - 22 &= 0
\\
x^2 + 16 - 8x + x^2 + 6x + 8 - 2x - 22 &= 0
\\
2x^2 - 4x + 2 &= 0
\\
2(x^2 - 2x +1) &= 0
\\
2(x-1)^2 &= 0. 
\end{align*}
\]
For this to be equal to zero we must have \(x=1\) or \(x=1\). Since these solutions are equal the line is a tangent to a circle. 
<br/>
Alternatively we could note that the discriminant of the quadratic \(x^2 - 2x +1=0\) is \(b^2 - 4ac = (-2)^2 -4(1 \times 1) = 4-4 =0\). Since it is zero the line is a tangent to a circle (see week 1). Note that if we need to find the point of contact then the first method is more efficient. To find the point, substitute the value found for \(x\) into the equation of the line (or circle) to calculate the corresponding \(y\)-coordinate. </li>
</ol>]]></text>
    </questiontext>
    <generalfeedback format="moodle_auto_format">
      <text/>
    </generalfeedback>
    <defaultgrade>0</defaultgrade>
    <penalty>0</penalty>
    <hidden>0</hidden>
    <idnumber/>
  </question>
</quiz>
