<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>6.2.4.4 Express exp in terms of coth (exercise 2(b))</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p class="HELM_exercise">Exercise<br></p>
<p>Express the following in terms of \(\coth({@aa@}{@xx@})\).</p>
<p>\(&nbsp; \dfrac{{@uu@} e^{{@aa@}{@xx@}}} {{@vv@} e^{{@aa@}{@xx@}} - {@vv@} e^{-{@aa@}{@xx@}}} = \) [[input:ans1]] [[validation:ans1]]</p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>It will be worth keeping in mind that \(\coth(z)=\dfrac{\cosh(z)}{\sinh(z)}\). We start by rewriting the expression in terms of \(\sinh({@aa@}{@xx@})\) and \(\cosh({@aa@}{@xx@})\) as at least these are more like the expression we are targeting. For the numerator we use \[e^z=\cosh(z)+\sinh(z)\] while for denominator we can notice that this is already quite close to \(\sinh({@aa@}{@xx@})\) indeed \[ \sinh({@aa@}{@xx@})=\frac{e^{{@aa@}{@xx@}}-e^{-{@aa@}{@xx@}}}{2}.\]</p><p>Note that instead of spotting this we could just write each \(e^z=\cosh(z)+\sinh(z)\), there would be some cancelation after using the even / odd properties of \(\cosh(z)\) and \(\sinh(z)\). The result is of course the same. It's good exercise to confirm.</p><p>In any case, we can bring this together and simplify to see</p><p><span style="font-size: 0.9375rem;">\[\dfrac{{@uu@} e^{{@aa@}{@xx@}}} {{@vv@} e^{{@aa@}{@xx@}} - {@vv@} e^{-{@aa@}{@xx@}}} = \dfrac{{@uu@}(\cosh({@aa@}{@xx@}) + \sinh({@aa@}{@xx@}))}{{@2*vv@} \sinh({@aa@}{@xx@})} = \dfrac{{@uu@}}{{@2*vv@}} \cdot \frac{\cosh({@aa@}{@xx@})}{\sinh({@aa@}{@xx@})} + \dfrac{{@uu@}}{{@2*vv@}}  = {@ta@}. \]</span><br></p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020120600</text>
    </stackversion>
    <questionvariables>
      <text>aa: rand(6)+2;
uu: rand([3,5,7]);
vv: rand([2,4,8]);
xx: rand([x,y,z,t]);
exp: cosh(aa*xx) + sinh(aa*xx);
expn: cosh(aa*xx) - sinh(aa*xx);
nn: uu*exp(aa*xx); 
dd: vv*exp(aa*xx) - vv*expn(aa*xx);
ta: (uu/(2*vv))*coth(aa*xx) + uu/(2*vv);
ta1: factor(ta);
ta2: uu*(coth(aa*xx)/(2*vv) + 1/(2*vv));</text>
    </questionvariables>
    <specificfeedback format="html">
      <text>[[feedback:prt1]]</text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>\( \frac{{@uu@} e^{{@aa@}{@xx@}}} {{@2*vv@} e^{{@aa@}{@xx@}} - {@vv@} e^{-{@aa@}{@xx@}}} = {@ta@} \)</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>algebraic</type>
      <tans>ta</tans>
      <boxsize>25</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords>e,sinh,cosh,[[BASIC-ALGEBRA]]</forbidwords>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>1</requirelowestterms>
      <checkanswertype>1</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>1</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>EqualComAss</answertest>
        <sans>ans1</sans>
        <tans>ta</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>
      <node>
        <name>1</name>
        <description/>
        <answertest>EqualComAss</answertest>
        <sans>ans1</sans>
        <tans>ta1</tans>
        <testoptions>coth(aa*xx)</testoptions>
        <quiet>1</quiet>
        <truescoremode>+</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-2-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>2</falsenextnode>
        <falseanswernote>prt1-2-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>2</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans1</sans>
        <tans>ta2</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-3-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-3-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>1661422740</deployedseed>
    <deployedseed>1369725300</deployedseed>
    <deployedseed>827831590</deployedseed>
    <deployedseed>1998631485</deployedseed>
    <deployedseed>161896063</deployedseed>
    <deployedseed>1045713347</deployedseed>
    <deployedseed>1249745547</deployedseed>
    <deployedseed>1661989766</deployedseed>
    <deployedseed>481623722</deployedseed>
    <deployedseed>1898850484</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ev(ta+1, simp)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-3-F</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>3</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta1</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-2-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>4</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta2</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-3-T</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
