<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>9.3.18 (Partial fractions (improper, 2 linear factors) 2)</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p>Write the improper rational function \(\dfrac{@ratFnNum@}{@expand(ratFnDen)@}\) as as the sum of a polynomial and the partial fractions decomposition of a proper rational function.<br></p><p>\(\dfrac{@ratFnNum@}{@expand(ratFnDen)@} = \) [[input:ans1]][[validation:ans1]] \(+\) [[input:ans2]][[validation:ans2]]</p><p><br></p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>First of all, we carry out polynomial division:</p><p>\[ \begin{align*} &amp; {@ratFn@} \\ =&amp; \dfrac{ ({@ratFnDen@})({@ansBits[1]@})+({@ansBits[2]@}) }{({@ratFnDen@})} \\ =&amp; {@ansBits[1]@}+\dfrac{@ansBits[2]@}{@ratFnDen@}\end{align*} \]</p><p>To find partial fractions for \(\dfrac{@ansBits[2]@}{@ratFnDen@}\), we want to find \(A\) and \(B\) so that</p><p>\[\begin{eqnarray*} \dfrac{@ansBits[2]@}{@ratFnDenFacs@} &amp;=&amp; {@partialFractionsForm@} \\ &amp;=&amp; \frac{A({@x-b@})+B({@x-a@})}{{@ratFnDenFacs@}} \end{eqnarray*}\]</p><p>Evaluating the numerators when {@x=a@} gives \(A={@A@}\).</p><p>Similarly, {@x=b@} gives \(B={@B@}\).</p><p></p><p>Thus \[&nbsp;{@ratFn@}=\left({@ta1@}\right)+{@ta2@} \]<br></p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020081700</text>
    </stackversion>
    <questionvariables>
      <text>ordergreat(A,B);
denRoots:rand([[-5,-2],[-5,2],[-5,5],[-4,-1],[-4,3],[-3,-2],[-3,2],[-3,5],[-2,2],[-2,5],[-1,3],[1,2],[1,5],[2,5],[4,5]]);
a:denRoots[1];
b:denRoots[2];
partialFractionsForm:A/(x-a)+B/(x-b);
A:rand_with_prohib(-5,5,[0]);
B:rand_with_prohib(-5,5,[0,A,-A]);
C:rand_range(2,4);
D:rand_with_prohib(-3,3,[0]);
partialFractions:ev(partialFractionsForm);
propRatFn:ratsimp(partialFractions);
propRatFnNum:num(propRatFn);
ratFnNum:num(ratsimp(partialFractions+C*x+D));
ratFnDenFacs:(x-a)*(x-b);
ratFnDen:expand(ratFnDenFacs);
ratFn:ratFnNum/ratFnDen;
ansBits:divide(ratFnNum,ratFnDen);
ta1:C*x+D;
ta2:partialFractions;</text>
    </questionvariables>
    <specificfeedback format="html">
      <text><![CDATA[<p>[[feedback:prt1]]<br></p>]]></text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>\(\displaystyle {@ratFn@}=\left({@ta1@}\right)+{@ta2@}\)</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>ans1</name>
      <type>algebraic</type>
      <tans>ta1</tans>
      <boxsize>10</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>1</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>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>1</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>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+ans2</sans>
        <tans>ta1+ta2</tans>
        <testoptions>x</testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0.5000000</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>
      <node>
        <name>1</name>
        <description/>
        <answertest>PartFrac</answertest>
        <sans>ans2</sans>
        <tans>ta2</tans>
        <testoptions>x</testoptions>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.5000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-2-T</trueanswernote>
        <truefeedback format="html">
          <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>1661382395</deployedseed>
    <deployedseed>922296877</deployedseed>
    <deployedseed>1224463914</deployedseed>
    <deployedseed>17523891</deployedseed>
    <deployedseed>87382408</deployedseed>
    <deployedseed>100785756</deployedseed>
    <deployedseed>954508447</deployedseed>
    <deployedseed>1655481873</deployedseed>
    <deployedseed>751379244</deployedseed>
    <deployedseed>1690172306</deployedseed>
    <deployedseed>631975092</deployedseed>
    <deployedseed>1093247419</deployedseed>
    <deployedseed>21180017</deployedseed>
    <deployedseed>2004821749</deployedseed>
    <deployedseed>1589654267</deployedseed>
    <deployedseed>894096323</deployedseed>
    <deployedseed>406111628</deployedseed>
    <deployedseed>34606885</deployedseed>
    <deployedseed>1917401454</deployedseed>
    <deployedseed>1447763698</deployedseed>
    <deployedseed>304314752</deployedseed>
    <deployedseed>663712917</deployedseed>
    <deployedseed>804234414</deployedseed>
    <deployedseed>1639257240</deployedseed>
    <deployedseed>10377234</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta1</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta2</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-2-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta1</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>propRatFn</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.5000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-2-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
