// Numbas version: finer_feedback_settings {"name": "Luis's copy of 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": [{"variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"variableReplacementStrategy": "originalfirst", "gaps": [{"choices": ["

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

", "

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

"], "displayColumns": 4, "distractors": ["", ""], "scripts": {}, "maxMarks": 0, "matrix": [1, 0], "variableReplacementStrategy": "originalfirst", "minMarks": 0, "shuffleChoices": true, "variableReplacements": [], "displayType": "radiogroup", "showCorrectAnswer": true, "marks": 0, "type": "1_n_2"}], "variableReplacements": [], "stepsPenalty": 0, "showCorrectAnswer": true, "marks": 0, "scripts": {}, "type": "gapfill", "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]]

", "steps": [{"variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showCorrectAnswer": true, "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. 

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

", "steps": [{"variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

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

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

", "steps": [{"variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showCorrectAnswer": true, "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.

", "scripts": {}, "marks": 0, "type": "information"}]}], "name": "Luis's copy of Roots of a quartic real polynomial", "ungrouped_variables": ["r12", "mz1", "mz2", "mz3", "a1", "a3", "a2", "b1", "b2", "b3", "z1", "z2", "z3"], "variables": {"r12": {"description": "", "definition": "re(z1+z2)", "templateType": "anything", "name": "r12", "group": "Ungrouped variables"}, "z2": {"description": "", "definition": "a2+b2*i", "templateType": "anything", "name": "z2", "group": "Ungrouped variables"}, "b2": {"description": "", "definition": "random(1..6 except round(b1*a2/a1))", "templateType": "anything", "name": "b2", "group": "Ungrouped variables"}, "z1": {"description": "", "definition": "a1+ b1*i", "templateType": "anything", "name": "z1", "group": "Ungrouped variables"}, "mz1": {"description": "", "definition": "abs(z1)^2", "templateType": "anything", "name": "mz1", "group": "Ungrouped variables"}, "mz2": {"description": "", "definition": "abs(z2)^2", "templateType": "anything", "name": "mz2", "group": "Ungrouped variables"}, "mz3": {"description": "", "definition": "abs(z3)^2", "templateType": "anything", "name": "mz3", "group": "Ungrouped variables"}, "b1": {"description": "", "definition": "random(-6..6 except [0,-a1,a1])", "templateType": "anything", "name": "b1", "group": "Ungrouped variables"}, "a3": {"description": "", "definition": "random(-5..5 except [0,a1,a2])", "templateType": "anything", "name": "a3", "group": "Ungrouped variables"}, "a1": {"description": "", "definition": "random(-5..5 except 0)", "templateType": "anything", "name": "a1", "group": "Ungrouped variables"}, "b3": {"description": "", "definition": "ch(a3,mz1*mz2,random(-5..5 except 0),-5,5)", "templateType": "anything", "name": "b3", "group": "Ungrouped variables"}, "a2": {"description": "", "definition": "random(-3-a1..3-a1)", "templateType": "anything", "name": "a2", "group": "Ungrouped variables"}, "z3": {"description": "", "definition": "a3+b3*i", "templateType": "anything", "name": "z3", "group": "Ungrouped variables"}}, "preamble": {"css": "", "js": ""}, "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.

", "metadata": {"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. 

", "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"}, "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "functions": {"ch": {"parameters": [["a", "number"], ["s", "number"], ["b", "number"], ["r", "number"], ["t", "number"]], "definition": "if(round(a^2+b^2)|round(s),ch(a,s,random(r..t except 0),r,t),b)", "language": "jme", "type": "number"}}, "variable_groups": [], "question_groups": [{"questions": [], "pickQuestions": 0, "name": "", "pickingStrategy": "all-ordered"}], "showQuestionGroupNames": false, "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

 

", "type": "question", "tags": ["checked2015", "MAS1602", "mas1602"], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Luis Hernandez", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2870/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Luis Hernandez", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2870/"}]}