<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>9.5.4.5 Vector and Cartesian equation of a plane, Exercise</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p class="HELM_exercise">Exercise</p>
<p>Find the equation of a plane which is normal to \({@N1vec@}\)
 and which is a distance \(1\) from the origin. Give both vector and
Cartesian forms.</p>
<p>The vector equation of the plane is:</p>
<p> [[input:ans12]]  [[validation:ans12]] \({}\cdot{@stackvector(r)@}=\) [[input:ans13]] [[validation:ans13]]</p>
[[feedback:prt1]]

<p>The Cartesian equation of the plane is</p>
<p> [[input:ans3]] [[validation:ans3]] \(=\) [[input:ans4]] [[validation:ans4]] </p>
[[feedback:prt2]]]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>The unit normal to the plane is given by</p>
\[\underline{\hat{n}} = \frac{1}{{@magn1@}} {@n1@} = {@un1@}.\]
<p>A plane with unit normal vector \(\underline{\hat{n}}\) which is of a distance \(1\) to the origin is given by the vector equation</p>
\[{@un1@} \cdot \underline{r} = 1.\]
<p>Expanding out the vector expression we see the Cartesian equation of the plane is</p>
\[{@un1[1,1]*x+un1[3,1]*z=1@}.\]]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020120600</text>
    </stackversion>
    <questionvariables>
      <text><![CDATA[stackvectortex(ex):= block(sconcat("{ \\underline{", tex1(first(args(ex))), "}}"));
ordergreat(x,y,z,i,j,k);
u1: matrix([i],[j],[k]);
r1: matrix([x],[y],[z]);
n1: matrix([4],[0],[10])-rand(matrix([3],[1],[20]));
N1vec: texboldatoms(dotproduct(n1,u1));
magn1:sqrt(dotproduct(n1,n1));
un1: n1/magn1;
taEq: dotproduct(r1,un1)=1;

n11: n1[1,1];
n12: n1[2,1];
n13: n1[3,1];
r_n: dotproduct(r1,n1);
a_n: sqrt(dotproduct(n1,n1));
ta1:  r_n = a_n;]]></text>
    </questionvariables>
    <specificfeedback format="html">
      <text/>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>plane \({@N1vec@}\) so eq: \({@un1@} \cdot \mathbf{r} = 1\)</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>symi</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens>[</matrixparens>
    <isbroken>0</isbroken>
    <variantsselectionseed/>
    <input>
      <name>ans12</name>
      <type>matrix</type>
      <tans>un1</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>ans13</name>
      <type>algebraic</type>
      <tans>1</tans>
      <boxsize>2</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>ans3</name>
      <type>algebraic</type>
      <tans>r_n</tans>
      <boxsize>8</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords>.</forbidwords>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans4</name>
      <type>algebraic</type>
      <tans>a_n</tans>
      <boxsize>5</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords>.</forbidwords>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text>eq1: dotproduct(r1,ans12)=ans13;</text>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>SysEquiv</answertest>
        <sans>[eq1]</sans>
        <tans>[taEq]</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt2</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text>eq2: ans3 = ans4;</text>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>SysEquiv</answertest>
        <sans>[eq2]</sans>
        <tans>[taEq]</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt2-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt2-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>540798065</deployedseed>
    <deployedseed>1457669110</deployedseed>
    <deployedseed>1139082957</deployedseed>
    <deployedseed>1886756895</deployedseed>
    <deployedseed>1110197460</deployedseed>
    <deployedseed>938549478</deployedseed>
    <deployedseed>1330898737</deployedseed>
    <deployedseed>1994630408</deployedseed>
    <deployedseed>1585442492</deployedseed>
    <deployedseed>254911919</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans12</name>
        <value>un1</value>
      </testinput>
      <testinput>
        <name>ans13</name>
        <value>1</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>r_n</value>
      </testinput>
      <testinput>
        <name>ans4</name>
        <value>a_n</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt2-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans12</name>
        <value>n1</value>
      </testinput>
      <testinput>
        <name>ans13</name>
        <value>a_n</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>a_n</value>
      </testinput>
      <testinput>
        <name>ans4</name>
        <value>r_n</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt2-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>3</testcase>
      <description/>
      <testinput>
        <name>ans12</name>
        <value>n1</value>
      </testinput>
      <testinput>
        <name>ans13</name>
        <value>1</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>r_n</value>
      </testinput>
      <testinput>
        <name>ans4</name>
        <value>1</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty/>
        <expectedanswernote>prt1-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty/>
        <expectedanswernote>prt2-1-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
