// Numbas version: finer_feedback_settings {"name": "Graham's copy of Graham's copy of Complex Numbers: Modulus, Argument", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "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"], "name": "Graham's copy of Graham's copy of Complex Numbers: Modulus, Argument", "tags": ["arctan", "arg", "argument", "argument of complex numbers", "complex number", "complex numbers", "mas104220122013CBA3_1", "mod", "modulus", "modulus argument form", "modulus of complex numbers", "quadrants and complex numbers"], "preamble": {"css": "", "js": ""}, "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.
", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "\n$|\\var{z1}|=\\;\\;$[[0]], $\\arg(\\var{z1})=\\;\\;$[[1]] radians
\nInput both answers to 3 decimal places.
\n ", "marks": 0, "gaps": [{"allowFractions": false, "marks": 1, "maxValue": "ans1+tol", "minValue": "ans1-tol", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "marks": 1, "maxValue": "arg1+tol", "minValue": "arg1-tol", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "\n$|\\var{z2}|=\\;\\;$[[0]], $\\arg(\\var{z2})=\\;\\;$[[1]] radians
\nInput both answers to 3 decimal places.
\n ", "marks": 0, "gaps": [{"allowFractions": false, "marks": 1, "maxValue": "ans2+tol", "minValue": "ans2-tol", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "marks": 1, "maxValue": "arg2+tol", "minValue": "arg2-tol", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "\n$|\\var{z3}|=\\;\\;$[[0]], $\\arg(\\var{z3})=\\;\\;$[[1]] radians
\nInput both answers to 3 decimal places.
\n ", "marks": 0, "gaps": [{"allowFractions": false, "marks": 1, "maxValue": "ans3+tol", "minValue": "ans3-tol", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "marks": 1, "maxValue": "arg3+tol", "minValue": "arg3-tol", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "\n$|\\var{z4}|=\\;\\;$[[0]], $\\arg(\\var{z4})=\\;\\;$[[1]] radians
\nInput both answers to 3 decimal places.
\n ", "marks": 0, "gaps": [{"allowFractions": false, "marks": 1, "maxValue": "ans4+tol", "minValue": "ans4-tol", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "marks": 1, "maxValue": "arg4+tol", "minValue": "arg4-tol", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "\nFind the modulus and argument (in radians) of the following complex numbers, where the argument lies between $-\\pi$ and $\\pi$.
\nWhen calculating the argument pay particular attention to the quadrant in which the complex number lies.
\nInput all answers to 3 decimal places.
\n ", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "type": "question", "variables": {"ans1": {"definition": "precround(abs(z1),3)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans1", "description": ""}, "ans2": {"definition": "precround(abs(z2),3)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans2", "description": ""}, "ans3": {"definition": "precround(abs(z3),3)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans3", "description": ""}, "ans4": {"definition": "precround(abs(z4),3)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans4", "description": ""}, "b4": {"definition": "s1*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "b4", "description": ""}, "b1": {"definition": "s2*random(3..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "description": ""}, "b2": {"definition": "s5*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "b2", "description": ""}, "b3": {"definition": "s8*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "b3", "description": ""}, "d4": {"definition": "s5*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "d4", "description": ""}, "d2": {"definition": "s7*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "d2", "description": ""}, "q1": {"definition": "'The complex number is in the first quadrant.'", "templateType": "anything", "group": "Ungrouped variables", "name": "q1", "description": ""}, "q3": {"definition": "'The complex number is in the third quadrant.'", "templateType": "anything", "group": "Ungrouped variables", "name": "q3", "description": ""}, "q2": {"definition": "'The complex number is in the second quadrant.'", "templateType": "anything", "group": "Ungrouped variables", "name": "q2", "description": ""}, "q4": {"definition": "'The complex number is in the fourth quadrant.'", "templateType": "anything", "group": "Ungrouped variables", "name": "q4", "description": ""}, "s3": {"definition": "switch(t=1,1,t=2,-1,t=3,-1,1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s3", "description": ""}, "s2": {"definition": "switch(t=1,-1,t=3,-1,1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s2", "description": ""}, "s1": {"definition": "switch(t=1,1,t=4,1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s1", "description": ""}, "s7": {"definition": "switch(t=2,-1,t=3,1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s7", "description": ""}, "s6": {"definition": "switch(t=1,-1,t=4,-1,1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s6", "description": ""}, "s5": {"definition": "switch(t=3,-1,1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s5", "description": ""}, "s4": {"definition": "switch(t=1,-1,t=4,-1,1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s4", "description": ""}, "m4": {"definition": "switch(t=1,q1,t=2,q3,t=3,q2,q4)", "templateType": "anything", "group": "Ungrouped variables", "name": "m4", "description": ""}, "m1": {"definition": "switch(t=1,q4,t=2,q2,t=3,q3,q1)", "templateType": "anything", "group": "Ungrouped variables", "name": "m1", "description": ""}, "m3": {"definition": "switch(t=1,q3,t=2,q4,t=3,q1,q3)", "templateType": "anything", "group": "Ungrouped variables", "name": "m3", "description": ""}, "arg1": {"definition": "precround(arg(z1),3)", "templateType": "anything", "group": "Ungrouped variables", "name": "arg1", "description": ""}, "c4": {"definition": "if(a4=f,f+1,f)", "templateType": "anything", "group": "Ungrouped variables", "name": "c4", "description": ""}, "arg2": {"definition": "precround(arg(z2),3)", "templateType": "anything", "group": "Ungrouped variables", "name": "arg2", "description": ""}, "arg3": {"definition": "precround(arg(z3),3)", "templateType": "anything", "group": "Ungrouped variables", "name": "arg3", "description": ""}, "tol": {"definition": "0.001", "templateType": "anything", "group": "Ungrouped variables", "name": "tol", "description": ""}, "arg4": {"definition": "precround(arg(z4),3)", "templateType": "anything", "group": "Ungrouped variables", "name": "arg4", "description": ""}, "m2": {"definition": "switch(t=1,q2,t=2,q1,t=3,q4,q2)", "templateType": "anything", "group": "Ungrouped variables", "name": "m2", "description": ""}, "a1": {"definition": "s1*random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "a3": {"definition": "s3*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a3", "description": ""}, "s8": {"definition": "switch(t=1,1,t=4,-1,t=3,1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s8", "description": ""}, "a4": {"definition": "s8*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a4", "description": ""}, "z4": {"definition": "a3+b3*i", "templateType": "anything", "group": "Ungrouped variables", "name": "z4", "description": ""}, "z5": {"definition": "a4+b4*i", "templateType": "anything", "group": "Ungrouped variables", "name": "z5", "description": ""}, "z6": {"definition": "c4+d4*i", "templateType": "anything", "group": "Ungrouped variables", "name": "z6", "description": ""}, "z1": {"definition": "a1+b1*i", "templateType": "anything", "group": "Ungrouped variables", "name": "z1", "description": ""}, "z2": {"definition": "a2+b2*i", "templateType": "anything", "group": "Ungrouped variables", "name": "z2", "description": ""}, "z3": {"definition": "c2+d2*i", "templateType": "anything", "group": "Ungrouped variables", "name": "z3", "description": ""}, "f": {"definition": "random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "f", "description": ""}, "n": {"definition": "random(3..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "a2": {"definition": "s4*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a2", "description": ""}, "t": {"definition": "random(1..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "t", "description": ""}, "c2": {"definition": "s6*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "c2", "description": ""}}, "metadata": {"notes": "\n \t\t5/07/2012:
\n \t\tAdded tags.
\n \t\tChanged some of the grammar in the advice section.
\n \t\tQuestion appears to be working correctly.
\n \t\tThe presentation in IE on using Test Run is not good.
\n \t\t9/07/2012:
\n \t\tDisplay in Advice set out properly.
\n \t\t13/07/2009:
\n \t\tSet new tolerance variable tol=0.001 for all numeric input.
\n \t\t", "description": "Finding the modulus and argument (in radians) of four complex numbers; the arguments between $-\\pi$ and $\\pi$ and careful with quadrants!
", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Graham Wynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/602/"}]}]}], "contributors": [{"name": "Graham Wynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/602/"}]}