// Numbas version: finer_feedback_settings {"name": "Polar form of a complex number", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": ["checked2015"], "parts": [{"variableReplacementStrategy": "originalfirst", "marks": 0, "customMarkingAlgorithm": "", "prompt": "
$r=$ [[0]] (Enter your answer to 3 d.p.)
", "showCorrectAnswer": true, "sortAnswers": false, "gaps": [{"variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 1, "unitTests": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true, "correctAnswerFraction": false, "mustBeReduced": false, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "extendBaseMarkingAlgorithm": true, "type": "numberentry", "maxValue": "absz+tol", "showFeedbackIcon": true, "customMarkingAlgorithm": "", "minValue": "absz-tol", "variableReplacements": [], "allowFractions": false}], "extendBaseMarkingAlgorithm": true, "type": "gapfill", "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "unitTests": []}, {"variableReplacementStrategy": "originalfirst", "marks": 0, "customMarkingAlgorithm": "", "prompt": "$\\theta=$ [[0]] (Enter your answer to 3 d.p.)
", "showCorrectAnswer": true, "sortAnswers": false, "gaps": [{"variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 1, "unitTests": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true, "correctAnswerFraction": false, "mustBeReduced": false, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "extendBaseMarkingAlgorithm": true, "type": "numberentry", "maxValue": "argz+tol", "showFeedbackIcon": true, "customMarkingAlgorithm": "", "minValue": "argz-tol", "variableReplacements": [], "allowFractions": false}], "extendBaseMarkingAlgorithm": true, "type": "gapfill", "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "unitTests": []}], "variable_groups": [], "ungrouped_variables": ["a", "argz", "b", "absz", "tol", "z"], "variables": {"absz": {"group": "Ungrouped variables", "description": "", "definition": "precround(abs(z),3)", "name": "absz", "templateType": "anything"}, "tol": {"group": "Ungrouped variables", "description": "", "definition": "0.001", "name": "tol", "templateType": "anything"}, "b": {"group": "Ungrouped variables", "description": "", "definition": "random(0..5 except a)*sign(random(-1,1))", "name": "b", "templateType": "anything"}, "z": {"group": "Ungrouped variables", "description": "", "definition": "a+b*i", "name": "z", "templateType": "anything"}, "argz": {"group": "Ungrouped variables", "description": "", "definition": "precround(arg(z),3)", "name": "argz", "templateType": "anything"}, "a": {"group": "Ungrouped variables", "description": "", "definition": "random(0..5)*sign(random(-1,1))", "name": "a", "templateType": "anything"}}, "functions": {}, "preamble": {"css": "", "js": ""}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Polar form of a complex number.
"}, "type": "question", "statement": "Write the complex number $z=\\var{z}$ in polar form $z=r\\mathrm{e}^{i\\theta}$, with $r>0$, $-\\pi<\\theta\\leqslant\\pi$, by calculating $r$ and $\\theta$.
", "rulesets": {}, "advice": "To write a complex number $z=a+bi$ in polar form $z=r\\mathrm{e}^{i\\theta}$, we calculate the modulus $r = \\lvert z \\rvert$ and argument $\\theta = \\arg(z)$.
\nHence
\n\\[r=\\lvert z \\rvert=\\sqrt{a^2+b^2}=\\sqrt{(\\var{a})^2+(\\var{b})^2}=\\var{absz}\\;\\text{to 3d.p.}\\]
\nand, in general,
\n\\[\\theta=\\arg(z)=\\arctan\\left(\\frac{b}{a}\\right).\\]
\nIf $a=0$, however, then $\\mathrm{Re}(z)=0$, so $\\arg(z)=\\pm\\frac{\\pi}{2}$, depending on whether $\\mathrm{Im}(z)$ is positive or negative.
\nIn this case $a=\\var{a}$, and $b=\\var{b}$, so $\\arg(z)=\\var{argz}$.
", "extensions": [], "name": "Polar form of a complex number", "variablesTest": {"condition": "", "maxRuns": 100}, "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}