<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>10.3.14 (Definite integral power 2)</text>
    </name>
    <questiontext format="html">
      <text>Evaluate the following definite integral:
\[ \int^{@rdm3@}_{@rdm2@}{@p@}d{@v@}. \]

[[input:ans1]] [[validation:ans1]]</text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>An antiderivative of {@p@} is \(\displaystyle{@q@}\).</p>
<p>So, using the Fundamental Theorem,</p><p>\[\begin{align*}&nbsp;\int^{@rdm3@}_{@rdm2@}{@p@}d{@v@} &amp;= \left[{@q@}\right]^{@rdm3@}_{@rdm2@} \\ &amp;=&nbsp; \left({@(make_multsgn("dot"),subst(rdm3,v,q)),simp=false@}\right) - \left({@(make_multsgn("dot"),subst(rdm2,v,q)),simp=false@}\right) \\&nbsp;&nbsp;&amp;=&nbsp; \left({@(simp:true,subst(rdm3,v,q))@}\right) - \left({@subst(rdm2,v,q)@}\right) \\ &amp;=&nbsp;{@(simp:true,subst(rdm3,v,q)-subst(rdm2,v,q))@} \end{align*}\]</p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2022082900</text>
    </stackversion>
    <questionvariables>
      <text><![CDATA[v:t;
rdm2:rand([-1,-2,-3]);
rdm3:rand_with_prohib(1,3,[-rdm2]);
rdm4:rand_range(3,6);
rdm1:rand_with_prohib(2,5,[rdm4+1]); /* avoid (n+1)x^n, which has a "nicer" integral */
p:rdm1*v^rdm4;
q:int(p,v);]]></text>
    </questionvariables>
    <specificfeedback format="html">
      <text><![CDATA[<p>[[feedback:Result]]</p>]]></text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>\[ \int^{@rdm3@}_{@rdm2@}{@p@}d{@v@} = {@int(p,v,rdm2,rdm3)@} \]</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>int(p,v,rdm2,rdm3)</tans>
      <boxsize>15</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>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans1</sans>
        <tans>int(p,v,rdm2,rdm3)</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>Result-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>1</falsenextnode>
        <falseanswernote>Result-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans1</sans>
        <tans>-int(p,v,rdm2,rdm3)</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>Result-2-T</trueanswernote>
        <truefeedback format="html">
          <text>Your answer is the negative of that expected. 

Have you got the limits the wrong way round?</text>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>Result-2-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>1696237443</deployedseed>
    <deployedseed>295942388</deployedseed>
    <deployedseed>2012360947</deployedseed>
    <deployedseed>1845801086</deployedseed>
    <deployedseed>419859138</deployedseed>
    <deployedseed>403810619</deployedseed>
    <deployedseed>2051772800</deployedseed>
    <deployedseed>1698604821</deployedseed>
    <deployedseed>755601607</deployedseed>
    <deployedseed>1313608831</deployedseed>
    <deployedseed>2122707149</deployedseed>
    <deployedseed>324466885</deployedseed>
    <deployedseed>1990887729</deployedseed>
    <deployedseed>514843223</deployedseed>
    <deployedseed>952229813</deployedseed>
    <deployedseed>2140994196</deployedseed>
    <deployedseed>508791118</deployedseed>
    <deployedseed>333211626</deployedseed>
    <deployedseed>1372855101</deployedseed>
    <deployedseed>143764337</deployedseed>
    <deployedseed>440588618</deployedseed>
    <deployedseed>155583459</deployedseed>
    <deployedseed>1202679469</deployedseed>
    <deployedseed>1332254399</deployedseed>
    <deployedseed>117982657</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ev(int(p,v,rdm2,rdm3),simp)</value>
      </testinput>
      <expected>
        <name>Result</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>Result-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ev(int(p,v)+c,simp)</value>
      </testinput>
      <expected>
        <name>Result</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>Result-2-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
