<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>13.5.2.2 Definite integrals</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p class="HELM_exercise">Exercise</p>
<p>Evaluate the following.</p>
<ol class="HELM_parts">
    <li>\({\displaystyle\int_{@l1@}^{@u1@} {@exp1@}\ \mathrm{d}x} =\) [[input:ans1]] [[validation:ans1]] (give an exact value) [[feedback:prt1]]</li>

    <li>\({\displaystyle\int_{@l2@}^{@u2@} {@exp2@}\ \mathrm{d}t} =\) [[input:ans2]] [[validation:ans2]] (round to \(4\) decimal places) [[feedback:prt2]]</li>
</ol>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<ol class="HELM_parts">

    <li>
        <p>We need to calculate the integral \( I =\int {@exp1@}\ \mathrm{d}x .\)</p>
        <p>Using \( u = {@uu@}\) we get \(\dfrac{du}{dx} = {@du@} \Rightarrow \ \mathrm{d}x = \frac{1}{{@du@}}\ \mathrm{d}u.\)</p>
        <p>\[ \begin{aligned} I = \int {@exp1@}\ \mathrm{d}x = \int u^{{@po@}}\ \mathrm{d}x &amp;= \int u^{{@po@}} \frac{1}{{@du@}}\ \mathrm{d}u, \\ &amp;= \int e^u \ \mathrm{d}u, \\ &amp;= {@I1@}. \end{aligned}\]</p>
        <p>So \(\displaystyle{\int_{@l1@}^{@u1@} {@exp1@}\ \mathrm{d}x = \left[ {@I1@} \right]_{@l1@}^{@u1@} = {@ta1@}}.\)</p>
    </li>

    <li>
        <p>We need to calculate the integral \( I =\int {@exp2@}\ \mathrm{d}t .\)</p>
        <p>Using \(u = {@vv@}\) we get \(\dfrac{\mathrm{d}u}{\mathrm{d}t} = {@dv@} \Rightarrow \ \mathrm{d}t = \frac{1}{{@dv@}}\ \mathrm{d}u.\)</p>
        <p>\(\displaystyle{ I = \int {@exp2@}\ \mathrm{d}t = \int {@p1@} e^{u} \, \mathrm{d}t = \int {@p1@} e^u \frac{1}{{@dv@}}\ \mathrm{d}u= {@I2@}}.\)</p>
        <p>So \(\displaystyle{ \int_{@l2@}^{@u2@} {@exp1@}\ \mathrm{d}t = \left[ {@I2@} \right]_{@l2@}^{@u2@}= {@ta2@}}.\) </p>
    </li>
</ol>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020120600</text>
    </stackversion>
    <questionvariables>
      <text>aa: rand([2, 4, 6]);
bb: rand(3)+2;
po: rand([4,5]);

uu: aa*x+bb;
du: diff(uu, x);
exp1: (aa*x+bb)^po; 
vv: t^3;
dv: diff(vv,t);
p1: 3*t^2;
exp2: 3*t^2*e^(t^3);

I1:(uu^(po+1))/(po+1)*(1/du);    /*indefinite int, int exp1 by hand to display nicelly*/ 
I2: int(exp2,t);                          /* indefinite intrgral*/

l1: 1;   
u1: 2;
ta1: (int(exp1, x, l1, u1)); 
l2: 0;
u2: 1
ta2: decimalplaces(float(int(exp2, t, l2, u2)),4);</text>
    </questionvariables>
    <specificfeedback format="html">
      <text/>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>\( \int_{@l1@}^{@u1@} {@exp1@}\mathrm{d}x ={@ta1@}, \quad \int_{@l2@}^{@u2@} {@exp2@}\mathrm{d}x ={@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>numerical</type>
      <tans>ta1</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>1</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans2</name>
      <type>numerical</type>
      <tans>dispdp(ta2,4)</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords>/</forbidwords>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>0</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>1.0000000</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>
    </prt>
    <prt>
      <name>prt2</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>NumDecPlaces</answertest>
        <sans>ans2</sans>
        <tans>ta2</tans>
        <testoptions>4</testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt2-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt2-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>1944856407</deployedseed>
    <deployedseed>2068869152</deployedseed>
    <deployedseed>1931331985</deployedseed>
    <deployedseed>1150244549</deployedseed>
    <deployedseed>1304143687</deployedseed>
    <deployedseed>1963701357</deployedseed>
    <deployedseed>895363680</deployedseed>
    <deployedseed>1317661731</deployedseed>
    <deployedseed>735761654</deployedseed>
    <deployedseed>891108382</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta1</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>dispdp(ta2,4)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt2-1-T</expectedanswernote>
      </expected>
    </qtest>
    <hint format="html">
      <text>(Hint: you need to simplify sin(t^3 + 1))</text>
    </hint>
  </question>
</quiz>
