<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>2.1.8 (Division quadratic over linear all steps)</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<table style="display:inline">
<tbody>
<tr>
<td style="text-align: right; min-width: 10em;">\(\dfrac{{@numer1@}}{{@x+d1@}}=\) </td><td style="text-align: left; border-bottom: 1pt solid black;">\( ({@x+d1@})\Big( \) [[input:ans1]][[validation:ans1]] \(\Big) +\)[[input:ans2]][[validation:ans2]]</td>
</tr>
<tr>
<td style="text-align: center;">&nbsp;</td><td style="text-align: center;">\( ({@x+d1@}) \)</td>
</tr><tr>
<td style="text-align: right;">&nbsp;\(=\)</td><td style="text-align: left;">[[input:ans3]][[validation:ans3]]</td>
</tr>
</tbody>
</table>
<p><br></p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>\( \dfrac{{@(x+d1)*(a1*x+b1)+c1@}}{({@x+d1@})} = \dfrac{{@(x+d1)*(a1*x+b1)@}}{({@x+d1@})}+\dfrac{{@c1@}}{({@x+d1@})} = {@a1*x+b1+c1/(x+d1)@}&nbsp; \)<br></p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020070100</text>
    </stackversion>
    <questionvariables>
      <text><![CDATA[d1:rand([3,4,5]);
a1:rand([2,3]);
b1:rand_with_prohib(-5,5,[0]);
c1:rand([-4,-2,2,4]); /* ensure c1 is even to avoid clashing with "last step only" variant */
numer1:ev(expand((x+d1)*(a1*x+b1)+c1),simp);
ta1:a1*x+b1;
ta2:c1;
ta3: unary_minus_sort((a1*x+b1)+c1/(x+d1));
polypart:a1*x+b1;
fracpart:c1/(x+d1);]]></text>
    </questionvariables>
    <specificfeedback format="html">
      <text><![CDATA[<p>[[feedback:prt1]]<br></p>]]></text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>{@(numer1)/(x+d1)=ta3@}</text>
    </questionnote>
    <questiondescription format="moodle_auto_format">
      <text/>
    </questiondescription>
    <questionsimplify>0</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>ans1</name>
      <type>algebraic</type>
      <tans>ta1</tans>
      <boxsize>7</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>ans2</name>
      <type>algebraic</type>
      <tans>ta2</tans>
      <boxsize>3</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>ta3</tans>
      <boxsize>10</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint>??? + ?/(x-?)</syntaxhint>
      <syntaxattribute>1</syntaxattribute>
      <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/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans1</sans>
        <tans>ta1</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0.3000000</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><![CDATA[<p>Your answer for the bracket in the numerator is not correct - expanding \(({@x+d1@})({@ans1@})\) gives {@expand((x+d1)*ans1)@} which does not given the right \(x^2\) and \(x\) terms.</p>]]></text>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans2</sans>
        <tans>ta2</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.3000000</truescore>
        <truepenalty/>
        <truenextnode>2</truenextnode>
        <trueanswernote>prt1-2-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>2</falsenextnode>
        <falseanswernote>prt1-2-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[<p>Your remainder term is not correct.</p>]]></text>
        </falsefeedback>
      </node>
      <node>
        <name>2</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans3</sans>
        <tans>ta3</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.0000000</truescore>
        <truepenalty/>
        <truenextnode>3</truenextnode>
        <trueanswernote>prt1-3-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-3-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[<p>Your final answer is not correct.</p>]]></text>
        </falsefeedback>
      </node>
      <node>
        <name>3</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>polynomialp(ans3-fracpart,[x])</sans>
        <tans>true</tans>
        <testoptions/>
        <quiet>1</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.4000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-4-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-4-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[<p>Your final answer does not seem to be in the correct form.<br></p>]]></text>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>1141448290</deployedseed>
    <deployedseed>1027752931</deployedseed>
    <deployedseed>1361840987</deployedseed>
    <deployedseed>224352385</deployedseed>
    <deployedseed>1255647760</deployedseed>
    <deployedseed>717347457</deployedseed>
    <deployedseed>1890695475</deployedseed>
    <deployedseed>1066629253</deployedseed>
    <deployedseed>2051362795</deployedseed>
    <deployedseed>1422743545</deployedseed>
    <deployedseed>734425803</deployedseed>
    <deployedseed>463373602</deployedseed>
    <deployedseed>493917523</deployedseed>
    <deployedseed>480657232</deployedseed>
    <deployedseed>1347644097</deployedseed>
    <deployedseed>852515016</deployedseed>
    <deployedseed>879647357</deployedseed>
    <deployedseed>168687981</deployedseed>
    <deployedseed>1146638209</deployedseed>
    <deployedseed>1987683485</deployedseed>
    <deployedseed>2061246844</deployedseed>
    <deployedseed>1395889773</deployedseed>
    <deployedseed>1902472518</deployedseed>
    <deployedseed>1706486271</deployedseed>
    <deployedseed>1567342853</deployedseed>
    <deployedseed>878596427</deployedseed>
    <deployedseed>1282578915</deployedseed>
    <deployedseed>1479271417</deployedseed>
    <deployedseed>189900104</deployedseed>
    <deployedseed>936815502</deployedseed>
    <deployedseed>495670511</deployedseed>
    <deployedseed>867245569</deployedseed>
    <deployedseed>2114297352</deployedseed>
    <deployedseed>1583924374</deployedseed>
    <deployedseed>98826743</deployedseed>
    <deployedseed>756551025</deployedseed>
    <deployedseed>354409223</deployedseed>
    <deployedseed>261318511</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta1</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta2</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>ta3</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-4-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta1</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta2</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>(numer1)/(x+d1)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.6000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-4-F</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>3</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta1+1</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta2+1</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>ta3</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.4000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-4-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>4</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta1</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta2</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>factor(polypart)+fracpart</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-4-T</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
