<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>13.6.5.2 Identities</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p class="HELM_exercise">Exercise</p>

<p>Use the identity \( \sin(A+B)+\sin(A-B)= 2\sin A \cos B \) to find the following integral:</p>
<p>\({\displaystyle\int {@exp4@} \,\mathrm{d}x}=\) [[input:ans4]] [[validation:ans4]] [[feedback:prt4]]</p>

<p>You will need to refer to a Table of Trigonometric Identities to answer this question.</p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>We can rewrite the given trigonometric identity as \[\sin A \cos B = \frac{\sin(A + B) + \sin(A - B)}{2}.\]</p>
<p>Using this, we can rewrite the integrand setting \(A = {@aa * x@}\) and \(B = {@bb * x@}\). Then we evaluate the integral referring to the table.
  \[\begin{aligned} \int {@exp4@} \,\mathrm{d}x &amp;= \int \left({@iexp@}\right) \,\mathrm{d}x \\
  &amp;= {@ta4@}.\end{aligned}\]
</p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020120600</text>
    </stackversion>
    <questionvariables>
      <text>/*Minimal randomisation used for identities*/
aa: rand([3, 5, 7, 9]); 
bb: rand([2, 4, 6, 8]);

exp4: sin(aa*x)*cos(bb*x); 
ta4: int(exp4, x) + c;

/* Needed for solution */
iexp: trigreduce(exp4);</text>
    </questionvariables>
    <specificfeedback format="html">
      <text/>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>\[  \int {@exp4@}\mathrm{d}x={@ta4@} \]</text>
    </questionnote>
    <questiondescription format="moodle_auto_format">
      <text/>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>1</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>ans4</name>
      <type>algebraic</type>
      <tans>ta4</tans>
      <boxsize>20</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>prt4</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>Int</answertest>
        <sans>ans4</sans>
        <tans>ta4</tans>
        <testoptions>x</testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt4-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt4-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>1024763884</deployedseed>
    <deployedseed>1390433546</deployedseed>
    <deployedseed>1394793454</deployedseed>
    <deployedseed>1026384303</deployedseed>
    <deployedseed>853158573</deployedseed>
    <deployedseed>1974358747</deployedseed>
    <deployedseed>142678923</deployedseed>
    <deployedseed>654719280</deployedseed>
    <deployedseed>385364952</deployedseed>
    <deployedseed>772974619</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans4</name>
        <value>ta4</value>
      </testinput>
      <expected>
        <name>prt4</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt4-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans4</name>
        <value>2*ta4</value>
      </testinput>
      <expected>
        <name>prt4</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt4-1-F</expectedanswernote>
      </expected>
    </qtest>
    <hint format="html">
      <text>(Hint: you need to simplify sin(t^3 + 1))</text>
    </hint>
  </question>
</quiz>
