<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>12.1.3.3 The tangent line to a curve: sinusoid</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p class="HELM_exercise">Exercise</p>
<p>In this exercise we will approximate the equation of the tangent line to the curve \(y = {@y1@}\) at the point \(x = \displaystyle {@p1@}\) and find where this line intersects the \(x\)-axis. Note that the following figure is for illustration only and
    the gradient can be either positive or negative:</p>
<figure class="HELM_figure"><img src="@@PLUGINFILE@@/12-1-T3.svg" alt="graph of sin(x)" class="img-responsive atto_image_button_text-bottom" width="500" height="247"></figure>
<ol class="HELM_parts">
    <li>
        We first specify \(x_0\) and \(f(x_0)\) from the information above:
        <p> \(x_0 =\) [[input:ans6]] [[validation:ans6]][[feedback:prt6]]</p>
        <p> \(f(x_0) =\) [[input:ans7]] [[validation:ans7]][[feedback:prt7]]</p>
    </li>
    <li> We now obtain the values of the slope of the tangent at \(x_0\), i.e., \(m=\dfrac{df}{dx}\bigg|_{x_0}\) and the \(y\)-intercept \(f(x_0) - mx_0\). <b>Give your answers correct to \(2\) decimal places</b>
        <p> \(\dfrac{df}{dx}\bigg|_{x_0}=\)[[input:ans8]] [[validation:ans8]][[feedback:prt8]]</p>
        <p> \(f(x_0) - mx_0=\) [[input:ans9]] [[validation:ans9]][[feedback:prt9]]</p>
    </li>
    <li>Use these approximate values to obtain an equation approximating the tangent line:
        <p> \(y=\) [[input:ans10]] [[validation:ans10]][[feedback:prt10]]</p>
    </li>
    <li> Where does this line intersect the \(x\)-axis?
        <p> \(x=\) [[input:ans11]] [[validation:ans11]][[feedback:prt11]] </p>
    </li>
</ol>]]></text>
<file name="12-1-T3.svg" path="/" encoding="base64">[encoded data, 45780 characters]</file>
<file name="12.1 fig2 sinusoid.png" path="/" encoding="base64">[encoded data, 70204 characters]</file>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>We are asked to find the equation of the tangent line to the curve \(y = {@y1@}\) at the point \(x = \displaystyle {@p1@}.\)</p>
<ol class="HELM_parts">
<li><p>First we specify that</p>
<p style="text-align:center;">\(\displaystyle x_0 = {@ta6@}\)   and   \(\displaystyle f(x_0) = {@ta7@}.\)</p></li>
<li><p>Then we obtain the values of \(\dfrac{df}{ dx} \bigg|_{ x_0}\) and \(f(x_0) - mx_0\). We have \(\dfrac{df}{dx} = {@b@}\cos({@b@}x)\), and therefore \[\frac{df}{dx} \bigg|_{@p1@} = {@b@}\cos\left({@b*p1@}\right) = {@m_val@}={@ta8@} ,\] and
</p>
<p style="text-align:center;">
    \(\displaystyle f\left({@p1@}\right) - \left({@m_val@}\right) \cdot {@p1@} = {@ta9@} \) to 2 d.p. </p></li>
<li><p>Hence we obtain the equation of the tangent line:</p>
  <p style="text-align:center;">\(\displaystyle y = {@ta8@}x + {@ta9@}\) to 2 d.p. </p></li>
<li><p> When \(y = 0\), we have</p>
<p style="text-align:center;">\({@ta8@}x + {@ta9@} = 0\) and then \(x = {@ta11@}\) to 2 d.p.</p></li>
</ol>
<p>&nbsp;</p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020120600</text>
    </stackversion>
    <questionvariables>
      <text>b:rand([3,4,5,6]);
a2:rand([2/(3*b),3/(4*b),4/(5*b),3/(5*b)]);
y1: sin(b*x);           /* curve */
p1: pi/a2;               /* point on curve */
ta6: p1;                  /* x_0 value */
ta7:sin(b*ta6);       /* f(x_0) value */
m_val: b*cos(b*ta6);       /*slope of tangent line */
ta8:decimalplaces(m_val, 2);
yy: sin(b*ta6) - ta6*b*cos(b*ta6);
ta9: decimalplaces(yy, 2) 
ta10: ta8*x + ta9;
ta11: decimalplaces(-ta9/ta8, 2);</text>
    </questionvariables>
    <specificfeedback format="html">
      <text/>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>\( y= {@y1@}, \, x_0= {@p1@},\, f(x_0)= {@ta7@}, m={@ta8@}, \, c= {@ta9@} \)</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>ans10</name>
      <type>algebraic</type>
      <tans>ta10</tans>
      <boxsize>8</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans11</name>
      <type>algebraic</type>
      <tans>ta11</tans>
      <boxsize>8</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans6</name>
      <type>algebraic</type>
      <tans>ta6</tans>
      <boxsize>8</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>ans7</name>
      <type>algebraic</type>
      <tans>ta7</tans>
      <boxsize>8</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>ans8</name>
      <type>numerical</type>
      <tans>dispdp(ta8,2)</tans>
      <boxsize>8</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options>mindp:1</options>
    </input>
    <input>
      <name>ans9</name>
      <type>numerical</type>
      <tans>dispdp(ta9,2)</tans>
      <boxsize>8</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <prt>
      <name>prt10</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans10</sans>
        <tans>ta10</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt10-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt10-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt11</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans11</sans>
        <tans>ta11</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt11-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt11-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt6</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>prt6-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt6-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt7</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans7</sans>
        <tans>ta7</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt7-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt7-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt8</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>NumDecPlaces</answertest>
        <sans>ans8</sans>
        <tans>ta8</tans>
        <testoptions>2</testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt8-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt8-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt9</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>NumDecPlaces</answertest>
        <sans>ans9</sans>
        <tans>ta9</tans>
        <testoptions>2</testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt9-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt9-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>1962347077</deployedseed>
    <deployedseed>1246217172</deployedseed>
    <deployedseed>1584733289</deployedseed>
    <deployedseed>1573308046</deployedseed>
    <deployedseed>244112409</deployedseed>
    <deployedseed>1985593242</deployedseed>
    <deployedseed>2140572732</deployedseed>
    <deployedseed>418987234</deployedseed>
    <deployedseed>131917418</deployedseed>
    <deployedseed>613692201</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans10</name>
        <value>ta10</value>
      </testinput>
      <testinput>
        <name>ans11</name>
        <value>ta11</value>
      </testinput>
      <testinput>
        <name>ans6</name>
        <value>ta6</value>
      </testinput>
      <testinput>
        <name>ans7</name>
        <value>ta7</value>
      </testinput>
      <testinput>
        <name>ans8</name>
        <value>dispdp(ta8,2)</value>
      </testinput>
      <testinput>
        <name>ans9</name>
        <value>dispdp(ta9,2)</value>
      </testinput>
      <expected>
        <name>prt10</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt10-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt11</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt11-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt6</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt6-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt7</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt7-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt8</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt8-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt9</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt9-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans10</name>
        <value>ev(ta10+1,simp)</value>
      </testinput>
      <testinput>
        <name>ans11</name>
        <value>ev(ta11+1,simp)</value>
      </testinput>
      <testinput>
        <name>ans6</name>
        <value>ev(ta6+1,simp)</value>
      </testinput>
      <testinput>
        <name>ans7</name>
        <value>ev(ta7+1,simp)</value>
      </testinput>
      <testinput>
        <name>ans8</name>
        <value>ev(dispdp(ta8,2)+1,simp)</value>
      </testinput>
      <testinput>
        <name>ans9</name>
        <value>ev(dispdp(ta9,2)+1,simp)</value>
      </testinput>
      <expected>
        <name>prt10</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt10-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt11</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt11-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt6</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt6-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt7</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt7-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt8</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt8-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt9</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt9-1-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
