<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>12.2.2.6 electrical circuit</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p class="HELM_exercise">Exercise</p><br>
<p><strong>Equivalent resistance in an electrical circuit</strong></p><br>
<p>Current distributes itself in the wires of an electrical circuit so as to minimise the total power consumption i.e. the rate at which heat is produced. The power \((p)\) dissipated in an electrical circuit is given by the product of voltage \((v)\) and
    current \((i)\) flowing in the circuit, i.e. \(p = vi.\) The voltage across a resistor is the product of current and resistance \((r).\) This means that the power dissipated in a resistor is given by \(p = i^2r.\)</p><br>
<p>Suppose that an electrical circuit contains three resistors \(r_1, r_2, r_3\) and \(i_1\) represents the current flowing through both \(r_1\) and \(r_2\), and that \((i - i_1)\) represents the current flowing through \(r_3\) (see diagram):</p>
<figure class="HELM_figure"><img src="@@PLUGINFILE@@/12-2-Circuit.svg?time=1622714422703" alt="Electrical circuit diagram with three resistances R1, R2, R3. R1 and R2 (on same branch) in parallel with R3." width="153" height="125" class="img-responsive atto_image_button_text-bottom"></figure>

<ol class="HELM_parts">
    <li>Write down an expression for the power dissipated in the circuit: \(p=\) [[input:ans1]] [[validation:ans1]] (for subscripts write e.g. <code>x1</code> for \(x_1\))<br>[[feedback:prt1]]</li>
    <li>Show that the power dissipated is a minimum when \(\ \ i_1=\dfrac{r_3}{r_1+r_2+r_3}\ i\).<br><br>\(\quad\)Differentiating with respect to [[input:ans2]] [[validation:ans2]], we get: <br><br>\(\qquad p' =\) [[input:ans3]] [[validation:ans3]] and<br><br>\(\qquad
        p'' =\) [[input:ans4]] [[validation:ans4]]<br><br>\(\quad\) Hence, for \(i_1=\dfrac{r_3}{r_1+r_2+r_3}\ i\) the power dissipated is a minimum since ...<br><br>\(\quad\)(select one to complete the sentence)<br><br> [[input:ans5]] [[validation:ans5]]<br>[[feedback:prt2]]</li>
    <li>If \(R\) is the equivalent resistance of the circuit, i.e. of \(r_1,\ r_2\) and \(r_3\), for minimum power dissipation and the corresponding voltage \(V\) across the circuit is given by \(V = iR = i_1(r_1 + r_2)\), find an expression for \(R\).<br><br>\(\quad
        R=\) [[input:ans6]] [[validation:ans6]]<br>[[feedback:prt3]]</li>
</ol><br>

<p><strong>Note:</strong> In this problem \(R_1\) and \(R_2\) could be replaced by a single resistor. However, treating them as separate allows the possibility of considering more general situations (variable resistors or temperature dependent resistors).</p>]]></text>
<file name="12-2-Circuit.svg" path="/" encoding="base64">[encoded data, 23004 characters]</file>
<file name="12-2-diagram-resistor.svg" path="/" encoding="base64">[encoded data, 22792 characters]</file>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<ol class="HELM_parts">

<li><p>The power dissipated in the circuit may be written as \[p={@ta1@}.\] </p></li>

<li><p>Differentiating with respect to \(i_1\) we obtain \[\dfrac{\mathrm{d}p}{\mathrm{d}i_1}={@ta3@}.\]This is zero when \[{@ev(minp_loc,c=i)@}.\]To check if this represents a minimum we differentiate a second time
    to find \[\frac{\mathrm{d}^2p}{\mathrm{d}i_1^2}={@ta4@}\]which is positive for any value of \(i_1\). So the previous result represents a minimum.</p></li>

<li><p>Finally, to find \(R\), substitute for \(i_1\) in \(iR=i_1(r_1+r_2)\) to obtain \[{@ev(ev(minp_v,minp_loc),c=i)@}\] which means \[R = {@ta6@}.\]</p></li>
</ol>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020120600</text>
    </stackversion>
    <questionvariables>
      <text><![CDATA[/*Question variables*/
power_diss: i1^2*r1 + i1^2*r2 + (c-i1)^2*r3;
dp_diss: diff(power_diss,i1);
d2p_diss: diff(power_diss,i1,2);
minp_loc: solve(dp_diss,i1)[1];
minp_v: c*R=i1*(r1+r2);
Rval: rhs(solve(ev(minp_v,minp_loc),R)[1]);


/*Answers*/
ta1: ev(power_diss,c=i);
ta2: i1;
ta3: ev(dp_diss,c=i);
ta4: ev(d2p_diss,c=i);
ta5: [[1,false,"\\(p''\\) is always positive."],[2,false,"this value for \\( i_1\\) is the solution to \\(p'=0\\) and \\(p\\) is an increasing function."],[3,true, "this value for \\(i_1\\) is the solution to \\(p'=0\\) and \\(p''\\) is positive."],[null,false, "(No answer given)"]];
ta6: ev(Rval,c=i);]]></text>
    </questionvariables>
    <specificfeedback format="html">
      <text/>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <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>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>4</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>ta3</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>ta4</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>ans5</name>
      <type>radio</type>
      <tans>ta5</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>0</mustverify>
      <showvalidation>0</showvalidation>
      <options>LaTeX, nonotanswered</options>
    </input>
    <input>
      <name>ans6</name>
      <type>algebraic</type>
      <tans>ta6</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>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>AlgEquiv</answertest>
        <sans>ans2</sans>
        <tans>ta2</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0.2500000</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>
      <node>
        <name>1</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans3</sans>
        <tans>ta3</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.2500000</truescore>
        <truepenalty/>
        <truenextnode>2</truenextnode>
        <trueanswernote>prt2-2-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>2</falsenextnode>
        <falseanswernote>prt2-2-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>2</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans4</sans>
        <tans>ta4</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.2500000</truescore>
        <truepenalty/>
        <truenextnode>3</truenextnode>
        <trueanswernote>prt2-3-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>3</falsenextnode>
        <falseanswernote>prt2-3-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>3</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans5</sans>
        <tans>mcq_correct(ta5)[1]</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.2500000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt2-4-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt2-4-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt3</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans6</sans>
        <tans>ta6</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt3-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt3-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta1</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta2</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>ta3</value>
      </testinput>
      <testinput>
        <name>ans4</name>
        <value>ta4</value>
      </testinput>
      <testinput>
        <name>ans5</name>
        <value>mcq_correct(ta5)[1]</value>
      </testinput>
      <testinput>
        <name>ans6</name>
        <value>ta6</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-4-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt3</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt3-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta1+1</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta2+1</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>ta3+1</value>
      </testinput>
      <testinput>
        <name>ans4</name>
        <value>ta4+1</value>
      </testinput>
      <testinput>
        <name>ans5</name>
        <value>mcq_incorrect(ta5)[1]</value>
      </testinput>
      <testinput>
        <name>ans6</name>
        <value>ta6+1</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt2-4-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt3</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt3-1-F</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>3</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value/>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta2</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value/>
      </testinput>
      <testinput>
        <name>ans4</name>
        <value/>
      </testinput>
      <testinput>
        <name>ans5</name>
        <value>mcq_correct(ta5)[1]</value>
      </testinput>
      <testinput>
        <name>ans6</name>
        <value/>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
      <expected>
        <name>prt3</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
