// Numbas version: exam_results_page_options {"name": "Maria's copy of DeMoivre's Theorem 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"y": {"definition": "random(-15..-1#1)", "group": "Ungrouped variables", "name": "y", "description": "", "templateType": "randrange"}, "x": {"definition": "random(1..12#1)", "group": "Ungrouped variables", "name": "x", "description": "", "templateType": "randrange"}, "x2": {"definition": "{mod}^{n}*cos({n}*{theta})", "group": "Ungrouped variables", "name": "x2", "description": "", "templateType": "anything"}, "y2": {"definition": "{mod}^{n}*sin({n}*{theta})", "group": "Ungrouped variables", "name": "y2", "description": "", "templateType": "anything"}, "theta": {"definition": "arctan({y}/{x})", "group": "Ungrouped variables", "name": "theta", "description": "", "templateType": "anything"}, "mod": {"definition": "sqrt({x}^2+{y}^2)", "group": "Ungrouped variables", "name": "mod", "description": "", "templateType": "anything"}, "n": {"definition": "random(3..10#1)", "group": "Ungrouped variables", "name": "n", "description": "", "templateType": "randrange"}}, "parts": [{"marks": 0, "showCorrectAnswer": true, "gaps": [{"precision": 0, "minValue": "{x2}-0.1", "precisionPartialCredit": 0, "maxValue": "{x2}+0.1", "variableReplacements": [], "correctAnswerFraction": false, "strictPrecision": false, "precisionType": "dp", "scripts": {}, "showCorrectAnswer": true, "showPrecisionHint": false, "marks": 1, "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "correctAnswerStyle": "plain", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst"}, {"precision": 0, "minValue": "{y2}-0.1", "precisionPartialCredit": 0, "maxValue": "{y2}+0.1", "variableReplacements": [], "correctAnswerFraction": false, "strictPrecision": false, "precisionType": "dp", "scripts": {}, "showCorrectAnswer": true, "showPrecisionHint": false, "marks": 1, "notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "correctAnswerStyle": "plain", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst"}], "variableReplacements": [], "type": "gapfill", "showFeedbackIcon": true, "scripts": {}, "prompt": "

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

\n

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

\n

\n

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

\n

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

", "variableReplacementStrategy": "originalfirst"}], "extensions": [], "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"js": "", "css": ""}, "statement": "

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

", "ungrouped_variables": ["x", "y", "n", "theta", "mod", "x2", "y2"], "rulesets": {}, "name": "Maria's copy of DeMoivre's Theorem 1", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Calculating complex numbers raised to an natural number exponent

"}, "functions": {}, "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). 

", "tags": [], "type": "question", "contributors": [{"name": "Peter Johnston", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/771/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}]}], "contributors": [{"name": "Peter Johnston", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/771/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}