// Numbas version: finer_feedback_settings {"name": "Principle value 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": {"v": {"group": "Ungrouped variables", "templateType": "anything", "definition": "precround(exp(-b1*pi/4)*sin(b1*ln(a1*sqrt(2))),3)", "name": "v", "description": ""}, "tol": {"group": "Ungrouped variables", "templateType": "anything", "definition": "0.001", "name": "tol", "description": ""}, "u": {"group": "Ungrouped variables", "templateType": "anything", "definition": "precround(exp(-b1*pi/4)*cos(b1*ln(a1*sqrt(2))),3)", "name": "u", "description": ""}, "a1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..4)", "name": "a1", "description": ""}, "b1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..4)", "name": "b1", "description": ""}}, "ungrouped_variables": ["a1", "u", "b1", "tol", "v"], "rulesets": {}, "name": "Principle value of a complex number", "showQuestionGroupNames": false, "functions": {}, "parts": [{"scripts": {}, "gaps": [{"showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "correctAnswerFraction": false, "minValue": "u-tol", "showCorrectAnswer": true, "marks": 1, "maxValue": "u+tol"}, {"showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "correctAnswerFraction": false, "minValue": "v-tol", "showCorrectAnswer": true, "marks": 1, "maxValue": "v+tol"}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "
$u=$ [[0]]. (Enter your answer to 3d.p.)
\n$v=$ [[1]]. (Enter your answer to 3d.p.)
", "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "Find the principal value of the complex number $z=(\\simplify{{a1}+i*{a1}})^{\\simplify{i*{b1}}}$, in the form $u+iv$.
", "tags": ["MAS2103", "checked2015"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "15/7/2012:
\nAdded tags.
", "licence": "Creative Commons Attribution 4.0 International", "description": "Calculate the principal value of a complex number.
"}, "advice": "The complex number $z=(a+bi)^n$ can be written in the form
\n\\[z=r^n\\mathrm{e}^{in\\left(\\theta+2k\\pi\\right)},\\]
\nwhere $r$ is the modulus of $a+bi$, $\\theta$ is the argument, and where $-\\pi<\\theta\\leqslant\\pi$, and $k=0,1,2,\\ldots$.
\nThe principal value of $z$ is that which corresponds to $k=0$, so in this question
\n\\[z=(\\simplify{{a1}+i*{a1}})^{\\simplify{i*{b1}}}=r^{\\simplify{i*{b1}}}\\mathrm{e}^{\\simplify{{-b1}*theta}}.\\]
\nThen, $r$ is given by
\n\\[r=\\sqrt{(\\var{a1})^2+(\\var{a1})^2}=\\simplify{{a1}*sqrt(2)},\\]
\nand the argument $\\theta$ is given by
\n\\[\\theta=\\arctan\\left(\\frac{\\var{a1}}{\\var{a1}}\\right)=\\arctan(1)=\\frac{\\pi}{4}.\\]
\nTherefore
\n\\[z=(\\simplify{{a1}*sqrt(2)})^{\\simplify{i*{b1}}}\\mathrm{e}^{\\simplify{{-b1}*pi/4}}.\\]
\nNext, note that
\n\\[(\\simplify{{a1}*sqrt(2)})^{\\simplify{i*{b1}}}=\\mathrm{e}^{\\simplify{i*{b1}}\\ln(\\simplify{{a1}*sqrt(2)})}.\\]
\nNow use the identity
\n\\[\\mathrm{e}^{i\\phi}=\\cos(\\phi)+i\\sin(\\phi),\\]
\nso
\n\\[(\\simplify{{a1}*sqrt(2)})^{\\simplify{i*{b1}}}\\mathrm{e}^{\\simplify{{-b1}*pi/4}}=\\Biggl(\\cos\\biggl(\\simplify{{b1}*ln({a1}*sqrt(2))}\\biggr)+i\\sin\\biggl(\\simplify{{b1}*ln({a1}*sqrt(2))}\\biggr)\\Biggr)\\mathrm{e}^{\\simplify{{-b1}*pi/4}}\\]
\nwhich, when evaluated numerically gives
\n\\[z=\\simplify{{u}+{v}i}\\;\\text{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/"}]}