// Numbas version: exam_results_page_options {"name": "DeMoivre's Theorem 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": 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

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]]