<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>6.1.14 (Find intersection points of circle and line)</text>
    </name>
    <questiontext format="moodle_auto_format">
      <text><![CDATA[<p>Find the points where the line \(y ={@line@}\) intersects the circle with equation \({@circ@}\). If you believe there to be one point of intersection enter this point twice.</p>

<p>([[input:ans11]] [[validation:ans11]][[feedback:prt11]],[[input:ans12]] [[validation:ans12]])[[feedback:prt12]]</p>
<p>([[input:ans21]] [[validation:ans21]] [[feedback:prt21]], [[input:ans22]] [[validation:ans22]]) [[feedback:prt22]]</p>]]></text>
    </questiontext>
    <generalfeedback format="moodle_auto_format">
      <text><![CDATA[<p> We substitute \(y = {@line@}\) into the equation for the circle. This gives:
\[
\begin{align*}
x^2 + (3x)^2 &= 20
\\
x^2 + 9x^2 &= 20
\\
10x^2 &= 20
\\
x^2 &= 2
\\
x = \pm \sqrt{2}
\end{align*}
\]
So either \(x = \sqrt{2}\) or \(x = -\sqrt{2}\) thus either \(y = 3(\sqrt{2}) = 3\sqrt{2}\) or \(y =3(-\sqrt{2})\). Therefore the circle and the line meet at the points ({@ta11@}, {@ta12@}) and ({@ta21@}, {@ta22@}).</li>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020081700</text>
    </stackversion>
    <questionvariables>
      <text>line: 3*x;
circ: x^2 + y^2 =20;

aa: ev(circ = 0, y=line);
bb:expand(aa);

xx1: solve(bb)[1];
xx2: solve(bb)[2];

yy1: ev(line, x=xx1);
yy2: ev(line, x=xx2);

pp:solve(yy1);
pp2: map(rhs,pp);

p1: (xx1,yy1);
p2: (xx2,yy2);

ta11: sqrt(2);
ta12: 3*sqrt(2);
ta21: -sqrt(2);
 ta22: -3*sqrt(2);</text>
    </questionvariables>
    <specificfeedback format="html">
      <text/>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text/>
    </questionnote>
    <questiondescription format="moodle_auto_format">
      <text/>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <prtcorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:green;"><i class="fa fa-check"></i></span> Correct answer, well done.]]></text>
    </prtcorrect>
    <prtpartiallycorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:orange;"><i class="fa fa-adjust"></i></span> Your answer is partially correct.]]></text>
    </prtpartiallycorrect>
    <prtincorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:red;"><i class="fa fa-times"></i></span> Incorrect answer.]]></text>
    </prtincorrect>
    <decimals>.</decimals>
    <scientificnotation>*10</scientificnotation>
    <multiplicationsign>none</multiplicationsign>
    <sqrtsign>1</sqrtsign>
    <complexno>i</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens>[</matrixparens>
    <isbroken>0</isbroken>
    <variantsselectionseed/>
    <input>
      <name>ans11</name>
      <type>algebraic</type>
      <tans>ta11</tans>
      <boxsize>5</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans12</name>
      <type>algebraic</type>
      <tans>ta12</tans>
      <boxsize>5</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans21</name>
      <type>algebraic</type>
      <tans>ta21</tans>
      <boxsize>5</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans22</name>
      <type>algebraic</type>
      <tans>ta22</tans>
      <boxsize>5</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <prt>
      <name>prt11</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans11</sans>
        <tans>ta11</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt11-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>1</falsenextnode>
        <falseanswernote>prt11-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans11</sans>
        <tans>ta21</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt11-2-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt11-2-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt12</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans12</sans>
        <tans>ta12</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt12-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>1</falsenextnode>
        <falseanswernote>prt12-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans12</sans>
        <tans>ta22</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt12-2-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt12-2-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt21</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans21</sans>
        <tans>ta21</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt21-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>1</falsenextnode>
        <falseanswernote>prt21-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans21</sans>
        <tans>ta11</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt21-2-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt21-2-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt22</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans22</sans>
        <tans>ta22</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt22-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>1</falsenextnode>
        <falseanswernote>prt22-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans22</sans>
        <tans>ta12</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt22-2-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt22-2-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans11</name>
        <value>ta11</value>
      </testinput>
      <testinput>
        <name>ans12</name>
        <value>ta12</value>
      </testinput>
      <testinput>
        <name>ans21</name>
        <value>ta21</value>
      </testinput>
      <testinput>
        <name>ans22</name>
        <value>ta22</value>
      </testinput>
      <expected>
        <name>prt11</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt11-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt12</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt12-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt21</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt21-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt22</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt22-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans11</name>
        <value>ta21</value>
      </testinput>
      <testinput>
        <name>ans12</name>
        <value>ta22</value>
      </testinput>
      <testinput>
        <name>ans21</name>
        <value>ta11</value>
      </testinput>
      <testinput>
        <name>ans22</name>
        <value>ta12</value>
      </testinput>
      <expected>
        <name>prt11</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt11-2-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt12</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt12-2-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt21</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt21-2-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt22</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt22-2-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>3</testcase>
      <description/>
      <testinput>
        <name>ans11</name>
        <value>ta22</value>
      </testinput>
      <testinput>
        <name>ans12</name>
        <value>ta11</value>
      </testinput>
      <testinput>
        <name>ans21</name>
        <value>ta12</value>
      </testinput>
      <testinput>
        <name>ans22</name>
        <value>ta21</value>
      </testinput>
      <expected>
        <name>prt11</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt11-2-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt12</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt12-2-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt21</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt21-2-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt22</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt22-2-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
