<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>1.0.13 (Binomial?)</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p>Given that \[ ({@p@})^3 = {@p_3@}, \] find the coefficient of \( x^4\) in the expansion of \( ({@p@})^6 .\)</p><p>[[input:ans]] [[validation:ans]]</p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>Using the given information,</p><p>\[\begin{align*} ({@p@})^6 &amp;=&nbsp; \left( ({@p@})^3 \right)^2 \\ &amp;= \left({@p_3@}\right)\left({@p_3@}\right) \end{align*}\]</p><p>We can selectively multiply out terms from these brackets, thinking about which combinations will produce a multiple of \(x^4\).</p><ul><li><p>{@coeff(p_3,x^3)*x^3@} from the first bracket, {@coeff(p_3,x)*x@} from the second - gives {@coeff(p_3,x^3)*coeff(p_3,x)*x^4@}</p></li><li><p>{@coeff(p_3,x^2)*x^2@} from the first bracket, {@coeff(p_3,x^2)*x^2@} from the second - gives {@coeff(p_3,x^2)*coeff(p_3,x^2)*x^4@}</p></li><li><p>{@coeff(p_3,x)*x@} from the first bracket, {@coeff(p_3,x^3)*x^3@} from the second - gives {@coeff(p_3,x^3)*coeff(p_3,x)*x^4@}</p></li></ul><p>So overall the coefficient of \(x^4\) is {@ta@}.</p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020070100</text>
    </stackversion>
    <questionvariables>
      <text>a: rand([2,3]);
b: rand_with_prohib(-3,3,[0,a,-a]);
p: a*x+b;
p_3: expand(p^3);
p_6: expand(p^6);

ta: coeff(expand(p^6),x,4)</text>
    </questionvariables>
    <specificfeedback format="html">
      <text><![CDATA[<p>[[feedback:prt1]]</p>]]></text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>\( {@p^6@} = {@p_6@},\)</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>ans</name>
      <type>algebraic</type>
      <tans>ta</tans>
      <boxsize>5</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords>expand</forbidwords>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>1</requirelowestterms>
      <checkanswertype>1</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/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans</sans>
        <tans>ta</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>1-0-T </trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>1</falsenextnode>
        <falseanswernote>1-0-F </falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans</sans>
        <tans>w1</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-2-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[<p>Your answer is the coefficient of \(x^3\)&nbsp; and not of \(x\).&nbsp;</p>]]></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-2-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>1586433814</deployedseed>
    <deployedseed>321804646</deployedseed>
    <deployedseed>812823393</deployedseed>
    <deployedseed>1006764726</deployedseed>
    <deployedseed>1155105439</deployedseed>
    <deployedseed>484485333</deployedseed>
    <deployedseed>1951220915</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans</name>
        <value>ta</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>1-0-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans</name>
        <value>w1</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-2-T</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
