<?xml version="1.0" encoding="UTF-8"?>
<quiz>
<!-- question: 17337  -->
  <question type="stack">
    <name>
      <text>Assessing by mathematical properties</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<br>
<div class="stack-comment">
<h2>Multiple properties</h2>
<p>In this question STACK establishes multiple separate properties.  Here they are</p>
<ol>
<li><span style="font-size: 1em; line-height: 1.4;">Continuous at </span><em style="font-size: 1em; line-height: 1.4;">x=0</em></li>
<li><span style="font-size: 1em; line-height: 1.4;">Differentiable at </span><em style="font-size: 1em; line-height: 1.4;">x=0</em></li>
<li>Gradient is zero at <em>x=2.</em></li>
</ol>
<p>Typically, the answer to a mathematical question will need a number of separate things, e.g. equivalent to the correct answer, appropriate written form.  The teacher has to decide what these properties are, and design feedback if some, or all, are not satisfied.</p>
<p>The teacher can also choose to test for properties which arise as a result of common misconceptions.</p>
<p>Try <span style="font-family: 'courier new', courier, monospace; color: #0000ff;">(x-2)^2+1</span></p>
</div>
<br>

<p>Give an example of a function \(f(x)\) with a stationary point at \(x={@n@}\) and which is continuous but not differentiable at \(x=0\).</p>
<p>\(f(x)=\)[[input:ans1]]</p>
<div>[[validation:ans1]]</div>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>One way to construct such a function is to start with a continuous curve (the first property) with a stationary point at \(x={@n@}\) and then to "bend" the curve at the point at which we need differentiability to fail.  This can be done using the absolute value function \(|x|\).</p>
<p>We start with a quadratic with roots at \(x=0\) and \(x=2\times {@n@}\) which has a stationary point at the required \(x={@n@}\).  For example \(x(x-{@2*n@})\).  Now we can "bend" it with the absolute value function as follows:</p>
<p>\[ {@abs(x)*(x-2*n)@}\]</p>
<p>This is plotted below. {@plot(abs(x)*(x-2*n),[x,-2,2*(n+1)])@}</p>]]></text>
    </generalfeedback>
    <defaultgrade>3</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber></idnumber>
    <stackversion>
      <text>2025030700</text>
    </stackversion>
    <questionvariables>
      <text>n:2</text>
    </questionvariables>
    <specificfeedback format="html">
      <text><![CDATA[<p>[[feedback:prt1]]</p>]]></text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>Point = {@n@}.  Answer is {@abs(x)*(x-2*n)@}</text>
    </questionnote>
    <questiondescription format="moodle_auto_format">
      <text></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>
    <variantsselectionseed></variantsselectionseed>
    <input>
      <name>ans1</name>
      <type>algebraic</type>
      <tans>abs(x)*(x-2*n)</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint></syntaxhint>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords></forbidwords>
      <allowwords></allowwords>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>1</showvalidation>
      <options></options>
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text></text>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description></description>
        <answertest>AlgEquiv</answertest>
        <sans>subst(x=n,diff(ans1,x))</sans>
        <tans>0</tans>
        <testoptions></testoptions>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.34</truescore>
        <truepenalty></truepenalty>
        <truenextnode>1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text></text>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>1</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[<p>Your answer does not have a stationary point at \(x={@n@}\) but should do.</p>]]></text>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description></description>
        <answertest>AlgEquiv</answertest>
        <sans>continuousp(ans1,x,0)</sans>
        <tans>true</tans>
        <testoptions></testoptions>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.33</truescore>
        <truepenalty></truepenalty>
        <truenextnode>2</truenextnode>
        <trueanswernote>prt1-2-T</trueanswernote>
        <truefeedback format="html">
          <text></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-2-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[<p>Your answer fails to be continuous at \(x=0\) but should be.</p>]]></text>
        </falsefeedback>
      </node>
      <node>
        <name>2</name>
        <description></description>
        <answertest>AlgEquiv</answertest>
        <sans>diffp(ans1,x,0)</sans>
        <tans>false</tans>
        <testoptions></testoptions>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.33</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-3-T</trueanswernote>
        <truefeedback format="html">
          <text></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-3-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[<p>Your answer is differentiable at \(x=0\) but should not be!  You were asked for a non-differentiable function at \(x=0\).  Consider using \(|x|\), which is entered as <span style="font-family: 'courier new', courier, monospace;">abs(x)</span> somewhere in your answer.</p>]]></text>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>47</deployedseed>
    <deployedseed>1210578137</deployedseed>
    <deployedseed>2053256376</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description></description>
      <testinput>
        <name>ans1</name>
        <value>abs(x)*(2*n-x)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-3-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description></description>
      <testinput>
        <name>ans1</name>
        <value>x*(x-2*n)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.6700000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-3-F</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>3</testcase>
      <description></description>
      <testinput>
        <name>ans1</name>
        <value>x^2-n*x</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.3300000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-3-F</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>4</testcase>
      <description></description>
      <testinput>
        <name>ans1</name>
        <value>abs(x)/x*(x*(x-2*n)+2)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.3400000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-2-F</expectedanswernote>
      </expected>
    </qtest>
  </question>

</quiz>