<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>10.3.6 (Forming integrals to represent areas)</text>
    </name>
    <questiontext format="moodle_auto_format">
      <text><![CDATA[<p>Form the definite integral which gives the shaded area under the graph of \(y={@f@}\):</p>

<p style="text-align: center;"></p>
<div style="margin-left:4em;margin-right:auto;">[[jsxgraph width='250px' height='200px']] JXG.Options.axis.ticks.majorHeight = 10; JXG.Options.axis.ticks.insertTicks = false; JXG.Options.axis.ticks.ticksDistance = 200; JXG.Options.text.fontSize = 16; var board = JXG.JSXGraph.initBoard(divid, {boundingbox:
    {#BB#}, axis: true, showCopyright: false, showNavigation:false}); var f = board.jc.snippet('{#f#}', true, 'x', true); var ff = board.create('functiongraph', [f,{#BB[1]#},{#BB[3]#}],{strokeColor:'#003399',strokeWidth:2}); var i1 = board.create('integral',
    [{#[a,b]#}, ff], {fillColor:'#003399',fillOpacity:0.15}); i1.curveLeft.setAttribute({visible:false}); /* hide the gliders */ i1.curveRight.setAttribute({visible:false}); i1.label.setAttribute({visible:false}); var pta = board.create('point',{#A#},
    {name:'',size:2,fixed:true,strokeColor:'#003399',fillColor:'#003399', label: { offset: [0, {#-15*cy#}],anchorX: 'middle', anchorY: 'middle' }}); var ptb = board.create('point',{#B#}, {name:'',size:2,fixed:true,strokeColor:'#003399',fillColor:'#003399',
    label: { offset: [-10, 0],anchorX: 'right', anchorY: 'middle' }}); /* var ptc = board.create('point',{#C#}, {name:'',size:1,fixed:true,strokeColor:'#003399',fillColor:'#003399'});*/ var xaxis = board.create('axis', [[0,0],[1,0]]); board.create('ticks',
    [xaxis, {#[a,b]#}], {strokeColor: '#003399', majorHeight:15, drawLabels: true, label: { offset: [0, -10],anchorX: 'middle', anchorY: 'top' }}); var yaxis = board.create('axis', [[0,0],[0,1]]); board.create('ticks', [yaxis, {#[A[2],B[2]]#}], {strokeColor:
    '#003399', majorHeight:15, drawLabels: true, label: { offset: [-10, 0],anchorX: 'right', anchorY: 'middle' }}); [[/jsxgraph]]
</div>
<p></p>
\(\displaystyle\int_a^b \)&nbsp;[[input:ans1]]\(dx\) [[validation:ans1]]
<p></p>
\(a=\) [[input:ans2]][[validation:ans2]]
<p></p>
\(b=\) [[input:ans3]][[validation:ans3]]]]></text>
    </questiontext>
    <generalfeedback format="moodle_auto_format">
      <text><![CDATA[<p>The shaded area is given by&nbsp;\(\displaystyle\int_{@a@}^{@b@} {@f@}\,dx \).</p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020081700</text>
    </stackversion>
    <questionvariables>
      <text>tx:rand_range(-2,5);
ty:rand_range(0,4);
cx:rand_range(1,2);
cy:1;
T(x,y):=[cx*(x+tx),cy*(y+ty)];
TF(y):=expand(ev(T(0,y)[2],x=x/cx-tx));
fbase:(x+2)*(x^(2)+x)+1;
f:TF(fbase);
A:T(-2,1);
B:T(1,7);
a:A[1];
b:B[1];
ta1:f;
ta2:a;
ta3:b;

/*jsxgraph settings */
BBTL:T(-3,9);
BBBR:T(1.5,-1);
BBx:[BBTL[1],BBBR[1],-1,1];
BBy:[BBTL[2],BBBR[2]];
BBy:append(BBy,[-lmax(BBy)/6]);
BB:[lmin(BBx),lmax(BBy),lmax(BBx),lmin(BBy)];</text>
    </questionvariables>
    <specificfeedback format="html">
      <text>[[feedback:prt1]]</text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>\(\int_{@a@}^{@b@} {@f@}\)</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>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>5</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>ans2</name>
      <type>algebraic</type>
      <tans>ta2</tans>
      <boxsize>5</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>ans3</name>
      <type>algebraic</type>
      <tans>ta3</tans>
      <boxsize>5</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>prt1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans1</sans>
        <tans>ta1</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0.4000000</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>AlgEquiv</answertest>
        <sans>ans2</sans>
        <tans>ta2</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.3000000</truescore>
        <truepenalty/>
        <truenextnode>3</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>ans2</sans>
        <tans>A[2]</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.0000000</truescore>
        <truepenalty/>
        <truenextnode>3</truenextnode>
        <trueanswernote>prt1-3-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[<p>You have used the \(y\)-coordinate of the left end point, rather than the \(x\)-coordinate.</p>]]></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>3</falsenextnode>
        <falseanswernote>prt1-3-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>3</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans3</sans>
        <tans>ta3</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.3000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-4-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>4</falsenextnode>
        <falseanswernote>prt1-4-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>4</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans3</sans>
        <tans>B[2]</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-5-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[<p>You have used the \(y\)-coordinate of the right end point, rather than the \(x\)-coordinate.<br></p>]]></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-5-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>48953869</deployedseed>
    <deployedseed>1415355101</deployedseed>
    <deployedseed>1764086127</deployedseed>
    <deployedseed>694080671</deployedseed>
    <deployedseed>1552875614</deployedseed>
    <deployedseed>952133179</deployedseed>
    <deployedseed>231246712</deployedseed>
    <deployedseed>940648449</deployedseed>
    <deployedseed>2045952271</deployedseed>
    <deployedseed>830180600</deployedseed>
    <deployedseed>1981349137</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>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-4-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>y</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>A[2]</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>B[2]</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-5-T</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
