// Numbas version: exam_results_page_options {"name": "Roots of a quartic real polynomial", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"b3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "ch(a3,mz1*mz2,random(-5..5 except 0),-5,5)", "name": "b3", "description": ""}, "mz3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "abs(z3)^2", "name": "mz3", "description": ""}, "z2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a2+b2*i", "name": "z2", "description": ""}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-6..6 except [0,-a1,a1])", "name": "b1", "description": ""}, "r12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "re(z1+z2)", "name": "r12", "description": ""}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "name": "a1", "description": ""}, "b2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..6 except round(b1*a2/a1))", "name": "b2", "description": ""}, "mz1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "abs(z1)^2", "name": "mz1", "description": ""}, "a3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..5 except [0,a1,a2])", "name": "a3", "description": ""}, "z3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a3+b3*i", "name": "z3", "description": ""}, "mz2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "abs(z2)^2", "name": "mz2", "description": ""}, "z1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a1+ b1*i", "name": "z1", "description": ""}, "a2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3-a1..3-a1)", "name": "a2", "description": ""}}, "ungrouped_variables": ["r12", "mz1", "mz2", "mz3", "a1", "a3", "a2", "b1", "b2", "b3", "z1", "z2", "z3"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "name": "Roots of a quartic real polynomial", "functions": {"ch": {"type": "number", "language": "jme", "definition": "if(round(a^2+b^2)|round(s),ch(a,s,random(r..t except 0),r,t),b)", "parameters": [["a", "number"], ["s", "number"], ["b", "number"], ["r", "number"], ["t", "number"]]}}, "showQuestionGroupNames": false, "parts": [{"prompt": "

Given  $\\displaystyle f(z) = \\simplify[std]{z ^ 4+ {( -2) * r12}*z ^ 3+ {mz1+mz2+4*re(z1)*re(z2)} * z^2 -{2*(re(z2)*mz1+re(z1)*mz2)}z+{mz1*mz2}}$, one of the following complex numbers is a root $z_1$ of the equation $f(z)=0$.

\n

Choose the correct value for $z_1$:[[0]]

", "stepsPenalty": 0, "scripts": {}, "gaps": [{"displayType": "radiogroup", "choices": ["

$\\simplify[std]{{a1}+{b1}i}$

", "

$\\simplify[std]{{z3}}$

"], "showCorrectAnswer": true, "displayColumns": 4, "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": true, "scripts": {}, "maxMarks": 0, "type": "1_n_2", "minMarks": 0, "variableReplacementStrategy": "originalfirst", "matrix": [1, 0], "marks": 0}], "type": "gapfill", "showCorrectAnswer": true, "steps": [{"showCorrectAnswer": true, "scripts": {}, "type": "information", "variableReplacementStrategy": "originalfirst", "prompt": "

Since you are given that $f(z)$ has a complex root $z_1$ and since $f(z)$ is a polynomial with real coefficients then the complex conjugate $\\overline{z_1}$ must also be a root.

\n

Since $(z-z_1)(z-\\overline{z_1})=(z^2-2\\operatorname{Re}(z)+|z_1|^2)$ we have that:\\[f(z)=(z^2-2\\operatorname{Re}(z)+|z_1|^2)(z^2+az+b)=\\simplify{z ^ 4+ {( -2) * r12}*z ^ 3+  {mz1+mz2+4*re(z1)*re(z2)} * z^2  -{2*(re(z2)*mz1+re(z1)*mz2)}z+{mz1*mz2}}\\] where $a$ and $b$ are real.

\n

Looking at the constant term we see that :

\n

\\[|z_1|^2b = \\var{mz1*mz2}\\]

\n

Hence $|z_1|^2$ divides $ \\var{mz1*mz2}$.

\n

An easy test to see if one of the complex numbers given is not a root is to see if its modulus squared does not divide $ \\var{mz1*mz2}$. If it does not divide then the other must be the root. 

", "variableReplacements": [], "marks": 0}], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"prompt": "

Write down the quadratic factor with real coefficients, $q_1(z)$, of $f(z)$ which has $z_1$ as a root:

\n

$q_1(z)=\\;$[[0]]

\n

Apart from $z_1$, $q_1(z)$ has another root $z_2$, which is also a root of $f(z)$.

\n

$z_2=\\;$[[1]]

", "stepsPenalty": 0, "scripts": {}, "gaps": [{"answer": "z^2-{2*a1}*z+{mz1}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "answersimplification": "std", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}, {"answer": "{a1}-{b1}i", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "answersimplification": "std", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "showCorrectAnswer": true, "steps": [{"showCorrectAnswer": true, "scripts": {}, "type": "information", "variableReplacementStrategy": "originalfirst", "prompt": "

If $z_1$ is a root then its conjugate $z_2$= $\\overline{z_1}$  is also a root.

", "variableReplacements": [], "marks": 0}], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"prompt": "

Since $q_1(z)$ is a factor of $f(z)$ the other roots are given by finding the other quadratic factor $q_2(z)$  of $f(z)=q_1(z)q_2(z)$

\n

$q_2(z)\\;=$[[0]]

\n

Find the roots of $q_2(z)$ and hence the remaining two roots $z_3,\\;z_4$ of $f(z)$

\n

$z_3=\\;$[[1]] (imaginary part negative)

\n

$z_4=\\;$[[2]] (imaginary part positive).

", "stepsPenalty": 0, "scripts": {}, "gaps": [{"answer": "z^2-{2*a2}*z+{mz2}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "answersimplification": "std", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}, {"answer": "{a2}-{b2}*i", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "answersimplification": "std", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}, {"answer": "{a2}+{b2}*i", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "answersimplification": "std", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "showCorrectAnswer": true, "steps": [{"showCorrectAnswer": true, "scripts": {}, "type": "information", "variableReplacementStrategy": "originalfirst", "prompt": "

$q_1(z)q_2(z)=f(z)$.

\n

Once you have found $q_1(z)$ then the easiest way to find $q_2(z)$ is to compare the terms in $z^3$ and the constant terms.

", "variableReplacements": [], "marks": 0}], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}], "statement": "

Given two complex numbers, find by inspection the one that is a root of a given quartic real polynomial $f(z)$ and hence find the other roots.

", "tags": ["checked2015", "MAS1602", "mas1602"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

15/07/2015:

\n

Added tags.

\n

25/08/2012:

\n

Copied question finding roots of a cubic in order to create new question finding roots of a quartic with 4 complex roots.

\n

Function ch finds the imaginary part of the complex number $z_3$ and ensures that $z_3$ is not a solution by insisting that $|z_3|^2$ does not divide the constant term of the polynomial. This is a simple way for the students to test to see which one of $z_1$ and $z_2$ is a solution.

\n

Added tags.

\n

Added description.

\n

Checked calculation.OK.

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

Given two complex numbers, find by inspection the one that is a root of a given quartic real polynomial and hence find the other roots. 

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

a) We use the method given in Show steps for part a).

\n

Note that $|\\var{z1}|^2=\\var{mz1}$ divides the constant term $\\var{mz1*mz2}$,

\n

but that $|\\var{z3}|^2=\\var{mz3}$ does not divides the constant term $\\var{mz1*mz2}$. 

\n

Hence $\\var{z1}$ is the root we are looking for.

\n

b) A quadratic factor of $f(z)$.

\n

Since $f(z)$ is a polynomial with real coefficients then if $z=z_1$ is a root we have that the conjugate $z=\\overline{z_1}$ is also a root.

\n

Hence the complex number $z_2=\\overline{\\var{z1}}=\\var{conj(z1)}$ is a root.

\n

Hence $q_1(z) = (z-(\\var{z1}))(z-(\\var{conj(z1)}))=\\simplify[std]{z^2-{2*a1}*z+{abs(z1)^2}}$ is a factor of $f(z)$.

\n

c)The other quadratic factor and the other roots.

\n

We have that $f(z)=q_1(z)q_2(z)$, where $q_1(z)$ is as above and we have to find the quadratic $q_2(z)=z^2+az+b$ with real coefficients $a$ and $b$.

\n

\\[\\begin{eqnarray*}f(z) &=& \\simplify[std]{z ^ 4+ {( -2) * r12}*z ^ 3+  {mz1+mz2+4*re(z1)*re(z2)} * z^2  -{2*(re(z2)*mz1+re(z1)*mz2)}z+{mz1*mz2}}\\\\&=&q_1(z)q_2(z)\\\\&=&(\\simplify[std]{z^2-{2*a1}*z+{mz1}})(z^2+az+b)\\\\&=&\\simplify[std]{z^4+(a-{2*a1})z^3+(b-{2*a1}*a+{mz1})*z^2+({mz1}a-{2*a1}b)*z+{mz1}*b}\\end{eqnarray*}\\]

\n

Identifying the constant terms and the coefficients of $z^3$ on both sides of this equation gives:

\n

$a=\\var{-2*a2},\\;\\;b=\\var{mz2}$

\n

Hence $q_2(z)=\\simplify[std]{z^2-{2*a2}*z+{mz2}}$

\n

You can then find the roots of this quadratic, giving the other roots of $f(z)$: 

\n

$z_3=\\simplify[std]{{a2}-{b2}*i}$   (negative imaginary part)

\n

$z_4=\\simplify[std]{{a2}+{b2}*i}$   (positive imaginary part)

\n

 

", "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/"}]}