// Numbas version: finer_feedback_settings {"name": "Complex Numbers: Modulus, Argument", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"prompt": "\n
$|\\var{z1}|=\\;\\;$[[0]], $\\arg(\\var{z1})=\\;\\;$[[1]] radians
\nInput both answers to 3 decimal places.
\n ", "type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "gaps": [{"type": "numberentry", "minValue": "ans1-tol", "showFeedbackIcon": true, "mustBeReduced": false, "mustBeReducedPC": 0, "variableReplacements": [], "marks": 1, "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "maxValue": "ans1+tol", "scripts": {}}, {"type": "numberentry", "minValue": "arg1-tol", "showFeedbackIcon": true, "mustBeReduced": false, "mustBeReducedPC": 0, "variableReplacements": [], "marks": 1, "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "maxValue": "arg1+tol", "scripts": {}}], "showFeedbackIcon": true}, {"prompt": "\n$|\\var{z2}|=\\;\\;$[[0]], $\\arg(\\var{z2})=\\;\\;$[[1]] radians
\nInput both answers to 3 decimal places.
\n ", "type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "gaps": [{"type": "numberentry", "minValue": "ans2-tol", "showFeedbackIcon": true, "mustBeReduced": false, "mustBeReducedPC": 0, "variableReplacements": [], "marks": 1, "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "maxValue": "ans2+tol", "scripts": {}}, {"type": "numberentry", "minValue": "arg2-tol", "showFeedbackIcon": true, "mustBeReduced": false, "mustBeReducedPC": 0, "variableReplacements": [], "marks": 1, "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "maxValue": "arg2+tol", "scripts": {}}], "showFeedbackIcon": true}, {"prompt": "\n$|\\var{z3}|=\\;\\;$[[0]], $\\arg(\\var{z3})=\\;\\;$[[1]] radians
\nInput both answers to 3 decimal places.
\n ", "type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "gaps": [{"type": "numberentry", "minValue": "ans3-tol", "showFeedbackIcon": true, "mustBeReduced": false, "mustBeReducedPC": 0, "variableReplacements": [], "marks": 1, "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "maxValue": "ans3+tol", "scripts": {}}, {"type": "numberentry", "minValue": "arg3-tol", "showFeedbackIcon": true, "mustBeReduced": false, "mustBeReducedPC": 0, "variableReplacements": [], "marks": 1, "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "maxValue": "arg3+tol", "scripts": {}}], "showFeedbackIcon": true}, {"prompt": "\n$|\\var{z4}|=\\;\\;$[[0]], $\\arg(\\var{z4})=\\;\\;$[[1]] radians
\nInput both answers to 3 decimal places.
\n ", "type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "gaps": [{"type": "numberentry", "minValue": "ans4-tol", "showFeedbackIcon": true, "mustBeReduced": false, "mustBeReducedPC": 0, "variableReplacements": [], "marks": 1, "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "maxValue": "ans4+tol", "scripts": {}}, {"type": "numberentry", "minValue": "arg4-tol", "showFeedbackIcon": true, "mustBeReduced": false, "mustBeReducedPC": 0, "variableReplacements": [], "marks": 1, "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "maxValue": "arg4+tol", "scripts": {}}], "showFeedbackIcon": true}], "statement": "Find the modulus and argument (in radians) of the following complex numbers, where the argument lies between $-\\pi$ and $\\pi$. If your answer is outside this range, simply add or subtract $2\\pi$ to your answer.
\nWhen calculating the argument pay particular attention to the quadrant in which the complex number lies.
\nInput all answers to 3 decimal places.
", "advice": "Note that the arguments $\\theta$ of the complex numbers are in radians and have to be in the range $-\\pi < \\theta \\le \\pi$.
\nYou have to be careful with using a standard calculator when you are finding the argument of a complex number.
\nIf $z=a+bi=r(\\cos(\\theta)+i\\sin(\\theta))$ then we have:$r\\cos(\\theta)=a,\\;\\;r\\sin(\\theta)=b$ and so $\\tan(\\theta) = b/a$.
\nUsing a calculator to find the argument via $\\arctan(b/a)$ works in the range $-\\pi < \\theta \\le \\pi$ when the complex number is in the first or fourth quadrants – you get the correct value.
\nHowever, The calculator gives the wrong value for complex numbers in the other quadrants.
\nSince $\\arctan(b/a)$ does not distinguish between the second and fourth quadrants and the calculator gives the argument for the fourth quadrant you have to add $\\pi$ onto the calculator value.
\nSince $\\arctan(b/a)$ does not distinguish between the first and third quadrants and the calculator gives the argument for the first quadrant you have to take away $\\pi$ from the calculator value.
\n\\[ \\begin{eqnarray*} |\\var{z1}|&=&\\sqrt{(\\var{a1})^2+(\\var{b1})^2}\\\\ &=& \\var{abs(z1)}\\\\ &=&\\var{ans1} \\end{eqnarray*} \\] to 3 decimal places.
\n{m1}
\nHence we see that: \\[\\begin{eqnarray*} \\arg(\\var{z1}) &=& \\var{arg(z1)}\\\\ &=& \\var{arg1}\\; \\mbox{radians} \\end{eqnarray*} \\] to 3 decimal places.
\n\\[ \\begin{eqnarray*} |\\var{z2}|&=&\\sqrt{(\\var{a2})^2+(\\var{b2})^2}\\\\ &=& \\var{abs(z2)}\\\\ &=&\\var{ans2} \\end{eqnarray*} \\] to 3 decimal places.
\n{m2}
\nHence we see that: \\[\\begin{eqnarray*} \\arg(\\var{z2}) &=& \\var{arg(z2)}\\\\ &=& \\var{arg2}\\; \\mbox{radians} \\end{eqnarray*} \\] to 3 decimal places.
\n\\[ \\begin{eqnarray*} |\\var{z3}|&=&\\sqrt{(\\var{c2})^2+(\\var{d2})^2}\\\\ &=& \\var{abs(z3)}\\\\ &=&\\var{ans3} \\end{eqnarray*} \\] to 3 decimal places.
\n{m3}
\nHence we see that: \\[\\begin{eqnarray*} \\arg(\\var{z3}) &=& \\var{arg(z3)}\\\\ &=& \\var{arg3}\\; \\mbox{radians} \\end{eqnarray*} \\] to 3 decimal places.
\n\\[ \\begin{eqnarray*} |\\var{z4}|&=&\\sqrt{(\\var{a3})^2+(\\var{b3})^2}\\\\ &=& \\var{abs(z4)}\\\\ &=&\\var{ans4} \\end{eqnarray*} \\] to 3 decimal places.
\n{m4}
\nHence we see that: \\[\\begin{eqnarray*} \\arg(\\var{z4}) &=& \\var{arg(z4)}\\\\ &=& \\var{arg4}\\; \\mbox{radians} \\end{eqnarray*} \\] to 3 decimal places.
", "variables": {"arg1": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "arg1", "definition": "precround(arg(z1),3)"}, "m4": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "m4", "definition": "switch(t=1,q1,t=2,q3,t=3,q2,q4)"}, "f": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "f", "definition": "random(1..9)"}, "s2": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "s2", "definition": "switch(t=1,-1,t=3,-1,1)"}, "s8": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "s8", "definition": "switch(t=1,1,t=4,-1,t=3,1,-1)"}, "s7": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "s7", "definition": "switch(t=2,-1,t=3,1,-1)"}, "a4": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "a4", "definition": "s8*random(1..9)"}, "c4": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "c4", "definition": "if(a4=f,f+1,f)"}, "ans1": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "ans1", "definition": "precround(abs(z1),3)"}, "b4": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "b4", "definition": "s1*random(1..9)"}, "z4": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "z4", "definition": "a3+b3*i"}, "q2": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "q2", "definition": "'The complex number is in the second quadrant.'"}, "s3": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "s3", "definition": "switch(t=1,1,t=2,-1,t=3,-1,1)"}, "s4": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "s4", "definition": "switch(t=1,-1,t=4,-1,1)"}, "arg4": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "arg4", "definition": "precround(arg(z4),3)"}, "z2": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "z2", "definition": "a2+b2*i"}, "z5": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "z5", "definition": "a4+b4*i"}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "b1", "definition": "s2*random(3..9)"}, "a3": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "a3", "definition": "s3*random(1..9)"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "t", "definition": "random(1..4)"}, "q4": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "q4", "definition": "'The complex number is in the fourth quadrant.'"}, "arg3": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "arg3", "definition": "precround(arg(z3),3)"}, "arg2": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "arg2", "definition": "precround(arg(z2),3)"}, "ans2": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "ans2", "definition": "precround(abs(z2),3)"}, "c2": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "c2", "definition": "s6*random(1..9)"}, "s5": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "s5", "definition": "switch(t=3,-1,1)"}, "m1": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "m1", "definition": "switch(t=1,q4,t=2,q2,t=3,q3,q1)"}, "d4": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "d4", "definition": "s5*random(1..9)"}, "a2": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "a2", "definition": "s4*random(1..9)"}, "s1": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "s1", "definition": "switch(t=1,1,t=4,1,-1)"}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "a1", "definition": "s1*random(2..9)"}, "tol": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "tol", "definition": "0.001"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "n", "definition": "random(3..5)"}, "b3": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "b3", "definition": "s8*random(1..9)"}, "s6": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "s6", "definition": "switch(t=1,-1,t=4,-1,1)"}, "ans3": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "ans3", "definition": "precround(abs(z3),3)"}, "q1": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "q1", "definition": "'The complex number is in the first quadrant.'"}, "ans4": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "ans4", "definition": "precround(abs(z4),3)"}, "z6": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "z6", "definition": "c4+d4*i"}, "q3": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "q3", "definition": "'The complex number is in the third quadrant.'"}, "z3": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "z3", "definition": "c2+d2*i"}, "z1": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "z1", "definition": "a1+b1*i"}, "d2": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "d2", "definition": "s7*random(1..9)"}, "m2": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "m2", "definition": "switch(t=1,q2,t=2,q1,t=3,q4,q2)"}, "b2": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "b2", "definition": "s5*random(1..9)"}, "m3": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "m3", "definition": "switch(t=1,q3,t=2,q4,t=3,q1,q3)"}}, "tags": [], "ungrouped_variables": ["ans1", "ans2", "ans3", "ans4", "b4", "b1", "b2", "b3", "d4", "d2", "q1", "q3", "q2", "q4", "s3", "s2", "s1", "s7", "s6", "s5", "s4", "m4", "m1", "m3", "arg1", "z3", "arg2", "arg3", "tol", "arg4", "m2", "a1", "a3", "s8", "a4", "z4", "z5", "z6", "z1", "z2", "c4", "f", "n", "a2", "t", "c2"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Finding the modulus and argument (in radians) of four complex numbers; the arguments between $-\\pi$ and $\\pi$ and careful with quadrants!
"}, "functions": {}, "name": "Complex Numbers: Modulus, Argument", "extensions": [], "type": "question", "contributors": [{"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}]}]}], "contributors": [{"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}]}