<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>Complex_Fifth_Roots</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p>Determine a fifth root of \(z = {@z@} \) in the form \( p + q i \).</p>
<p>You may use the commands \( \cos() \) and \( \sin() \) in your answers.</p>
<p><br />\( p + q i =\) [[input:ans1]] [[validation:ans1]]</p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>For the complex number \[z = {@z@}\] The modulus \(|z| = {@absz@}\) and the argument of \(z = {@argz@}\) <br /> Therefore the cube roots of \(z\) have a modulus of \[\sqrt[3]{z} = \sqrt[3]{@absz@} = {@solm@}\] \[\] The arguments of \(z = {@argz@}\) or \({@argz+2*pi@}\) or \({@argz-2*pi@}\) <br /> Giving the arguments of the cube roots as \( \frac{@argz@}{3}\) ,\(\frac{@argz+2*pi@}{3}\) and \(\frac{@argz-2*pi@}{3}\) equal to \({@sola1@}\),\({@sola2@}\),\({@sola3@}\).</p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text/>
    </stackversion>
    <questionvariables>
      <text>ns:1-2*rand(2);
 fr:rand([Pi/6,Pi/3,Pi/4,Pi/2,3*Pi/4,2*Pi/3]);
 argz:ns*fr;
 absz:rand(8)+2;
 zr:absz*cos(argz);
 zi:ev(absz*sin(argz),simp);
 z:ev(zr+zi*i,simp);
znum:ev(subst(%i,i,z),numer);
 solm:ev((absz)^(1/5),simp);
 sola1:argz/5;
 solr:ev(solm*cos(sola1),simp);
 soli:ev(solm*sin(sola1),simp);
 sol1:ev(solr+soli*%i,simp);
sola2:argz/5+2*%pi/5;
 solr2:ev(solm*cos(sola2),simp);
 soli2:ev(solm*sin(sola2),simp);
 sol2:ev(solr2+soli2*%i,simp);
sola3:argz/5+4*%pi/5;
 solr3:ev(solm*cos(sola3),simp);
 soli3:ev(solm*sin(sola3),simp);
 sol3:ev(solr3+soli3*%i,simp);
sola4:argz/5-2*%pi/5;
 solr4:ev(solm*cos(sola4),simp);
 soli4:ev(solm*sin(sola4),simp);
 sol4:ev(solr4+soli4*%i,simp);
sola5:argz/5-4*%pi/5;
 solr5:ev(solm*cos(sola5),simp);
 soli5:ev(solm*sin(sola5),simp);
 sol5:ev(solr5+soli5*%i,simp);
 wrong1:z

 wr2:-argz/5;
 wrr2:ev(solm*cos(wr2),simp);
 wri2:ev(solm*sin(wr2),simp);
 wrong2:ev(wrr2+wri2*%i,simp);

 wrm:solm+1;
 wr3:argz/5;
 wrr3:ev(wrm*cos(wr3),simp);
 wri3:ev(wrm*sin(wr3),simp);
 wrong3:ev(wrr3+wri3*%i,simp);</text>
    </questionvariables>
    <specificfeedback format="html">
      <text><![CDATA[<p>[[feedback:Result]]</p>]]></text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>Cube roots of \({@z@}\), \({@sol1@}\).</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>dot</multiplicationsign>
    <sqrtsign>1</sqrtsign>
    <complexno>i</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens>[</matrixparens>
    <isbroken>0</isbroken>
    <variantsselectionseed/>
    <input>
      <name>ans1</name>
      <type>algebraic</type>
      <tans>sol1</tans>
      <boxsize>50</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>1</requirelowestterms>
      <checkanswertype>1</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>1</showvalidation>
      <options/>
    </input>
    <prt>
      <name>Result</name>
      <value>3.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text><![CDATA[check1:ev(subst(%pi,pi,ans1^5),numer,expand);
serr:if(cabs(ev(check1-znum,simp))<10^(-10)) then 1 else 0;]]></text>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>serr</sans>
        <tans>1</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>Result-0-T </trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>Result-0-F </falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>1211956934</deployedseed>
    <deployedseed>1706044840</deployedseed>
    <deployedseed>405675150</deployedseed>
    <deployedseed>2117390987</deployedseed>
    <deployedseed>1850328910</deployedseed>
    <deployedseed>1694053862</deployedseed>
    <deployedseed>186956054</deployedseed>
    <deployedseed>447128852</deployedseed>
    <deployedseed>1600697882</deployedseed>
    <deployedseed>398165677</deployedseed>
    <deployedseed>1877310622</deployedseed>
    <deployedseed>199968406</deployedseed>
    <deployedseed>1145025682</deployedseed>
    <deployedseed>71831089</deployedseed>
    <deployedseed>1471631175</deployedseed>
    <deployedseed>434076251</deployedseed>
    <deployedseed>1066416633</deployedseed>
    <deployedseed>512591956</deployedseed>
    <deployedseed>1171845539</deployedseed>
    <deployedseed>1284308083</deployedseed>
    <deployedseed>32018850</deployedseed>
    <deployedseed>1159434287</deployedseed>
    <deployedseed>675631328</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>sol1</value>
      </testinput>
      <expected>
        <name>Result</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>Result-0-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>wrong1</value>
      </testinput>
      <expected>
        <name>Result</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>Result-0-F</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>3</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>wrong2</value>
      </testinput>
      <expected>
        <name>Result</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>Result-0-F</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>4</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>sol2</value>
      </testinput>
      <expected>
        <name>Result</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>Result-0-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>5</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>wrong3</value>
      </testinput>
      <expected>
        <name>Result</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>Result-0-F</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>6</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>sol3</value>
      </testinput>
      <expected>
        <name>Result</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>Result-0-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>7</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>sol4</value>
      </testinput>
      <expected>
        <name>Result</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>Result-0-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>8</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>sol5</value>
      </testinput>
      <expected>
        <name>Result</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>Result-0-T</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
