<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>29.1.3.15 conservative vector field properties for line integral</text>
    </name>
    <questiontext format="moodle_auto_format">
      <text><![CDATA[<p>Consider the integral \(\displaystyle \int_C \underline{F}\cdot \underline{dr}\) with \(\underline{F} = {@3*aa@}x^2y^2\underline{i} + ({@2*aa@}x^3y − {@aa@})\underline{j}\). It is known that \(F\) is a conservative vector field. Find a scalar field \(\phi\) so that \(\underline{\nabla}\phi = \underline{F}.\) Please write <code>C</code> as the constant of integration in your final answer.</p>
<p>\(\phi =\)[[input:ans1]] [[validation:ans1]]</p>
<p>Use property 4 to evaluate the integral \(\displaystyle \int_C \underline{F}\cdot \underline{dr}\) where \(C\) is a path with start-point (0, 0) and end point (1, 4).</p>
<p>\(\displaystyle \int_C \underline{F}\cdot \underline{dr} =\)[[input:ans2]] [[validation:ans2]]</p>]]></text>
    </questiontext>
    <generalfeedback format="moodle_auto_format">
      <text><![CDATA[<p>(a) We know that \(\underline{F} = {@3*aa@}x^2y^2\underline{i} + ({@2*aa@}x^3y − {@aa@})\underline{j}\) is a conservative vector field, and aim to find \(\phi\) such that \(\underline{\nabla}\phi = \underline{F}\):
\[\begin{aligned}
\frac{\partial \phi}{\partial x}\underline{i} + \frac{\partial \phi}{\partial y}\underline{j} &= {@3*aa@}x^2y^2\underline{i} + ({@2*aa@}x^3y − {@aa@})\underline{j}\\
\implies \qquad&\\
\phi &= {@aa@}x^3y^2 + f(y)\\
\mbox{and}\qquad&\\
\phi &= {@aa@}x^3y^2 - {@aa@}y + g(x)\\
\implies\qquad \phi &= {@aa@}x^3y^2 - {@aa@}y + C
\end{aligned}\]
where \(C\) is some constant.</p>

<p>(b) We aim to find \(\displaystyle \int_C \underline{F}\cdot \underline{dr}\), using property 4. Property 4 states that: "For any conservative vector field \(\underline{F}\), it is possible to find a scalar field \(\phi\) such that \(\underline{\nabla}\phi = \underline{F}\). Then,\(\displaystyle \oint_C \underline{F}\cdot \underline{dr} = \phi(B) - \phi(A)\) where \(A\) and \(B\) are the start and end points of contour \(C\)." Applying this here, we find:
\[\begin{aligned}
\int_C \underline{F}\cdot \underline{dr} &= \phi(1, 4) - \phi (0, 0)\\
&=  {@aa@}(1)^3(4)^2 - {@aa@}(4) + C - ( {@aa@}(0)^3(0)^2 - {@aa@}(0) + C)\\
&= {@12*aa@} + C - C\\
&={@12*aa@}
\end{aligned}\]
</p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2025073100</text>
    </stackversion>
    <questionvariables>
      <text>aa:rand(6)+1;

ta1:aa*x^3*y^2-aa*y+C;
ta2:12*aa;</text>
    </questionvariables>
    <specificfeedback format="html">
      <text>[[feedback:prt1]]</text>
    </specificfeedback>
    <questionnote format="html">
      <text>\(\underline{F} = {@3*aa@}x^2y^2\underline{i} + ({@2*aa@}x^3y − {@aa@})\underline{j}\)</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>ta1</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>ta2</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>ta1</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0.5</truescore>
        <truepenalty/>
        <truenextnode>1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>2</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans2</sans>
        <tans>ta2</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>
      <node>
        <name>2</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans2</sans>
        <tans>subst(1, x, subst( 4, y, ans1)) - subst(0, x, subst( 0, y, ans1))</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.5</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-3-T</trueanswernote>
        <truefeedback format="html">
          <text>Follow through mark</text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-3-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>706926921</deployedseed>
    <deployedseed>698521794</deployedseed>
    <deployedseed>868799453</deployedseed>
    <deployedseed>1840611732</deployedseed>
    <deployedseed>1475177867</deployedseed>
    <deployedseed>1519335260</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description>Test case assuming the teacher's input gets full marks.</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>aa*x^2+y</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>aa+4</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.5000000</expectedscore>
        <expectedpenalty/>
        <expectedanswernote>prt1-3-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>3</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>10000</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>100000</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty/>
        <expectedanswernote>prt1-3-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
