// Numbas version: finer_feedback_settings {"name": "test 1", "metadata": {"description": "", "licence": "None specified"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": [""], "variable_overrides": [[]], "questions": [{"name": "Ugur's copy of Find the value from the derivatives", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Philip Walker", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/362/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}], "functions": {}, "ungrouped_variables": [], "tags": [], "question_groups": [{"pickingStrategy": "all-ordered", "name": "", "questions": [], "pickQuestions": 0}], "type": "question", "advice": "
Having been given the derivatives at a point $a = \\var{pointQ}$, we can reconstruct the cubic function using Taylor's theorem: since
\n\\[\\begin{align*}p(x) &= \\sum_{i=0}^3 \\frac{p^{(i)}(a)}{i!} (x-a)^i \\\\ &= \\frac{\\var{derivs[0]}}{0!}(\\simplify{x-{pointQ}})^0 + \\frac{\\var{derivs[1]}}{1!} (\\simplify{x-{pointQ}})^1 + \\frac{\\var{derivs[2]}}{2!} (\\simplify{x-{pointQ}})^2 + \\frac{\\var{derivs[3]}}{3!} (\\simplify{x-{pointQ}})^3 \\\\ &= \\simplify[all,!collectNumbers,!noLeadingMinus]{{derivs[0]} + {derivs[1]} (x-{pointQ}) + {derivs[2]}/2 (x-{pointQ})^2 + {derivs[3]}/6 (x-{pointQ})^3},\\end{align*}\\]
\ninto which we can then substitute $x = \\var{pointA}$ in order to find $p(\\var{pointA}) = \\var{valueA}$.
\nIf you expanded the brackets to find the function in its simplest form, you should have obtained
\n\\[p(x) = \\simplify[all,!collectNumbers,!noLeadingMinus]{{coeffs[0]} + {coeffs[1]} x + {coeffs[2]} x^2 + {coeffs[3]} x^3}\\]
", "rulesets": {}, "parts": [{"prompt": "What is $p(\\var{pointA})$?
", "allowFractions": false, "variableReplacements": [], "maxValue": "valueA", "minValue": "valueA", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry"}], "statement": "I am thinking of a cubic function. Its derivatives at $a = \\var{pointQ}$ are the following:
\n\\[\\begin{align*} p(\\var{pointQ}) &= \\var{derivs[0]}; \\\\ p^{(1)}(\\var{pointQ}) &= \\var{derivs[1]}; \\\\ p^{(2)}(\\var{pointQ}) &= \\var{derivs[2]}; \\text{ and} \\\\ p^{(3)}(\\var{pointQ}) &= \\var{derivs[3]}. \\end{align*}\\]
", "variable_groups": [{"variables": ["coeffs"], "name": "Function"}, {"variables": ["pointA", "valueA"], "name": "Answer point"}, {"variables": ["pointQ", "derivs"], "name": "Question point"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"coeffs": {"definition": "repeat(random(-5..5 except 0),4)", "templateType": "anything", "group": "Function", "name": "coeffs", "description": ""}, "pointA": {"definition": "random(-5..5 except 0)", "templateType": "anything", "group": "Answer point", "name": "pointA", "description": ""}, "derivs": {"definition": "map(sum(map(fact(k)*coeffs[k]*pointQ^(k-s)/fact(k-s),k,s..length(coeffs)-1)),s,0..length(coeffs)-1)", "templateType": "anything", "group": "Question point", "name": "derivs", "description": ""}, "valueA": {"definition": "sum(map(coeffs[n]*pointA^n,n,0..length(coeffs)-1))", "templateType": "anything", "group": "Answer point", "name": "valueA", "description": ""}, "pointQ": {"definition": "random(-5..5 except [0,pointA])", "templateType": "anything", "group": "Question point", "name": "pointQ", "description": ""}}, "showQuestionGroupNames": false, "metadata": {"description": "Given the derivatives of a cubic function at a point, find the value of the function at another point.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": [], "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "inreview"}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "type": "exam", "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}], "extensions": [], "custom_part_types": [], "resources": []}