// Numbas version: exam_results_page_options {"name": "DeMoivre's theorem 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": [], "name": "DeMoivre's theorem 1", "advice": "
To evaluate \\((\\simplify{{x}+{y}j})^\\var{n}\\) we must first express \\((\\simplify{{x}+{y}j})\\) in polar form.
\nThe modulus of \\(\\simplify{+{x}+{y}j}\\) = \\(\\sqrt{\\var{x}^2+(\\var{y})^2}=\\sqrt{\\simplify{{x^2}+{y}^2}}\\)
\nThe argument of the complex number is given by \\(\\theta=tan^{-1}\\left(\\frac{\\var{y}}{\\var{x}}\\right)=\\var{theta}\\)
\nAccording to De Moivre's theorem \\(Z^{\\var{n}}=|Z|^{\\var{n}}\\left(cos(\\var{n}*\\theta)+jsin(\\var{n}*\\theta)\\right)\\)
\n\\((\\simplify{{x}+{y}j})^\\var{n}=\\left(\\sqrt{\\simplify{{x^2}+{y}^2}}\\right)^{\\var{n}}\\left(cos(\\simplify{{n}*{theta}})+jsin(\\simplify{{n}*{theta}})\\right)\\)
\n=\\(\\simplify{{x2}+{y2}j}\\)
\n\\(A=\\var{x2}\\) and \\(B=\\var{y2}\\)
\nNote that the real and imaginary parts of your answer should be integers (whole numbers).
", "variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"js": "", "css": ""}, "parts": [{"showCorrectAnswer": true, "gaps": [{"precision": 0, "minValue": "{x2}-0.1", "precisionMessage": "You have not given your answer to the correct precision.", "maxValue": "{x2}+0.1", "correctAnswerStyle": "plain", "type": "numberentry", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "marks": 1, "showCorrectAnswer": true, "showPrecisionHint": false, "strictPrecision": false, "precisionType": "dp", "scripts": {}, "variableReplacements": [], "correctAnswerFraction": false, "showFeedbackIcon": true, "precisionPartialCredit": 0}, {"precision": 0, "minValue": "{y2}-0.1", "precisionMessage": "You have not given your answer to the correct precision.", "maxValue": "{y2}+0.1", "correctAnswerStyle": "plain", "type": "numberentry", "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "marks": 1, "showCorrectAnswer": true, "showPrecisionHint": false, "strictPrecision": false, "precisionType": "dp", "scripts": {}, "variableReplacements": [], "correctAnswerFraction": false, "showFeedbackIcon": true, "precisionPartialCredit": 0}], "prompt": "\\((\\simplify{{x}+{y}j})^\\var{n}=A+Bj\\)
\nCalculate \\(A\\) and \\(B\\)
\n\n\\(A\\) = [[0]]
\n\\(B\\) = [[1]]
", "type": "gapfill", "scripts": {}, "variableReplacements": [], "showFeedbackIcon": true, "marks": 0, "variableReplacementStrategy": "originalfirst"}], "variables": {"n": {"templateType": "randrange", "definition": "random(3..10#1)", "group": "Ungrouped variables", "description": "", "name": "n"}, "y": {"templateType": "randrange", "definition": "random(-15..-1#1)", "group": "Ungrouped variables", "description": "", "name": "y"}, "theta": {"templateType": "anything", "definition": "arctan({y}/{x})", "group": "Ungrouped variables", "description": "", "name": "theta"}, "x": {"templateType": "randrange", "definition": "random(1..12#1)", "group": "Ungrouped variables", "description": "", "name": "x"}, "mod": {"templateType": "anything", "definition": "sqrt({x}^2+{y}^2)", "group": "Ungrouped variables", "description": "", "name": "mod"}, "y2": {"templateType": "anything", "definition": "{mod}^{n}*sin({n}*{theta})", "group": "Ungrouped variables", "description": "", "name": "y2"}, "x2": {"templateType": "anything", "definition": "{mod}^{n}*cos({n}*{theta})", "group": "Ungrouped variables", "description": "", "name": "x2"}}, "statement": "Use De Moivre's theorem to calculate \\((\\simplify{+{x}+{y}j})^\\var{n}\\)
", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Calculating complex numbers raised to an natural number exponent
"}, "extensions": [], "variable_groups": [], "rulesets": {}, "functions": {}, "ungrouped_variables": ["x", "y", "n", "theta", "mod", "x2", "y2"], "type": "question", "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}]}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}