<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>22.2.2.2 Systems of 1st order DEs</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p class="HELM_exercise">Exercise</p>

<p>Obtain the solutions of the pair of first order differential equations <br>
<br>\(\qquad \left.\begin{array}{l}\dot x={@aa@}x\\ \dot y={@bb@}y\end{array}\right\}\ \ \)<br>
<br>given the <span><strong>initial conditions</strong></span> <br>
<br>\(\qquad \begin{array}{lll}x(0)={@x0@}&amp;&amp;\text{ i.e.}\ \ x={@x0@}\ \ \text{ at}\ \ t=0\\ y(0)={@y0@}&amp;&amp;\text{ i.e.}\ \ y={@y0@}\ \ \text{ at}\ \
t=0\end{array}\)<br>
<br>(The notation is that <span class="math inline">\( \dot x\equiv \dfrac{dx}{dt},\ \ \dot
y\equiv \dfrac{dy}{dt}\)</span> )
<br>[Hint: Recall, from your study of differential equations, that the general solution of the differential equation <span class="math inline">\( \dfrac{dy}{dt}=Ky\)</span> is <span class="math inline">\(y=y_0
e^{Kt}\)</span>.]</p>


<div>\(x=\) [[input:ans1]] [[validation:ans1]]</div>
<div>\(y=\) [[input:ans2]] [[validation:ans2]]</div>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>Using the hint: <span class="math inline">\(x=x_0e^{{@aa@}t}\qquad
y=y_0e^{{@bb@}t}\)</span> where <span class="math inline">\(x_0=x(0)\)</span> and <span class="math inline">\(y_0=y(0)\)</span>. <br>From the given initial condition <span class="math inline">\(x_0={@x0@}\qquad y_0={@x0@}\quad\),</span> <br>so finally <span class="math inline">\(x={@sol1@}\qquad y={@sol2@}\)</span>.</p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020070100</text>
    </stackversion>
    <questionvariables>
      <text>aa:rand_with_prohib(-6,6,[0])
bb:rand_with_prohib(-6,6,[0,aa])
x0:rand_with_prohib(-6,6,[0,1])
y0:rand_with_prohib(-6,6,[0,1,x0])

sol1:x0*e^(aa*t)
sol2:y0*e^(bb*t)</text>
    </questionvariables>
    <specificfeedback format="html">
      <text>[[feedback:prt1]]</text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>x={@sol1@}
y={@sol2@}</text>
    </questionnote>
    <questiondescription format="moodle_auto_format">
      <text/>
    </questiondescription>
    <questionsimplify>0</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>sol1</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>sol2</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>2</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans1</sans>
        <tans>sol1</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.5000000</truescore>
        <truepenalty/>
        <truenextnode>4</truenextnode>
        <trueanswernote>x_correct</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>3</falsenextnode>
        <falseanswernote>x_wrong</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>3</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans1/(e^(aa*t))</sans>
        <tans>1</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.2500000</truescore>
        <truepenalty/>
        <truenextnode>4</truenextnode>
        <trueanswernote>forgot_init_condition</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[It looks like you forgot to use the initial condition \(x(0)={@x0@}\).<br>]]></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>4</falsenextnode>
        <falseanswernote>x_wrong_unsure_why</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>4</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans2</sans>
        <tans>sol2</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.5000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>y_correct</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>5</falsenextnode>
        <falseanswernote>y_wrong</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>5</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans2/(e^(bb*t))</sans>
        <tans>1</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.2500000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>y_forgot_init_conditions</trueanswernote>
        <truefeedback format="html">
          <text>It looks like you forgot to use the initial condition \(y(0)={@y0@}\).</text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>y_wrong_unsure_why</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>919371985</deployedseed>
    <deployedseed>1333188777</deployedseed>
    <deployedseed>273872009</deployedseed>
    <deployedseed>1965347380</deployedseed>
    <deployedseed>385487911</deployedseed>
    <deployedseed>1823473994</deployedseed>
    <deployedseed>146855772</deployedseed>
    <deployedseed>419424582</deployedseed>
    <deployedseed>1892346009</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>sol1</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>sol2</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>y_correct</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>e^(aa*t)</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>e^(bb*t)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.5000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>y_forgot_init_conditions</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>3</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>(x0)*exp(aa*t)</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>(y0)*exp(bb*t)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>y_correct</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
