// Numbas version: finer_feedback_settings {"name": "aleams'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": [{"variable_groups": [], "ungrouped_variables": ["num_terms", "powers", "coefficients"], "tags": [], "question_groups": [{"pickQuestions": 0, "name": "", "pickingStrategy": "all-ordered", "questions": []}], "name": "aleams's copy of Numbas demo: JME part", "type": "question", "extensions": [], "parts": [{"variableReplacementStrategy": "originalfirst", "stepsPenalty": "1", "steps": [{"variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "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} \\]

\n

Enter the derivatives of each of the three terms in $f(x)$:

", "scripts": {}, "variableReplacements": [], "type": "information", "marks": 0}, {"variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "showpreview": true, "checkvariablenames": false, "expectedvariablenames": [], "marks": 1, "type": "jme", "prompt": "

$\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[2]}*x^{powers[2]}}) =$

", "checkingaccuracy": 0.001, "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "vsetrangepoints": 5, "vsetrange": [0, 1], "answer": "{coefficients[2]*powers[2]}*x^{powers[2]-1}"}, {"variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "showpreview": true, "checkvariablenames": false, "expectedvariablenames": [], "marks": 1, "type": "jme", "prompt": "

$\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[1]}*x^{powers[1]}}) =$

", "checkingaccuracy": 0.001, "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "vsetrangepoints": 5, "vsetrange": [0, 1], "answer": "{coefficients[1]*powers[1]}*x^{powers[1]-1}"}, {"variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "showpreview": true, "checkvariablenames": false, "expectedvariablenames": [], "marks": 1, "type": "jme", "prompt": "

$\\frac{\\mathrm{d}}{\\mathrm{d}x}(\\simplify{{coefficients[0]}*x^{powers[0]}}) =$

", "checkingaccuracy": 0.001, "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "vsetrangepoints": 5, "vsetrange": [0, 1], "answer": "{coefficients[0]*powers[0]}*x^{powers[0]-1}"}], "showCorrectAnswer": true, "variableReplacements": [], "scripts": {}, "marks": 0, "type": "gapfill", "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]]

", "gaps": [{"variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "showpreview": true, "checkvariablenames": false, "expectedvariablenames": [], "marks": "4", "type": "jme", "checkingaccuracy": 0.001, "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "vsetrangepoints": 5, "vsetrange": [0, 1], "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}"}]}], "preamble": {"js": "", "css": ""}, "variables": {"num_terms": {"templateType": "anything", "definition": "3", "description": "", "name": "num_terms", "group": "Ungrouped variables"}, "powers": {"templateType": "anything", "definition": "sort(shuffle(list(0..8))[0..3])", "description": "", "name": "powers", "group": "Ungrouped variables"}, "coefficients": {"templateType": "anything", "definition": "repeat(random(-10..10 except 0),num_terms)", "description": "", "name": "coefficients", "group": "Ungrouped variables"}}, "statement": "

Numbas is really good at creating and marking randomised maths questions. In this question, you're given a random polynomial to differentiate.

\n

Notice how Numbas automatically simplifies the mathematical expressions so they look as if a human wrote them.

\n

See this question in the public editor

", "variablesTest": {"maxRuns": 100, "condition": ""}, "showQuestionGroupNames": false, "functions": {}, "rulesets": {}, "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "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} \\]

\n

We 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}

\n

\\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}

\n

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}

\n

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} } \\]

", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "aleams barra", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/29/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "aleams barra", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/29/"}]}