// 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": [{"parts": [{"customMarkingAlgorithm": "", "useCustomName": false, "showCorrectAnswer": true, "customName": "", "variableReplacementStrategy": "originalfirst", "type": "gapfill", "unitTests": [], "variableReplacements": [], "prompt": "

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

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

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

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

{irrotational}

", "

{notirrotational}

"], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "prompt": "

Is the vector field $\\boldsymbol{u}$ irrotational? (An \"irrotational\" vector field is one with zero curl everywhere.)

", "showCellAnswerState": true, "shuffleChoices": false}, {"scripts": {}, "displayType": "radiogroup", "useCustomName": false, "minMarks": 0, "unitTests": [], "variableReplacements": [], "displayColumns": 0, "matrix": [1, 0], "type": "1_n_2", "distractors": ["", ""], "marks": 0, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "maxMarks": 0, "customName": "", "choices": ["

{solenoidal}

", "

{notsolenoidal}

"], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "prompt": "

Is the vector field $\\boldsymbol{u}$ solenoidal? (A \"solenoidal\" vector field is one with zero divergence everywhere.)

", "showCellAnswerState": true, "shuffleChoices": false}], "tags": [], "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"], "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "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 partial differentiation

\n

\\[\\boldsymbol{\\nabla \\times 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}.

", "preamble": {"js": "", "css": ""}, "extensions": [], "rulesets": {}, "variables": {"p2": {"group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything", "name": "p2"}, "f1": {"group": "Ungrouped variables", "definition": "if(n=1,0,random(1..9))", "description": "", "templateType": "anything", "name": "f1"}, "notirrotational": {"group": "Ungrouped variables", "definition": "if(n=1,\"No\",\"Yes\")", "description": "", "templateType": "anything", "name": "notirrotational"}, "notsolenoidal": {"group": "Ungrouped variables", "definition": "if(n=2,\"No\",\"Yes\")", "description": "", "templateType": "anything", "name": "notsolenoidal"}, "p6": {"group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything", "name": "p6"}, "solequal": {"group": "Ungrouped variables", "definition": "if(n=2,\"is equal\",\"is not equal\")", "description": "", "templateType": "anything", "name": "solequal"}, "p7": {"group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything", "name": "p7"}, "p8": {"group": "Ungrouped variables", "definition": "random(1..9 except p3)", "description": "", "templateType": "anything", "name": "p8"}, "d1": {"group": "Ungrouped variables", "definition": "if(n=1,0,random(1..9))", "description": "", "templateType": "anything", "name": "d1"}, "c1": {"group": "Ungrouped variables", "definition": "if(n=2,0,random(1..9))", "description": "", "templateType": "anything", "name": "c1"}, "p1": {"group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything", "name": "p1"}, "isirr": {"group": "Ungrouped variables", "definition": "if(n=1,\"is irrotational\",\"is not irrotational\")", "description": "", "templateType": "anything", "name": "isirr"}, "n": {"group": "Ungrouped variables", "definition": "random(0..2)", "description": "", "templateType": "anything", "name": "n"}, "a1": {"group": "Ungrouped variables", "definition": "if(n=2,0,random(1..9))", "description": "", "templateType": "anything", "name": "a1"}, "issol": {"group": "Ungrouped variables", "definition": "if(n=2,\"is solenoidal\",\"is not solenoidal\")", "description": "", "templateType": "anything", "name": "issol"}, "p9": {"group": "Ungrouped variables", "definition": "random(1..9 except p6)", "description": "", "templateType": "anything", "name": "p9"}, "p5": {"group": "Ungrouped variables", "definition": "random(1..9 except p2)", "description": "", "templateType": "anything", "name": "p5"}, "irrequal": {"group": "Ungrouped variables", "definition": "if(n=1,\"is equal\",\"is not equal\")", "description": "", "templateType": "anything", "name": "irrequal"}, "irrotational": {"group": "Ungrouped variables", "definition": "if(n=1,\"Yes\",\"No\")", "description": "", "templateType": "anything", "name": "irrotational"}, "solenoidal": {"group": "Ungrouped variables", "definition": "if(n=2,\"Yes\",\"No\")", "description": "", "templateType": "anything", "name": "solenoidal"}, "e1": {"group": "Ungrouped variables", "definition": "if(n=2,0,random(1..9))", "description": "", "templateType": "anything", "name": "e1"}, "p3": {"group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything", "name": "p3"}, "b1": {"group": "Ungrouped variables", "definition": "if(n=1,0,random(1..9))", "description": "", "templateType": "anything", "name": "b1"}, "p4": {"group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything", "name": "p4"}}, "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": {}, "name": "Find curl and divergence of a vector field", "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"}, "contributors": [{"name": "Simon Vaughan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1135/"}]}]}], "contributors": [{"name": "Simon Vaughan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1135/"}]}