<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>HELM 32.2 E5 Performing a Runge-Kutta Time Step</text>
    </name>
    <questiontext format="markdown">
      <text>**32.2 E5 Performing a Runge-Kutta Time Step**

Suppose that \\\(y=y(t)\\\) is the solution to the initial value problem 
 
\\\[ \displaystyle {@'diff(y,t)=1/y^2@},\quad y(0)=2\\\]

Carry out one time step of the Runge-Kutta method RK4 with a step size of {@'h=h@} so as to obtain an approximation to {@y(h)@}.

\\\({@'y(h)@}\approx\\\) [[input:S_y1]] [[validation:S_y1]] [[feedback:y1]]</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[f(t,y):= 1/(y^2);
h: 0.4;
y0: 2;
k1: f(0,y0);
k2: f(h/2,y0+(h/2)*k1);
k3: f(h/2,y0+h/2*k2);
k4: f(h, y0+h*k3);
y1: y0+h/6*(k1+2*k2+2*k3+k4);

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_y1</name>
      <type>numerical</type>
      <tans>y1</tans>
      <boxsize>8</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint>5 s.f.</syntaxhint>
      <syntaxattribute>1</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <prt>
      <name>y1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>2</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>NumRelative</answertest>
        <sans>S_y1</sans>
        <tans>y1</tans>
        <testoptions>5.0e-5</testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>yn2-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>yn2-1-F</falseanswernote>
        <falsefeedback format="html">
          <text>{@fb_unit(S_y1,y1,5.0e-5)@}</text>
        </falsefeedback>
      </node>
    </prt>
    <qtest>
      <testcase>1</testcase>
      <description>Test case assuming the teacher's input gets full marks.</description>
      <testinput>
        <name>S_y1</name>
        <value>y1</value>
      </testinput>
      <expected>
        <name>y1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>yn2-1-T</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
