// 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": [{"variablesTest": {"maxRuns": 100, "condition": ""}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Calculating complex numbers raised to an natural number exponent

"}, "advice": "

To evaluate \\((\\simplify{{x}+{y}i})^\\var{n}\\) we must first express \\((\\simplify{{x}+{y}i})\\) in polar form.

\n

The modulus of \\(\\simplify{+{x}+{y}i}\\) = \\(\\sqrt{\\var{x}^2+(\\var{y})^2}=\\sqrt{\\simplify{{x^2}+{y}^2}}\\)

\n

The argument of the complex number is given by \\(\\theta=\\tan^{-1}\\left(\\frac{\\var{y}}{\\var{x}}\\right)=\\var{theta}\\)

\n

According to De Moivre's theorem \\(Z^{\\var{n}}=|Z|^{\\var{n}}\\left(\\cos(\\var{n}*\\theta)+i\\sin(\\var{n}*\\theta)\\right)\\)

\n

\\((\\simplify{{x}+{y}i})^\\var{n}=\\left(\\sqrt{\\simplify{{x^2}+{y}^2}}\\right)^{\\var{n}}\\left(\\cos(\\simplify{{n}*{theta}})+i\\sin(\\simplify{{n}*{theta}})\\right)\\)

\n

=\\(\\simplify{{x2}+{y2}i}\\)

\n

\\(A=\\var{x2}\\)  and  \\(B=\\var{y2}\\)

\n

Note that the real and imaginary parts of your answer should be integers (whole numbers). 

", "ungrouped_variables": ["x", "y", "n", "theta", "mod", "x2", "y2"], "tags": [], "statement": "

Use De Moivre's theorem to calculate \\((\\simplify{+{x}+{y}i})^\\var{n}\\)

", "functions": {}, "variable_groups": [], "extensions": [], "parts": [{"scripts": {}, "prompt": "

\\((\\simplify{{x}+{y}i})^\\var{n}=A+Bi\\)

\n

Calculate \\(A\\) and \\(B\\)

\n

\n

\\(A\\) = [[0]]

\n

\\(B\\) = [[1]]

", "variableReplacementStrategy": "originalfirst", "marks": 0, "type": "gapfill", "showFeedbackIcon": true, "variableReplacements": [], "gaps": [{"notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "minValue": "{x2}-0.1", "showPrecisionHint": false, "precisionType": "dp", "showCorrectAnswer": true, "maxValue": "{x2}+0.1", "scripts": {}, "precision": 0, "precisionPartialCredit": 0, "correctAnswerStyle": "plain", "marks": 1, "correctAnswerFraction": false, "strictPrecision": false, "showFeedbackIcon": true, "variableReplacements": [], "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacementStrategy": "originalfirst"}, {"notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "minValue": "{y2}-0.1", "showPrecisionHint": false, "precisionType": "dp", "showCorrectAnswer": true, "maxValue": "{y2}+0.1", "scripts": {}, "precision": 0, "precisionPartialCredit": 0, "correctAnswerStyle": "plain", "marks": 1, "correctAnswerFraction": false, "strictPrecision": false, "showFeedbackIcon": true, "variableReplacements": [], "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacementStrategy": "originalfirst"}], "showCorrectAnswer": true}], "rulesets": {}, "variables": {"x": {"group": "Ungrouped variables", "name": "x", "description": "", "templateType": "randrange", "definition": "random(1..12#1)"}, "n": {"group": "Ungrouped variables", "name": "n", "description": "", "templateType": "randrange", "definition": "random(3..10#1)"}, "theta": {"group": "Ungrouped variables", "name": "theta", "description": "", "templateType": "anything", "definition": "arctan({y}/{x})"}, "x2": {"group": "Ungrouped variables", "name": "x2", "description": "", "templateType": "anything", "definition": "{mod}^{n}*cos({n}*{theta})"}, "y2": {"group": "Ungrouped variables", "name": "y2", "description": "", "templateType": "anything", "definition": "{mod}^{n}*sin({n}*{theta})"}, "mod": {"group": "Ungrouped variables", "name": "mod", "description": "", "templateType": "anything", "definition": "sqrt({x}^2+{y}^2)"}, "y": {"group": "Ungrouped variables", "name": "y", "description": "", "templateType": "randrange", "definition": "random(-15..-1#1)"}}, "name": "DeMoivre's Theorem 1", "preamble": {"js": "", "css": ""}, "type": "question", "contributors": [{"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}]}]}], "contributors": [{"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}]}