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

<ol class="HELM_parts">
    Use the definition of the derivative to find \( \dfrac{df}{dx}\) when:
    <p></p>
    <li>
        <p></p>
        <p></p>
        \( f(x) = {@f1(x)@} \)
        <p></p>
        <p></p>
        <p> \( \dfrac{df}{dx} \) = [[input:ans1]] [[validation:ans1]][[feedback:prt1]]
        </p>

    </li>
    <li>
        \( f(x) = {@f2(x)@} \)
        <p></p>
        <p> \( \dfrac{df}{dx} \) = [[input:ans2]] [[validation:ans2]][[feedback:prt2]]
        </p>

    </li>
    <li>
        <p></p>
        <p></p>
        \( f(x) = {@f3(x)@} \)
        <p></p>
        <p></p>
        <p> \( \dfrac{df}{dx} \) = [[input:ans3]] [[validation:ans3]][[feedback:prt3]]
        </p>

    </li>
    <li>
        <p></p>
        <p></p>
        \( f(x) = \displaystyle {@f4(x)@} \)
        <p></p>
        <p></p>
        <p> \( \dfrac{df}{dx} \) = [[input:ans4]] [[validation:ans4]][[feedback:prt4]]
        </p>

    </li>
    <li>
        <p></p>
        <p></p>
        \( f(x) = {@f5(x)@} \)
        <p></p>
        <p></p>
        <p> \( \dfrac{df}{dx} \) = [[input:ans5]]
        </p>
        <p>Use the small angle approximation \( \sin \theta \approx \theta \) if \(\theta\) is small and measured in radians. [[validation:ans5]][[feedback:prt5]]&nbsp;
        </p>
    </li>
</ol>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<ol class="HELM_parts">
    <li>
        We have
<br>&nbsp;\(\begin{align} \dfrac{df}{dx} &amp;= \lim_{h \to 0} \left\{ \dfrac{ f(x+h) - f(x)}{ h } \right\} \\ &amp;= \lim_{h \to 0} \left\{ \dfrac{ {@f1(x+h)@} - {@f1(x)@}}{ h } \right\} \\ &amp;= \lim_{h \to 0} \left\{ \dfrac{ {@expand(f1(x+h))@} - {@f1(x)@}}{
        h } \right\} \\ &amp;= \lim_{h \to 0} \left\{ \dfrac{ {@a2@} }{ h } \right\} \\ &amp;= \lim_{h \to 0} \left\{ {@a3@} \right\} \\ &amp;= {@ta1@} \end{align}\)</li>
    <li>
We have
<br>&nbsp;\(\begin{align} \dfrac{df}{dx} &amp;= \lim_{h \to 0} \left\{ \dfrac{ f(x+h) - f(x)}{ h } \right\} \\ &amp;= \lim_{h \to 0} \left\{ \dfrac{ {@f2(x+h)@} - {@f2(x)@}}{ h } \right\} \\ &amp;= \lim_{h \to 0} \left\{ \dfrac{ {@expand(f2(x+h))@} - {@f2(x)@}}{ h } \right\} \\ &amp;= \lim_{h \to 0} \left\{ \dfrac{ {@b2@} }{ h } \right\} \\ &amp;= \lim_{h \to 0} \left\{ {@b3@} \right\} \\ &amp;= {@ta2@} \end{align}\)
    </li>
    <li>
We have
<br>&nbsp;\(\begin{align} \dfrac{df}{dx} &amp;= \lim_{h \to 0} \left\{ \dfrac{ f(x+h) - f(x)}{ h } \right\} \\ &amp;= \lim_{h \to 0} \left\{ \dfrac{ {@f3(x+h)@} - {@f3(x)@}}{ h } \right\} \\ &amp;= \lim_{h \to 0} \left\{ \dfrac{ {@expand(f3(x+h))@} - {@f3(x)@}}{ h } \right\} \\ &amp;= \lim_{h \to 0} \left\{ \dfrac{ {@c2@} }{ h } \right\} \\ &amp;= \lim_{h \to 0} \left\{ {@c3@} \right\} \\ &amp;= {@ta3@} \end{align}\)
    </li>
    <li>
We have
<br>&nbsp;\(\begin{align} \dfrac{df}{dx} &amp;= \lim_{h \to 0} \left\{ \dfrac{ f(x+h) - f(x)}{ h } \right\} \\ &amp;= \lim_{h \to 0} \left\{ \dfrac{ {@f4(x+h)@} - {@f4(x)@}}{ h } \right\} \\ &amp;= \lim_{h \to 0} \left\{ {@d3@} \right\} \\ &amp;= {@ta4@} \end{align}\)
    </li>
    <li>
We have&nbsp;<br>&nbsp;\(\begin{align} \dfrac{df}{dx} &amp;= \lim_{h \to 0} \left\{ \dfrac{ f(x+h) - f(x)}{ h } \right\} \\ &amp;= \lim_{h \to 0} \left\{ \dfrac{ {@f5(x+h)@} - {@f5(x)@}}{ h } \right\} \\ \end{align}\)

<br>We now use the trigonometric identity <br>\[ \sin(A)−\sin(B)=2 \cos\left(\dfrac{A+B}{2}\right) \sin\left(\dfrac{A−B}{2}\right). \] <br>On setting \(A = x+h\) and \(B=x\) we have <br>&nbsp;\(\begin{align} \lim_{h \to 0} \left\{ \dfrac{ {@f5(x+h)@} - {@f5(x)@} }{ h } \right\} &amp;= \lim_{h \to 0} \left\{ \dfrac{ 2 \cos \left( \dfrac{x + h + x}{2} \right) \sin \left( \dfrac{x + h - x}{2} \right) }{h} \right\} \\ &amp;= \lim_{h \to 0} \left\{ \dfrac{ 2 \cos \left( \dfrac{2x + h }{2} \right) \sin \left( \dfrac{h}{2} \right) }{h} \right\} \\ &amp;= \lim_{h \to 0} \left\{ \dfrac{ 2 \cos \left( \dfrac{2x + h }{2} \right) \dfrac{h}{2} }{h} \right\} \end{align}\) <br>by using the small angle approximation, \( \sin \left( \dfrac{h}{2} \right) \approx \dfrac{h}{2} \). Finally, <br>\(\begin{align} \lim_{h \to 0} \left\{ \dfrac{ 2 \cos \left( \dfrac{2x + h }{2} \right) \dfrac{h}{2} }{h} \right\} &amp;= \lim_{h \to 0} \left\{ \dfrac{ 2 \cos \left( \dfrac{2x + h }{2} \right) }{2} \right\} \\ &amp;=\lim_{h \to 0} \left\{ \cos \left( \dfrac{2x + h }{2} \right) \right\} \\ &amp;= \cos(x) \end{align}\)</li>
</ol>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020120600</text>
    </stackversion>
    <questionvariables>
      <text>a1: rand([2,3,4,5]);
f1(x):=a1*x^2;
a2: expand(f1(x+h)) - f1(x);
a3: simplify(a2/h);
ta1:diff(f1(x),x);

b:rand([2,3,4]);
f2(x):=b*x^3;
b2: expand(f2(x+h)) - f2(x);
b3: simplify(b2/h);
ta2:diff(f2(x),x);

ca:rand([6,7,8]);
cb:rand([3,4,5,6]);
f3(x):=ca*x + cb;
c2: expand(f3(x+h)) - f3(x);
c3: simplify(c2/h);
ta3:diff(f3(x),x);

d1:rand([1]);
f4(x):=d1/x;
d2: expand(f4(x+h)) - f4(x);
d3: simplify(d2/h);
ta4:diff(f4(x),x);

f5(x):=sin(x);
ta5:diff(f5(x),x);</text>
    </questionvariables>
    <specificfeedback format="html">
      <text/>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>\[y= {@f1(x)@} \rightarrow y' = {@ta1@}, \quad y={@f2(x)@} \rightarrow y'={@ta2@}, \quad y={@f3(x)@} \rightarrow y'={@ta3@} \]
\[ y={@f4(x)@} \rightarrow y'={@ta4@}, \quad y={@f5(x)@} \rightarrow y'={@ta5@} \]</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>ta1</tans>
      <boxsize>4</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords>diff</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>diff</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>6</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords>diff</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>6</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords>diff</forbidwords>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans5</name>
      <type>algebraic</type>
      <tans>ta5</tans>
      <boxsize>6</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords>diff</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>Diff</answertest>
        <sans>ans1</sans>
        <tans>ta1</tans>
        <testoptions>x</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>1.0000000</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>
    </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>ans3</sans>
        <tans>ta3</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>
    <prt>
      <name>prt4</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans4</sans>
        <tans>ta4</tans>
        <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>
    <prt>
      <name>prt5</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans5</sans>
        <tans>ta5</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt5-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt5-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>867377300</deployedseed>
    <deployedseed>1225449357</deployedseed>
    <deployedseed>499458877</deployedseed>
    <deployedseed>2134512923</deployedseed>
    <deployedseed>1204641410</deployedseed>
    <deployedseed>1356534604</deployedseed>
    <deployedseed>865722290</deployedseed>
    <deployedseed>1701587251</deployedseed>
    <deployedseed>1896902844</deployedseed>
    <deployedseed>1249906673</deployedseed>
    <deployedseed>708033166</deployedseed>
    <deployedseed>1389447944</deployedseed>
    <deployedseed>1401325268</deployedseed>
    <deployedseed>732316202</deployedseed>
    <deployedseed>1165767653</deployedseed>
    <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>ta5</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-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt3</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt3-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt4</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt4-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt5</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt5-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+2</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>ta5+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-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt3</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt3-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt4</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt4-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt5</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt5-1-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
