// Numbas version: exam_results_page_options {"name": "Find curl and divergence of a vector field", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variablesTest": {"maxRuns": 100, "condition": ""}, "statement": "

For the vector field $\\boldsymbol{u}=\\pmatrix{\\simplify{{a1}*x^{p1}+{b1}*y^{p2}*z^{p3}},\\simplify{{c1}*y^{p4}+{d1}*x^{p5}*z^{p6}},\\simplify{{e1}*z^{p7}+{f1}*x^{p8}*y^{p9}}}$, calculate $\\boldsymbol{\\nabla}\\times\\boldsymbol{u}$ and $\\boldsymbol{\\nabla\\cdot u}$, and determine whether $\\boldsymbol{u}$ is irrotational or solenoidal, or both.

", "functions": {}, "rulesets": {}, "tags": ["checked2015"], "preamble": {"css": "", "js": ""}, "name": "Find curl and divergence of a vector field", "variables": {"p9": {"description": "", "definition": "random(1..9 except p6)", "name": "p9", "group": "Ungrouped variables", "templateType": "anything"}, "p5": {"description": "", "definition": "random(1..9 except p2)", "name": "p5", "group": "Ungrouped variables", "templateType": "anything"}, "irrequal": {"description": "", "definition": "if(n=1,\"is equal\",\"is not equal\")", "name": "irrequal", "group": "Ungrouped variables", "templateType": "anything"}, "a1": {"description": "", "definition": "if(n=2,0,random(1..9))", "name": "a1", "group": "Ungrouped variables", "templateType": "anything"}, "e1": {"description": "", "definition": "if(n=2,0,random(1..9))", "name": "e1", "group": "Ungrouped variables", "templateType": "anything"}, "n": {"description": "", "definition": "random(0..2)", "name": "n", "group": "Ungrouped variables", "templateType": "anything"}, "notirrotational": {"description": "", "definition": "if(n=1,\"No\",\"Yes\")", "name": "notirrotational", "group": "Ungrouped variables", "templateType": "anything"}, "solenoidal": {"description": "", "definition": "if(n=2,\"Yes\",\"No\")", "name": "solenoidal", "group": "Ungrouped variables", "templateType": "anything"}, "p4": {"description": "", "definition": "random(1..9)", "name": "p4", "group": "Ungrouped variables", "templateType": "anything"}, "isirr": {"description": "", "definition": "if(n=1,\"is irrotational\",\"is not irrotational\")", "name": "isirr", "group": "Ungrouped variables", "templateType": "anything"}, "issol": {"description": "", "definition": "if(n=2,\"is solenoidal\",\"is not solenoidal\")", "name": "issol", "group": "Ungrouped variables", "templateType": "anything"}, "p6": {"description": "", "definition": "random(1..9)", "name": "p6", "group": "Ungrouped variables", "templateType": "anything"}, "irrotational": {"description": "", "definition": "if(n=1,\"Yes\",\"No\")", "name": "irrotational", "group": "Ungrouped variables", "templateType": "anything"}, "b1": {"description": "", "definition": "if(n=1,0,random(1..9))", "name": "b1", "group": "Ungrouped variables", "templateType": "anything"}, "c1": {"description": "", "definition": "if(n=2,0,random(1..9))", "name": "c1", "group": "Ungrouped variables", "templateType": "anything"}, "p8": {"description": "", "definition": "random(1..9 except p3)", "name": "p8", "group": "Ungrouped variables", "templateType": "anything"}, "p1": {"description": "", "definition": "random(1..9)", "name": "p1", "group": "Ungrouped variables", "templateType": "anything"}, "d1": {"description": "", "definition": "if(n=1,0,random(1..9))", "name": "d1", "group": "Ungrouped variables", "templateType": "anything"}, "solequal": {"description": "", "definition": "if(n=2,\"is equal\",\"is not equal\")", "name": "solequal", "group": "Ungrouped variables", "templateType": "anything"}, "p2": {"description": "", "definition": "random(1..9)", "name": "p2", "group": "Ungrouped variables", "templateType": "anything"}, "p7": {"description": "", "definition": "random(1..9)", "name": "p7", "group": "Ungrouped variables", "templateType": "anything"}, "p3": {"description": "", "definition": "random(1..9)", "name": "p3", "group": "Ungrouped variables", "templateType": "anything"}, "f1": {"description": "", "definition": "if(n=1,0,random(1..9))", "name": "f1", "group": "Ungrouped variables", "templateType": "anything"}, "notsolenoidal": {"description": "", "definition": "if(n=2,\"No\",\"Yes\")", "name": "notsolenoidal", "group": "Ungrouped variables", "templateType": "anything"}}, "extensions": [], "metadata": {"description": "

Curl and divergence of a vector field.  Determine whether the vector field is irrotational or solenoidal.

", "licence": "Creative Commons Attribution 4.0 International"}, "variable_groups": [], "advice": "

The curl of a vector field $\\boldsymbol{u}=\\pmatrix{u_x,u_y,u_z}$ is given by

\n

\\[\\boldsymbol{\\nabla}\\times\\boldsymbol{u}=\\pmatrix{\\frac{\\partial u_z}{\\partial y}-\\frac{\\partial u_y}{\\partial z},\\frac{\\partial u_x}{\\partial z}-\\frac{\\partial u_z}{\\partial x},\\frac{\\partial u_y}{\\partial x}-\\frac{\\partial u_x}{\\partial y}}.\\]

\n

The divergence of the same vector field is given by

\n

\\[\\boldsymbol{\\nabla\\cdot u}=\\frac{\\partial u_x}{\\partial x}+\\frac{\\partial u_y}{\\partial y}+\\frac{\\partial u_z}{\\partial z}.\\]

\n

a)

\n

By straightforward partial differentiation

\n

\\[\\boldsymbol{\\nabla\\cdot u}=\\pmatrix{\\simplify{{f1*p9}*x^{p8}*y^{p9-1}+{-d1*p6}*x^{p5}*z^{p6-1}},\\simplify{{b1*p3}*y^{p2}*z^{p3 -1}+{-f1*p8}*x^{p8-1}*y^{p9}},\\simplify{{d1*p5}*x^{p5-1}*z^{p6}+{-b1*p2}*y^{p2-1}*z^{p3}}}.\\]

\n

b)

\n

Again, by partial differentiation

\n

\\[\\boldsymbol{\\nabla\\cdot u}=\\simplify{{a1*p1}*x^{p1-1}+{c1*p4}*y^{p4-1}+{e1*p7}*z^{p7-1}}.\\]

\n

A vector field is irrotational if its curl is equal to the zero vector; a vector field is solenoidal if its divergence is equal to zero.

\n

c)

\n

Since $\\boldsymbol{\\nabla}\\times\\boldsymbol{u}$ {irrequal} to the zero vector, the vector field {isirr}.

\n

d)

\n

Since $\\boldsymbol{\\nabla\\cdot u}$ {solequal} to zero, the vector field {issol}.

", "parts": [{"extendBaseMarkingAlgorithm": true, "prompt": "

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

", "showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "sortAnswers": false, "customName": "", "gaps": [{"answerSimplification": "all", "answer": "{f1*p9}*x^{p8}*y^{p9-1}+{-d1*p6}*x^{p5}*z^{p6-1}", "failureRate": 1, "extendBaseMarkingAlgorithm": true, "checkVariableNames": true, "customName": "", "valuegenerators": [{"value": "", "name": "x"}, {"value": "", "name": "y"}, {"value": "", "name": "z"}], "marks": 1, "useCustomName": false, "showCorrectAnswer": true, "checkingAccuracy": 0.001, "showFeedbackIcon": true, "scripts": {}, "type": "jme", "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "showPreview": true, "variableReplacements": [], "checkingType": "absdiff", "adaptiveMarkingPenalty": 0, "vsetRangePoints": 5, "customMarkingAlgorithm": "", "unitTests": []}, {"answerSimplification": "all", "answer": "{b1*p3}*y^{p2}*z^{p3 -1}+{-f1*p8}*x^{p8-1}*y^{p9}", "failureRate": 1, "extendBaseMarkingAlgorithm": true, "checkVariableNames": true, "customName": "", "valuegenerators": [{"value": "", "name": "x"}, {"value": "", "name": "y"}, {"value": "", "name": "z"}], "marks": 1, "useCustomName": false, "showCorrectAnswer": true, "checkingAccuracy": 0.001, "showFeedbackIcon": true, "scripts": {}, "type": "jme", "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "showPreview": true, "variableReplacements": [], "checkingType": "absdiff", "adaptiveMarkingPenalty": 0, "vsetRangePoints": 5, "customMarkingAlgorithm": "", "unitTests": []}, {"answerSimplification": "all", "answer": "{d1*p5}*x^{p5-1}*z^{p6}+{-b1*p2}*y^{p2-1}*z^{p3}", "failureRate": 1, "extendBaseMarkingAlgorithm": true, "checkVariableNames": true, "customName": "", "valuegenerators": [{"value": "", "name": "x"}, {"value": "", "name": "y"}, {"value": "", "name": "z"}], "marks": 1, "useCustomName": false, "showCorrectAnswer": true, "checkingAccuracy": 0.001, "showFeedbackIcon": true, "scripts": {}, "type": "jme", "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "showPreview": true, "variableReplacements": [], "checkingType": "absdiff", "adaptiveMarkingPenalty": 0, "vsetRangePoints": 5, "customMarkingAlgorithm": "", "unitTests": []}], "type": "gapfill", "adaptiveMarkingPenalty": 0, "marks": 0, "showCorrectAnswer": true, "useCustomName": false, "variableReplacements": [], "unitTests": []}, {"extendBaseMarkingAlgorithm": true, "prompt": "

$\\boldsymbol{\\nabla\\cdot u}=$ [[0]].

", "showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "sortAnswers": false, "customName": "", "gaps": [{"answerSimplification": "all", "answer": "{a1*p1}*x^{p1-1}+{c1*p4}*y^{p4-1}+{e1*p7}*z^{p7-1}", "failureRate": 1, "extendBaseMarkingAlgorithm": true, "checkVariableNames": true, "customName": "", "valuegenerators": [{"value": "", "name": "x"}, {"value": "", "name": "y"}, {"value": "", "name": "z"}], "marks": 1, "useCustomName": false, "showCorrectAnswer": true, "checkingAccuracy": 0.001, "showFeedbackIcon": true, "scripts": {}, "type": "jme", "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "showPreview": true, "variableReplacements": [], "checkingType": "absdiff", "adaptiveMarkingPenalty": 0, "vsetRangePoints": 5, "customMarkingAlgorithm": "", "unitTests": []}], "type": "gapfill", "adaptiveMarkingPenalty": 0, "marks": 0, "showCorrectAnswer": true, "useCustomName": false, "variableReplacements": [], "unitTests": []}, {"maxMarks": 0, "showCellAnswerState": true, "extendBaseMarkingAlgorithm": true, "customName": "", "marks": 0, "choices": ["

{irrotational}

", "

{notirrotational}

"], "useCustomName": false, "showCorrectAnswer": true, "minMarks": 0, "displayType": "radiogroup", "prompt": "

Is the vector field $\\boldsymbol{u}$ irrotational?

", "showFeedbackIcon": true, "scripts": {}, "distractors": ["", ""], "variableReplacementStrategy": "originalfirst", "matrix": [1, 0], "variableReplacements": [], "type": "1_n_2", "adaptiveMarkingPenalty": 0, "shuffleChoices": false, "customMarkingAlgorithm": "", "displayColumns": 0, "unitTests": []}, {"maxMarks": 0, "showCellAnswerState": true, "extendBaseMarkingAlgorithm": true, "customName": "", "marks": 0, "choices": ["

{solenoidal}

", "

{notsolenoidal}

"], "useCustomName": false, "showCorrectAnswer": true, "minMarks": 0, "displayType": "radiogroup", "prompt": "

Is the vector field $\\boldsymbol{u}$ solenoidal?

", "showFeedbackIcon": true, "scripts": {}, "distractors": ["", ""], "variableReplacementStrategy": "originalfirst", "matrix": [1, 0], "variableReplacements": [], "type": "1_n_2", "adaptiveMarkingPenalty": 0, "shuffleChoices": false, "customMarkingAlgorithm": "", "displayColumns": 0, "unitTests": []}], "ungrouped_variables": ["f1", "irrequal", "isirr", "b1", "d1", "issol", "e1", "irrotational", "a1", "c1", "solenoidal", "p2", "p3", "solequal", "p1", "p6", "p7", "p4", "p5", "notsolenoidal", "p8", "p9", "notirrotational", "n"], "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}