// Numbas version: exam_results_page_options {"name": "Sheet 2 Q10 Chain rule question with custom feedback", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Sheet 2 Q10 Chain rule question with custom feedback", "tags": [], "metadata": {"description": "Chain rule question with feedback given for anticipated student errors.", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

Let $y=\\sin (\\var{a}x^{\\var{n}}-\\var{b}x)$. What is $\\displaystyle \\frac{dy}{dx}$?

", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..7)", "description": "

multiple of the power of x

", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "

power on the x

", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..9 except a)", "description": "

multiple of x

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "n", "b"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\displaystyle \\frac{dy}{dx}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "malrules:\n [\n [\"-({a*n}*x^{n-1}-{b})*cos({a}*x^{n}-{b}*x)\", \"Almost there! Double check the rule for differentiating $\\\\sin x$.\"],\n [\"cos({a}*x^{n}-{b}*x)\", \"You have used the correct rule for differentiating $\\\\sin x$. However, since the angle is more complicated than $x$, what extra step do you need to include?\"],\n [\"-cos({a}*x^{n}-{b}*x)\", \"Double check the rule for differentiating $\\\\sin x$. Also, since the angle is more complicated than $x$, what extra step do you need to include?\"],\n [\"cos({a*n}*x^{n-1}-{b})\", \"Remember, the angle in a trigonometric function never changes when you differentiate it!\"],\n [\"-cos({a*n}*x^{n-1}-{b})\", \"Remember, the angle in a trigonometric function never changes when you differentiate it! Also, double check the rule for differentiating $\\\\sin x$.\"],\n [\"cos({a}*x^{n}-{b}*x)+({a*n}*x^{n-1}-{b})*sin\", \"The function $\\\\sin (\\\\var{a}x^{\\\\var{n}} - \\\\var{b}x)$ is not a product, so you do not need the product rule.\"],\n [\"-cos({a}*x^{n}-{b}*x)+({a*n}*x^{n-1}-{b})*sin\", \"The function $\\\\sin (\\\\var{a}x^{\\\\var{n}} - \\\\var{b}x)$ is not a product, so you do not need the product rule.\"],\n [\"cos({a}*x^{n}-{b}*x)+sin({a*n}*x^{n-1}-{b})\", \"The function $\\\\sin (\\\\var{a}x^{\\\\var{n}} - \\\\var{b}x)$ is not a product, so you do not need the product rule.\"],\n [\"-cos({a}*x^{n}-{b}*x)+sin({a*n}*x^{n-1}-{b})\", \"The function $\\\\sin (\\\\var{a}x^{\\\\var{n}} - \\\\var{b}x)$ is not a product, so you do not need the product rule.\"]\n ]\n\nparsed_malrules: \n map(\n [\"expr\":parse(x[0]),\"feedback\":x[1]],\n x,\n malrules\n )\n\nagree_malrules (Do the student's answer and the expected answer agree on each of the sets of variable values?):\n map(\n len(filter(not x ,x,map(\n try(\n resultsEqual(unset(question_definitions,eval(studentexpr,vars)),unset(question_definitions,eval(malrule[\"expr\"],vars)),settings[\"checkingType\"],settings[\"checkingAccuracy\"]),\n message,\n false\n ),\n vars,\n vset\n )))