<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>2.2.1.7 Domain, Range and Graph of function 3</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p class="HELM_exercise">Exercise</p>
<p>Consider the function given by \(\displaystyle{h(t) = {@f@}},\)</p>
<ol class="HELM_parts">

<li><p>State the domain of the function. Give your answer as an inequality in \(t\), e.g. "\( \alpha \leq t\) and \(t \leq \beta\)". Remember 'and' here is a logical 'and', so your answer is only true when both inequalities are true. [[input:ans2]] [[validation:ans2]][[feedback:prt2]]</p></li>
<li>
<p>What is the shape of the function \( \displaystyle{h(t) = {@f@}} \)?</p><p>[[input:ans1]] [[validation:ans1]][[feedback:prt1]]<br></p>
<p>Choose from the graphs below:</p><ul> </ul>
<table>
  <tbody><tr>
    <td style="text-align: center;"><b>Graph A</b></td>
    <td style="text-align: center;"><b>Graph B</b></td>
  </tr>
  <tr>
    <td style="text-align: center;">{@thumbnailplot(funcstoplot[1],"Graph A")@}</td>
    <td style="text-align: center;">{@thumbnailplot(funcstoplot[2],"Graph B")@}</td>
  </tr><tr>
    <td style="text-align: center;">&nbsp;</td>
    <td style="text-align: center;">&nbsp;</td>
  </tr><tr>
    <td style="text-align: center;">&nbsp;<b>Graph C</b></td>
    <td style="text-align: center;"><b>Graph D</b></td>
  </tr><tr>
    <td style="text-align: center;">&nbsp;{@thumbnailplot(funcstoplot[3],"Graph C")@}</td>
    <td style="text-align: center;">{@thumbnailplot(funcstoplot[4],"Graph D")@}&nbsp;</td>
  </tr>
  
  
</tbody></table></li>
</ol>
<p><br></p><p><br></p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<ol class="HELM_parts">
    <li>
        <p>The function \( h(t) = \displaystyle {@f@}\) cannot take the value of \(t\) for which the denominator is \(0\).</p>
      <p>When \(t = {@undefined@}\) , \(h({@undefined@})=\frac{@e@}{0}\) which is undefined, hence the domain is \(t &lt; {@undefined@}\) and \(t &gt;
            {@undefined@}\).</p>
    </li>
    <li>
        <p>To find the graph of \(h(t) = \displaystyle {@f@}\), you plot the \(t\) and \(h(t)\) points on a graph and pick the graph that is close to your sketch.</p>
    </li>
</ol>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2021072200</text>
    </stackversion>
    <questionvariables>
      <text><![CDATA[a: rand(5)+2;
b:rand_with_prohib(1,3*a,[e])
e:rand_with_prohib(-5,7,[0])
f: expand(e/(a*t+b))
f1: fullratsimp(f)
f(t):=e/(a*t +b)
fadd(t):=(e/(a*t +b+1))+e
/* domain of function*/
undefined: -b/a;
ta2: t<undefined nounor t> undefined;


max: fadd(undefined);
min: f(a/3);

c_funcs: [f];
w_funcs: [-f, f-max, -f+max];
/* Choose functions to plot */
funcs: append(c_funcs, rand_selection(w_funcs,3)) 
/* permute the graphs but keep note of which ones are right! */
reordering:random_permutation([1,2,3,4]);
fntoletter:zip_with("[",reordering,[A,B,C,D]);
/* apply the reordering to produce the shuffled list of options */
funcstoplot: makelist(funcs[reordering[i]],i,1,4);
corr:maplist(lambda([ex],assoc(ex,fntoletter)), [1,2,3,4]);
ta1:maplist(lambda([ex],[ex, is(ex=assoc(1,fntoletter))]), [A,B,C,D]);
thumbnailplot:lambda([ex1,ex2],plot(ex1,[t,-5,5],[y,-30, 30],[box, false],[yx_ratio, 0.7],[xtics, -5, 1, 5],[ytics, -30, 15, 30],[axes, solid],[size,240,240],[plottags,false],[alt,ex2]));]]></text>
    </questionvariables>
    <specificfeedback format="moodle_auto_format">
      <text/>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>The domain of {@f@} is {@ta2@} and the multiple-choice of graphs are {@funcstoplot@}.</text>
    </questionnote>
    <questiondescription format="moodle_auto_format">
      <text/>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <prtcorrect format="html">
      <text>Correct answer, well done.</text>
    </prtcorrect>
    <prtpartiallycorrect format="html">
      <text>Your answer is partially correct.</text>
    </prtpartiallycorrect>
    <prtincorrect format="html">
      <text>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>dropdown</type>
      <tans>ta1</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>1</requirelowestterms>
      <checkanswertype>1</checkanswertype>
      <mustverify>0</mustverify>
      <showvalidation>0</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans2</name>
      <type>algebraic</type>
      <tans>ta2</tans>
      <boxsize>15</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>corr[1]</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty>0</truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-0-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty>0.1</falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-0-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>
    <deployedseed>1454511167</deployedseed>
    <deployedseed>982713202</deployedseed>
    <deployedseed>1971711669</deployedseed>
    <deployedseed>1068413319</deployedseed>
    <deployedseed>553308199</deployedseed>
    <deployedseed>737875479</deployedseed>
    <deployedseed>901142353</deployedseed>
    <deployedseed>1204100150</deployedseed>
    <deployedseed>1873203015</deployedseed>
    <deployedseed>630298183</deployedseed>
    <deployedseed>820018902</deployedseed>
    <deployedseed>2061735575</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>corr[1]</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta2</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-0-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt2-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>corr[2]</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta2-1</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-0-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt2-1-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
