// Numbas version: finer_feedback_settings {"name": "Modulus and argument of a complex number", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"absz": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(abs(z),3)", "description": "", "name": "absz"}, "tol": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.001", "description": "", "name": "tol"}, "imzlg0": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch (\n im(z)<0, \"$\\\\mathrm{Im}(z)<0$\",\n im(z)>0, \"$\\\\mathrm{Im}(z)>0$\"\n )", "description": "", "name": "imzlg0"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "name": "a"}, "argz": {"templateType": "anything", "group": "Ungrouped variables", "definition": "precround(arg(z),3)", "description": "", "name": "argz"}, "z": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a+a*i*sign(random(-1,1))", "description": "", "name": "z"}}, "ungrouped_variables": ["a", "argz", "absz", "tol", "imzlg0", "z"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Modulus and argument of a complex number", "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "absz+tol", "minValue": "absz-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "
$\\lvert z \\rvert=$ [[0]] (Enter your answer to 3 d.p.)
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "argz+tol", "minValue": "argz-tol", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "$\\theta=$ [[0]] (Enter your answer to 3d.p.)
", "showCorrectAnswer": true, "marks": 0}], "statement": "Find the modulus $\\lvert z \\rvert$ and argument $\\arg z = \\theta$ (with $-\\pi<\\theta\\leqslant\\pi$) of the complex number $\\var{z}$.
", "tags": ["MAS2103", "checked2015"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "15/7/2012:
\nAdded tags.
\nThis question combines the original questions 2 and 3 from MAS2103 CBA 1.
", "licence": "Creative Commons Attribution 4.0 International", "description": "Modulus and argument of a single complex number, where $\\mathrm{Re}(z)=\\mathrm{Im}(z)$.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "For a complex number $z=a \\pm ai$, the modulus is given by $\\lvert z \\rvert=\\sqrt{a^2+a^2}=a\\sqrt{2}$. In this part, therefore,
\n\\[\\lvert z \\rvert=\\sqrt{(\\var{re(z)})^2+(\\var{im(z)})^2}=\\sqrt{2}\\times\\var{a}=\\var{absz}\\;\\text{to 3d.p.}\\]
\nThe argument of a complex number $z=a \\pm ai$ is given by
\n\\[\\theta=\\arctan\\left(\\frac{\\pm a}{a}\\right)=\\arctan(\\pm 1)=\\pm\\frac{\\pi}{4}\\]
\nregardless of the value of $a$.
\nIn this case {imzlg0}, so $\\theta=\\var{argz}$ to 3d.p.
", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}