// Numbas version: exam_results_page_options {"name": "T6Q6 (custom feedback)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "T6Q6 (custom feedback)", "tags": [], "metadata": {"description": "

Product rule differentiation question with customised feedback to catch some common errors.

", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

Find $\\displaystyle \\frac{dy}{dx}$ if $y=\\sin x \\cos (x^2+4)$.

", "advice": "", "rulesets": {}, "extensions": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "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 [\"(cos(x^3+4x))^2-2x*(sin(x^3+4x))^2\", \"$\\\\sin A \\\\sin B \\\\neq \\\\sin^2 (AB).$ To see this, try entering $\\\\sin \\\\left(\\\\frac{\\\\pi}{2} \\\\right) \\\\times \\\\sin \\\\left( 2 \\\\right)$ into your calculator and compare to the answer you get if you enter $\\\\left( \\\\sin \\\\left( \\\\frac{\\\\pi}{2} \\\\times 2 \\\\right) \\\\right)^2$ into your calculator. Similarly $\\\\cos A \\\\cos B \\\\neq \\\\cos^2 (AB)$.\"],\n [\"cos(x^3+4x)-2x*sin(x^3+4x)\", \"$\\\\sin A \\\\sin B \\\\neq \\\\sin (AB).$ To see this, try entering $\\\\sin \\\\left(\\\\frac{\\\\pi}{2} \\\\right) \\\\times \\\\sin \\\\left( 2 \\\\right)$ into your calculator and compare to the answer you get if you enter $\\\\sin \\\\left( \\\\frac{\\\\pi}{2} \\\\times 2 \\\\right)$ into your calculator. Similarly $\\\\cos A \\\\cos B \\\\neq \\\\cos (AB)$.\"],\n [\"-2x*cos(x)*sin(x^2+4)\", \"Don't forget the product rule! Remember, you need the product rule whenever you have one function of $x$ multiplied by another function of $x$.\"],\n [\"cos(x)*cos(x^2+4)-sin(x)*sin(x^2+4)\", \"On the right track. Don't forget the derivative of $\\\\cos$ (angle) is $-\\\\sin$ (the same angle) $\\\\times$ (derivative of the angle).\"],\n [\"cos(x)*cos(x^2+4)-sin(x)*sin(2x)\", \"Be careful when differentiating $\\\\cos(x^2+4)$. Remember the angle never changes when you differentiate a trigonometric function. Instead, the derivative of $\\\\cos$ (angle) is $-\\\\sin$ (the same angle) $\\\\times$ (derivative of the angle).\"]\n ]\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 )))