// Numbas version: finer_feedback_settings {"name": "simon's copy of Find the value from the derivatives", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": [], "name": "simon's copy of Find the value from the derivatives", "tags": [], "preamble": {"css": "", "js": ""}, "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*}\\]

\n

into which we can then substitute $x = \\var{pointA}$ in order to find $p(\\var{pointA}) = \\var{valueA}$.

\n

If 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", "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "correctAnswerStyle": "plain"}], "extensions": [], "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": ""}, "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": ""}}, "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"}, "type": "question", "contributors": [{"name": "simon warwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1264/"}]}]}], "contributors": [{"name": "simon warwick", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1264/"}]}