<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>29.1.4.18 vector line integral of a function</text>
    </name>
    <questiontext format="moodle_auto_format">
      <text><![CDATA[<p>Find the vector line integral \(\displaystyle \int _C f\ \underline{\mathrm{d}r}\) where \(f = x^2\) and \(C\) is</p>
<ol class="HELM_parts">
<li>the curve \(y = x^{1/2}\) from \((0, 0)\) to \(({@aa^2@}, {@aa@})\).<br>
 \(\displaystyle \int _C f\ \underline{\mathrm{d}r} =\)[[input:ans1]]\(\underline{i} +\)[[input:ans2]]\(\underline{j}\) [[validation:ans1]] [[validation:ans2]][[feedback:prt1]]</li>
<li>the line \(y = x/{@bb@}\) from \((0, 0)\) to \(({@bb*3@}, 3)\).<br>
 \(\displaystyle \int _C f\ \underline{\mathrm{d}r} =\)[[input:ans3]]\(\underline{i} +\)[[input:ans4]]\(\underline{j}\) [[validation:ans3]] [[validation:ans4]][[feedback:prt2]]</li>
</ol>
<p></p>]]></text>
    </questiontext>
    <generalfeedback format="moodle_auto_format">
      <text><![CDATA[<p>We know that \(f = x^2\), and aim to find the vector line integral \(\displaystyle \int _C f \underline{\mathrm{d}r}\) in the following two cases:</p>

<p>(a) For the curve \(y = x^{1/2}\) from \((0, 0)\) to \(({@aa^2@}, {@aa@})\). Then we have that:
\[\begin{aligned}
\int _C f \underline{dr} &= \int^{@aa^2@}_0 x^2\ \mathrm{d}x\underline{i} + \int^{y={@aa@}}_{y=0}x^2\ \mathrm{d}y \underline{j}\\
&= \int^{@aa^2@}_0 x^2\ \mathrm{d}x\underline{i} + \int^{@aa@}_0 y^4\ \mathrm{d}y \underline{j}\\
&=\left[\frac{x^3}{3}\right]^{@aa^2@}_0\underline{i} + \left[\frac{y^5}{5}\right]^{@aa@}_0\underline{j}\\
&= {@aa^6/3@}\underline{i}+{@aa^5/5@}\underline{j}
\end{aligned}\]</p>

<p>
 For the curve \(y = \frac{x}{{@bb@}}\) from \((0, 0)\) to \(({@3*bb@}, 3)\). Then we have that:
\[\begin{aligned}
\int_C f \underline{dr} &= \int^{@3*bb@}_0 x^2\ \mathrm{d}x\underline{i} + \int^3_0 {@bb^2@}y^2\ \mathrm{d}y \underline{j}\\
&=\left[\frac{x^3}{3}\right]^{@3*bb@}_0\underline{i} + \left[\frac{{@bb^2@}y^3}{3}\right]^3_0\underline{j}\\
&= {@9*bb^3@}\underline{i}+{@9*bb^2@}\underline{j}
\end{aligned}\]</p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2025040100</text>
    </stackversion>
    <questionvariables>
      <text>aa:rand(6)+2
bb:rand(6)+2

ta1i:aa^6/3;
ta1j:aa^5/5;
ta2i:9*bb^3;
ta2j:9*bb^2;</text>
    </questionvariables>
    <specificfeedback format="html">
      <text/>
    </specificfeedback>
    <questionnote format="html">
      <text>\(C_1\): \(y = x^{1/2}\) from \((0, 0)\) to \(({@aa^2@}, {@aa@})\) \(C_2\): \(y = x/{@bb@}\) from \((0, 0)\) to \(({@bb*3@}, 3)\)</text>
    </questionnote>
    <questiondescription format="html">
      <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>dot</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>ta1i</tans>
      <boxsize>15</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>ta1j</tans>
      <boxsize>15</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>ta2i</tans>
      <boxsize>15</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>ans4</name>
      <type>algebraic</type>
      <tans>ta2j</tans>
      <boxsize>15</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>
    <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>ta1i</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0</truescore>
        <truepenalty/>
        <truenextnode>1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans2</sans>
        <tans>ta1j</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-2-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-2-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>AlgEquiv</answertest>
        <sans>ans3</sans>
        <tans>ta2i</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0</truescore>
        <truepenalty/>
        <truenextnode>1</truenextnode>
        <trueanswernote>prt2-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt2-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans4</sans>
        <tans>ta2j</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt2-2-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt2-2-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>870242736</deployedseed>
    <deployedseed>273581409</deployedseed>
    <deployedseed>402503800</deployedseed>
    <deployedseed>1108958794</deployedseed>
    <deployedseed>1883954366</deployedseed>
    <deployedseed>1525838588</deployedseed>
    <deployedseed>547785695</deployedseed>
    <deployedseed>152658164</deployedseed>
    <deployedseed>771716566</deployedseed>
    <deployedseed>1063059771</deployedseed>
    <deployedseed>1038967480</deployedseed>
    <deployedseed>370445316</deployedseed>
    <deployedseed>1089225726</deployedseed>
    <deployedseed>272815356</deployedseed>
    <deployedseed>2128122802</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description>Test case assuming the teacher's input gets full marks.</description>
      <testinput>
        <name>ans1</name>
        <value>ta1i</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta1j</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>ta2i</value>
      </testinput>
      <testinput>
        <name>ans4</name>
        <value>ta2j</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-2-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt2-2-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta1i+4</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta1j</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>ta2i-5</value>
      </testinput>
      <testinput>
        <name>ans4</name>
        <value>ta2j</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty/>
        <expectedanswernote>prt1-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty/>
        <expectedanswernote>prt2-1-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
