<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>HELM 32.2 E1 Notation</text>
    </name>
    <questiontext format="markdown">
      <text><![CDATA[**32.2 E1 Notation**

The following equation characterizes a linear multistep method: 

\\\[\displaystyle y_{n+2}-y_{n+1}=\frac{h}{12}\left( 5f_{n+2}+8f_{n+1}-f_n\right)\\\]

Specify the parameters of this method according to the general scheme 

\\\[ \displaystyle \sum_{j=0}^{k}\alpha_{j}y_{n+j}=h\sum_{j=0}^{k}\beta_{j}f_{n+j} \\\]
<p hidden>\\\(\displaystyle {@lside=rside@}\\\)</p>

\\\(k=\\\) [[input:S_k]] [[validation:S_k]] [[feedback:k]]

Provide a comma-separated list with square brackets like <code>[1, 2, 3, 4]</code>.

\\\(\alpha_0,\alpha_1,\ldots=\\\) [[input:S_alpha]] [[validation:S_alpha]] [[feedback:alpha]]

\\\(\beta_0,\beta_1,\ldots=\\\) [[input:S_beta]] [[validation:S_beta]] [[feedback:beta]]]]></text>
    </questiontext>
    <generalfeedback format="markdown">
      <text/>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2024012900</text>
    </stackversion>
    <questionvariables>
      <text><![CDATA[k: 2;
alpha: [0,-1,1];
beta: [-1/12, 8/12, 5/12];
lside: sum(alpha[j+1]*'y['n+j], j, 0, k);
rside: sum(beta[j+1]*'f['n+j], j, 0, k);


stack_include("https://raw.githubusercontent.com/mkraska/meclib/main/Maxima/fb_value_EN.mac");]]></text>
    </questionvariables>
    <specificfeedback format="markdown">
      <text/>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text/>
    </questionnote>
    <questiondescription format="markdown">
      <text/>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <prtcorrect format="markdown">
      <text>Richtige Antwort, gut gemacht!</text>
    </prtcorrect>
    <prtpartiallycorrect format="markdown">
      <text>Ihre Antwort ist teilweise korrekt.</text>
    </prtpartiallycorrect>
    <prtincorrect format="markdown">
      <text>Falsche Antwort.</text>
    </prtincorrect>
    <decimals>.</decimals>
    <scientificnotation>*10</scientificnotation>
    <multiplicationsign>dot</multiplicationsign>
    <sqrtsign>1</sqrtsign>
    <complexno>i</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens/>
    <isbroken>0</isbroken>
    <variantsselectionseed/>
    <input>
      <name>S_alpha</name>
      <type>algebraic</type>
      <tans>alpha</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint>[alpha_0, alpha_1, ...]</syntaxhint>
      <syntaxattribute>1</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>S_beta</name>
      <type>algebraic</type>
      <tans>beta</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint>[beta_0, beta_1, ...]</syntaxhint>
      <syntaxattribute>1</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>S_k</name>
      <type>algebraic</type>
      <tans>k</tans>
      <boxsize>6</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint>Integer</syntaxhint>
      <syntaxattribute>1</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <prt>
      <name>alpha</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>2</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>S_alpha</sans>
        <tans>alpha</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>alpha-1-T</trueanswernote>
        <truefeedback format="markdown">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>alpha-1-F</falseanswernote>
        <falsefeedback format="markdown">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>beta</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>2</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>S_beta</sans>
        <tans>beta</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>beta-1-T</trueanswernote>
        <truefeedback format="markdown">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>beta-1-F</falseanswernote>
        <falsefeedback format="markdown">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>k</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>2</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>S_k</sans>
        <tans>k</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>k-1-T</trueanswernote>
        <truefeedback format="markdown">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>k-1-F</falseanswernote>
        <falsefeedback format="markdown">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <qtest>
      <testcase>1</testcase>
      <description>Test case assuming the teacher's input gets full marks.</description>
      <testinput>
        <name>S_alpha</name>
        <value>alpha</value>
      </testinput>
      <testinput>
        <name>S_beta</name>
        <value>beta</value>
      </testinput>
      <testinput>
        <name>S_k</name>
        <value>k</value>
      </testinput>
      <expected>
        <name>alpha</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>alpha-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>beta</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>beta-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>k</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>k-1-T</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
