// Numbas version: finer_feedback_settings {"name": "Morten's copy of Numbas demo: JME part", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"scripts": {}, "steps": [{"showCorrectAnswer": true, "scripts": {}, "type": "information", "variableReplacementStrategy": "originalfirst", "marks": 0, "variableReplacements": [], "prompt": "
The derivative of $x^n$ is given by the following:
\n\\[ \\frac{\\mathrm{d}}{\\mathrm{d}x}(x^n) = n \\times x^{n-1} \\]
\nEnter the derivatives of each of the three terms in $f(x)$:
"}, {"expectedvariablenames": [], "checkvariablenames": false, "showpreview": true, "variableReplacementStrategy": "originalfirst", "marks": 1, "variableReplacements": [], "prompt": "$\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[2]}*x^{powers[2]}}) =$
", "checkingtype": "absdiff", "scripts": {}, "type": "jme", "vsetrangepoints": 5, "showCorrectAnswer": true, "answer": "{coefficients[2]*powers[2]}*x^{powers[2]-1}", "vsetrange": [0, 1], "checkingaccuracy": 0.001}, {"expectedvariablenames": [], "checkvariablenames": false, "showpreview": true, "variableReplacementStrategy": "originalfirst", "marks": 1, "variableReplacements": [], "prompt": "$\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[1]}*x^{powers[1]}}) =$
", "checkingtype": "absdiff", "scripts": {}, "type": "jme", "vsetrangepoints": 5, "showCorrectAnswer": true, "answer": "{coefficients[1]*powers[1]}*x^{powers[1]-1}", "vsetrange": [0, 1], "checkingaccuracy": 0.001}, {"expectedvariablenames": [], "checkvariablenames": false, "showpreview": true, "variableReplacementStrategy": "originalfirst", "marks": 1, "variableReplacements": [], "prompt": "$\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[0]}*x^{powers[0]}}) =$
", "checkingtype": "absdiff", "scripts": {}, "type": "jme", "vsetrangepoints": 5, "showCorrectAnswer": true, "answer": "{coefficients[0]*powers[0]}*x^{powers[0]-1}", "vsetrange": [0, 1], "checkingaccuracy": 0.001}], "type": "gapfill", "stepsPenalty": "1", "variableReplacementStrategy": "originalfirst", "gaps": [{"checkvariablenames": false, "showpreview": true, "variableReplacementStrategy": "originalfirst", "marks": "4", "variableReplacements": [], "checkingtype": "absdiff", "scripts": {}, "type": "jme", "vsetrangepoints": 5, "showCorrectAnswer": true, "answer": "{coefficients[2]*powers[2]}*x^{powers[2]-1} + {coefficients[1]*powers[1]}*x^{powers[1]-1} + {coefficients[0]*powers[0]}*x^{powers[0]-1}", "vsetrange": [0, 1], "expectedvariablenames": [], "checkingaccuracy": 0.001}], "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "prompt": "Differentiate the following function.
\n\\[ f(x) = \\simplify[all,!noLeadingMinus]{ {coefficients[2]}*x^{powers[2]} + {coefficients[1]}*x^{powers[1]} + {coefficients[0]}*x^{powers[0]} } \\]
\n$\\frac{\\mathrm{d}f}{\\mathrm{d}x} = $ [[0]]
"}], "variablesTest": {"condition": "", "maxRuns": 100}, "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["num_terms", "powers", "coefficients"], "advice": "The derivative of $x^n$ is given by the following:
\n\\[ \\frac{\\mathrm{d}}{\\mathrm{d}x}(x^n) = n \\times x^{n-1} \\]
\nWe can compute the derivative of $f(x)$ by computing the derivatives of each of the three terms, and then adding them together.
\n\\begin{align}
\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[2]}*x^{powers[2]}}) &= \\simplify[basic]{{powers[2]}*{coefficients[2]}*x^({powers[2]}-1)} \\\\
&= \\simplify{{coefficients[2]*powers[2]}*x^{powers[2]-1}}
\\end{align}
\\begin{align}
\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[1]}*x^{powers[1]}}) &= \\simplify[basic]{{powers[1]}*{coefficients[1]}*x^({powers[1]}-1)} \\\\
&= \\simplify{{coefficients[1]*powers[1]}*x^{powers[1]-1}}
\\end{align}
The derivative of a constant is $0$. So,
\n\\[ \\frac{\\mathrm{d}}{\\mathrm{d}x}(\\var{coefficients[0]}) = 0 \\]
\n\\begin{align}
\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[0]}*x^{powers[0]}}) &= \\simplify[basic]{{powers[0]}*{coefficients[0]}*x^({powers[0]}-1)} \\\\
&= \\simplify{{coefficients[0]*powers[0]}*x^{powers[0]-1}}
\\end{align}
Hence,
\n\\[ \\frac{\\mathrm{d}f}{\\mathrm{d}x} = \\simplify{ {coefficients[2]*powers[2]}*x^{powers[2]-1} + {coefficients[1]*powers[1]}*x^{powers[1]-1} + {coefficients[0]*powers[0]}*x^{powers[0]-1} } \\]
", "variable_groups": [], "extensions": [], "preamble": {"js": "", "css": ""}, "variables": {"num_terms": {"group": "Ungrouped variables", "templateType": "anything", "definition": "3", "description": "", "name": "num_terms"}, "coefficients": {"group": "Ungrouped variables", "templateType": "anything", "definition": "repeat(random(-10..10 except 0),num_terms)", "description": "", "name": "coefficients"}, "powers": {"group": "Ungrouped variables", "templateType": "anything", "definition": "sort(shuffle(list(0..8))[0..3])", "description": "", "name": "powers"}}, "tags": [], "type": "question", "statement": "Numbas is really good at creating and marking randomised maths questions. In this question, you're given a random polynomial to differentiate.
\nNotice how Numbas automatically simplifies the mathematical expressions so they look as if a human wrote them.
\n", "showQuestionGroupNames": false, "rulesets": {}, "functions": {}, "name": "Morten's copy of Numbas demo: JME part", "question_groups": [{"pickingStrategy": "all-ordered", "pickQuestions": 0, "name": "", "questions": []}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Morten Sorensen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3103/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Morten Sorensen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3103/"}]}