// Numbas version: exam_results_page_options {"name": "Find gradient of scalar field", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"p4": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(0..4)", "name": "p4", "description": ""}, "e1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)*sign(random(-1,1))", "name": "e1", "description": ""}, "p1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(0..4)", "name": "p1", "description": ""}, "p12": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(0,1)", "name": "p12", "description": ""}, "p9": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(0,1)", "name": "p9", "description": ""}, "b1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)*sign(random(-1,1))", "name": "b1", "description": ""}, "p8": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(0,1)", "name": "p8", "description": ""}, "p7": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(p8=0 and p9=0,1,random(0,1))", "name": "p7", "description": ""}, "d1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)*sign(random(-1,1))", "name": "d1", "description": ""}, "p5": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(0..4)", "name": "p5", "description": ""}, "p6": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(0..4)", "name": "p6", "description": ""}, "p2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(0..4)", "name": "p2", "description": ""}, "p3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(0..4)", "name": "p3", "description": ""}, "c1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)*sign(random(-1,1))", "name": "c1", "description": ""}, "a1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)*sign(random(-1,1))", "name": "a1", "description": ""}, "p11": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(0,1)", "name": "p11", "description": ""}, "t": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(0,1)", "name": "t", "description": ""}, "p10": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(p11=0 and p12=0,1,random(0,1))", "name": "p10", "description": ""}}, "ungrouped_variables": ["p2", "p3", "p1", "p6", "p7", "p4", "p5", "p8", "p9", "a1", "p11", "p12", "t", "b1", "p10", "c1", "e1", "d1"], "name": "Find gradient of scalar field", "functions": {}, "preamble": {"css": "", "js": ""}, "parts": [{"customMarkingAlgorithm": "", "showCorrectAnswer": true, "prompt": "

$f(x,y,z)=\\simplify[std]{{a1}*x^{p1}*y^{p2}*z^{p3}+{b1}*x^{p4}*y^{p5}*z^{p6}+{c1}*({1-t}*sin({d1}*x^{p7}*y^{p8}*z^{p9})+{t}*cos({e1}*x^{p10}*y^{p11}*z^{p12}))}$.

\n

$\\boldsymbol{\\nabla}f=($[[0]]$,$[[1]]$,$[[2]]$)$.

", "unitTests": [], "sortAnswers": false, "scripts": {}, "gaps": [{"answer": "{p1*a1}*x^{p1-1}*y^{p2}*z^{p3}+{p4*b1}*x^{p4-1}*y^{p5}*z^{p6}+{c1*d1*p7*(1-t)}*x^{p7-1}*y^{p8}*z^{p9}*cos({d1}*x^{p7}*y^{p8}*z^{p9})-{c1*e1*p10*t}*x^{p10-1}*y^{p11}*z^{p12}*sin({e1}*x^{p10}*y^{p11}*z^{p12})", "showCorrectAnswer": true, "checkingAccuracy": 0.001, "customMarkingAlgorithm": "", "answerSimplification": "all", "showPreview": true, "checkVariableNames": true, "checkingType": "absdiff", "vsetRange": [0, 1], "type": "jme", "marks": 1, "showFeedbackIcon": true, "scripts": {}, "vsetRangePoints": 5, "expectedVariableNames": ["x", "y", "z"], "unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1}, {"answer": "{p2*a1}*x^{p1}*y^{p2-1}*z^{p3}+{p5*b1}*x^{p4}*y^{p5-1}*z^{p6}+{c1*d1*p8*(1-t)}*x^{p7}*y^{p8-1}*z^{p9}*cos({d1}*x^{p7}*y^{p8}*z^{p9})-{c1*e1*p11*t}*x^{p10}*y^{p11-1}*z^{p12}*sin({e1}*x^{p10}*y^{p11}*z^{p12})", "showCorrectAnswer": true, "checkingAccuracy": 0.001, "customMarkingAlgorithm": "", "answerSimplification": "all", "showPreview": true, "checkVariableNames": true, "checkingType": "absdiff", "vsetRange": [0, 1], "type": "jme", "marks": 1, "showFeedbackIcon": true, "scripts": {}, "vsetRangePoints": 5, "expectedVariableNames": ["x", "y", "z"], "unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1}, {"answer": "{p3*a1}*x^{p1}*y^{p2}*z^{p3-1}+{p6*b1}*x^{p4}*y^{p5}*z^{p6-1}+{c1*d1*p9*(1-t)}*x^{p7}*y^{p8}*z^{p9-1}*cos({d1}*x^{p7}*y^{p8}*z^{p9})-{c1*e1*p12*t}*x^{p10}*y^{p11}*z^{p12-1}*sin({e1}*x^{p10}*y^{p11}*z^{p12})", "showCorrectAnswer": true, "checkingAccuracy": 0.001, "customMarkingAlgorithm": "", "answerSimplification": "all", "showPreview": true, "checkVariableNames": true, "checkingType": "absdiff", "vsetRange": [0, 1], "type": "jme", "marks": 1, "showFeedbackIcon": true, "scripts": {}, "vsetRangePoints": 5, "expectedVariableNames": ["x", "y", "z"], "unitTests": [], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1}], "type": "gapfill", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "showFeedbackIcon": true}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

Find $\\boldsymbol{\\nabla}f$ for the following function $f(x,y,z)$.

", "tags": [], "rulesets": {"std": ["all", "!noLeadingMinus", "!collectNumbers"]}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Gradient of $f(x,y,z)$.

\n

Should include a warning to insert * between multiplied terms

"}, "type": "question", "extensions": [], "advice": "

This question is simply an exercise in partial differentiation, using the fact that

\n

\\[\\boldsymbol{\\nabla}f=\\pmatrix{\\frac{\\partial f}{\\partial x},\\frac{\\partial f}{\\partial y},\\frac{\\partial f}{\\partial z}}.\\]

\n

The partial derivatives of $f$ are as follows:

\n

\\begin{align}
\\frac{\\partial f}{\\partial x} &= \\simplify{{p1*a1}*x^{p1-1}*y^{p2}*z^{p3}+{p4*b1}*x^{p4-1}*y^{p5}*z^{p6}+{c1*d1*p7*(1-t)}*x^{p7-1}*y^{p8}*z^{p9}*cos({d1}*x^{p7}*y^{p8}*z^{p9})-{c1*e1*p10*t}*x^{p10-1}*y^{p11}*z^{p12}*sin({e1}*x^{p10}*y^{p11}*z^{p12})} \\\\[0.5em]
\\frac{\\partial f}{\\partial y} &= \\simplify{{p2*a1}*x^{p1}*y^{p2-1}*z^{p3}+{p5*b1}*x^{p4}*y^{p5-1}*z^{p6}+{c1*d1*p8*(1-t)}*x^{p7}*y^{p8-1}*z^{p9}*cos({d1}*x^{p7}*y^{p8}*z^{p9})-{c1*e1*p11*t}*x^{p10}*y^{p11-1}*z^{p12}*sin({e1}*x^{p10}*y^{p11}*z^{p12})} \\\\[0.5em]
\\frac{\\partial f}{\\partial z} &= \\simplify{{p3*a1}*x^{p1}*y^{p2}*z^{p3-1}+{p6*b1}*x^{p4}*y^{p5}*z^{p6-1}+{c1*d1*p9*(1-t)}*x^{p7}*y^{p8}*z^{p9-1}*cos({d1}*x^{p7}*y^{p8}*z^{p9})-{c1*e1*p12*t}*x^{p10}*y^{p11}*z^{p12-1}*sin({e1}*x^{p10}*y^{p11}*z^{p12})}
\\end{align}

\n

Hence

\n

\\[ \\boldsymbol{\\nabla}f = \\pmatrix{
\\simplify{{p1*a1}*x^{p1-1}*y^{p2}*z^{p3}+{p4*b1}*x^{p4-1}*y^{p5}*z^{p6}+{c1*d1*p7*(1-t)}*x^{p7-1}*y^{p8}*z^{p9}*cos({d1}*x^{p7}*y^{p8}*z^{p9})-{c1*e1*p10*t}*x^{p10-1}*y^{p11}*z^{p12}*sin({e1}*x^{p10}*y^{p11}*z^{p12})}, &
\\simplify{{p2*a1}*x^{p1}*y^{p2-1}*z^{p3}+{p5*b1}*x^{p4}*y^{p5-1}*z^{p6}+{c1*d1*p8*(1-t)}*x^{p7}*y^{p8-1}*z^{p9}*cos({d1}*x^{p7}*y^{p8}*z^{p9})-{c1*e1*p11*t}*x^{p10}*y^{p11-1}*z^{p12}*sin({e1}*x^{p10}*y^{p11}*z^{p12})}, &
\\simplify{{p3*a1}*x^{p1}*y^{p2}*z^{p3-1}+{p6*b1}*x^{p4}*y^{p5}*z^{p6-1}+{c1*d1*p9*(1-t)}*x^{p7}*y^{p8}*z^{p9-1}*cos({d1}*x^{p7}*y^{p8}*z^{p9})-{c1*e1*p12*t}*x^{p10}*y^{p11}*z^{p12-1}*sin({e1}*x^{p10}*y^{p11}*z^{p12})}
}.\\]

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