// 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": [], "statement": "
Use De Moivre's theorem to calculate \\((\\simplify{+{x}+{y}i})^\\var{n}\\)
", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Calculating complex numbers raised to an natural number exponent
"}, "preamble": {"js": "", "css": ""}, "variablesTest": {"maxRuns": 100, "condition": ""}, "variable_groups": [], "advice": "To evaluate \\((\\simplify{{x}+{y}i})^\\var{n}\\) we must first express \\((\\simplify{{x}+{y}i})\\) in polar form.
\nThe modulus of \\(\\simplify{+{x}+{y}i}\\) = \\(\\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)+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}\\)
\nNote that the real and imaginary parts of your answer should be integers (whole numbers).
", "ungrouped_variables": ["x", "y", "n", "theta", "mod", "x2", "y2"], "functions": {}, "name": "DeMoivre's Theorem 1", "variables": {"theta": {"name": "theta", "group": "Ungrouped variables", "definition": "arctan({y}/{x})", "description": "", "templateType": "anything"}, "x": {"name": "x", "group": "Ungrouped variables", "definition": "random(1..12#1)", "description": "", "templateType": "randrange"}, "mod": {"name": "mod", "group": "Ungrouped variables", "definition": "sqrt({x}^2+{y}^2)", "description": "", "templateType": "anything"}, "y2": {"name": "y2", "group": "Ungrouped variables", "definition": "{mod}^{n}*sin({n}*{theta})", "description": "", "templateType": "anything"}, "y": {"name": "y", "group": "Ungrouped variables", "definition": "random(-15..-1#1)", "description": "", "templateType": "randrange"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(3..10#1)", "description": "", "templateType": "randrange"}, "x2": {"name": "x2", "group": "Ungrouped variables", "definition": "{mod}^{n}*cos({n}*{theta})", "description": "", "templateType": "anything"}}, "parts": [{"type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "prompt": "\\((\\simplify{{x}+{y}i})^\\var{n}=A+Bi\\)
\nCalculate \\(A\\) and \\(B\\)
\n\n\\(A\\) = [[0]]
\n\\(B\\) = [[1]]
", "scripts": {}, "showFeedbackIcon": true, "variableReplacements": [], "gaps": [{"precisionPartialCredit": 0, "strictPrecision": false, "scripts": {}, "precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "minValue": "{x2}-0.1", "variableReplacements": [], "marks": 1, "type": "numberentry", "maxValue": "{x2}+0.1", "showCorrectAnswer": true, "showPrecisionHint": false, "correctAnswerStyle": "plain", "precision": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "allowFractions": false, "notationStyles": ["plain", "en", "si-en"]}, {"precisionPartialCredit": 0, "strictPrecision": false, "scripts": {}, "precisionType": "dp", "precisionMessage": "You have not given your answer to the correct precision.", "minValue": "{y2}-0.1", "variableReplacements": [], "marks": 1, "type": "numberentry", "maxValue": "{y2}+0.1", "showCorrectAnswer": true, "showPrecisionHint": false, "correctAnswerStyle": "plain", "precision": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "allowFractions": false, "notationStyles": ["plain", "en", "si-en"]}], "marks": 0}], "rulesets": {}, "extensions": [], "type": "question", "contributors": [{"name": "Peter Johnston", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/771/"}]}]}], "contributors": [{"name": "Peter Johnston", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/771/"}]}