// Numbas version: exam_results_page_options {"name": "Complex numbers in real-imaginary form", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"modn4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(n,4)", "description": "", "name": "modn4"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "7000+random(1..4)", "description": "", "name": "n"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "name": "a"}, "moda4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mod(a,4)", "description": "", "name": "moda4"}}, "ungrouped_variables": ["a", "n", "moda4", "modn4"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Complex numbers in real-imaginary form", "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"answer": "i", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

$\\frac{1+i}{1-i}=$ [[0]]

", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"answer": "i^{a}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

$\\left(\\frac{1+i}{1-i}\\right)^\\var{a}=$ [[0]]

", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"answer": "i^{modn4}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "all", "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

$\\left(\\frac{1+i}{1-i}\\right)^{\\var{n}}=$ [[0]]

", "showCorrectAnswer": true, "marks": 0}], "statement": "

Write the following complex numbers in real-imaginary ($x+iy$) form.

", "tags": ["MAS2103", "checked2015"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

15/7/2012:

\n

Added tags.

", "licence": "Creative Commons Attribution 4.0 International", "description": "

Write complex numbers in real-imaginary form.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

a)

\n

To write $z=\\frac{1+i}{1-i}$ in real-imaginary form, multiply $z$ by the complex conjugate of the denominator, to obtain

\n

\\[z=\\frac{(1+i)(1+i)}{(1-i)(1+i)}=\\frac{1+2i-1}{1+1}=i.\\]

\n

b)

\n

To express $z=\\left(\\frac{1+i}{1-i}\\right)^\\var{a}$ in real-imaginary form, use part a), so that we only need to write $i^\\var{a}$ in real-imaginary form.

\n

The result of raising $i$ to an arbitrary integer power $n$ can be determined by using the fact that $i^2=-1$, $i^3=-i$, and $i^4=i$.

\n

Divide the power by $4$, and calculate the remainder (i.e. calculate $n\\mod 4$), which will be either $0$, $1$, $2$, or $3$.  If the remainder is $0$, then $i^n=1$; if the remainder is $1$, then $i^n=i$; if the remainder is $2$, then $i^n=-1$; if the remainder is $3$, then $i^n=-i$.

\n

Here, $n \\bmod 4 =\\var{moda4}$, so $i^\\var{a}=\\simplify{i^{a}}$.

\n

c)

\n

Using the method from part b), $n \\bmod 4=\\var{n} \\bmod 4=\\var{modn4}$, so $i^{\\var{n}}=i^{\\var{modn4}}=\\simplify{i^{modn4}}$.

", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}