// Numbas version: finer_feedback_settings {"name": "Maria'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": [{"name": "Maria's copy of Roots of a quartic real polynomial", "tags": [], "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.
", "licence": "Creative Commons Attribution 4.0 International"}, "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.
", "advice": "a) We use the method given in Show steps for part a).
\nNote that $|\\var{z1}|^2=\\var{mz1}$ divides the constant term $\\var{mz1*mz2}$,
\nbut that $|\\var{z3}|^2=\\var{mz3}$ does not divides the constant term $\\var{mz1*mz2}$.
\nHence $\\var{z1}$ is the root we are looking for.
\nb) A quadratic factor of $f(z)$.
\nSince $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.
\nHence the complex number $z_2=\\overline{\\var{z1}}=\\var{conj(z1)}$ is a root.
\nHence $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)$.
\nc)The other quadratic factor and the other roots.
\nWe 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*}\\]
\nIdentifying the constant terms and the coefficients of $z^3$ on both sides of this equation gives:
\n$a=\\var{-2*a2},\\;\\;b=\\var{mz2}$
\nHence $q_2(z)=\\simplify[std]{z^2-{2*a2}*z+{mz2}}$
\nYou 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", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "extensions": [], "variables": {"b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(-6..6 except [0,-a1,a1])", "description": "", "templateType": "anything"}, "a3": {"name": "a3", "group": "Ungrouped variables", "definition": "random(-5..5 except [0,a1,a2])", "description": "", "templateType": "anything"}, "z1": {"name": "z1", "group": "Ungrouped variables", "definition": "a1+ b1*i", "description": "", "templateType": "anything"}, "z2": {"name": "z2", "group": "Ungrouped variables", "definition": "a2+b2*i", "description": "", "templateType": "anything"}, "b2": {"name": "b2", "group": "Ungrouped variables", "definition": "random(1..6 except round(b1*a2/a1))", "description": "", "templateType": "anything"}, "r12": {"name": "r12", "group": "Ungrouped variables", "definition": "re(z1+z2)", "description": "", "templateType": "anything"}, "mz3": {"name": "mz3", "group": "Ungrouped variables", "definition": "abs(z3)^2", "description": "", "templateType": "anything"}, "z3": {"name": "z3", "group": "Ungrouped variables", "definition": "a3+b3*i", "description": "", "templateType": "anything"}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "random(-3-a1..3-a1)", "description": "", "templateType": "anything"}, "b3": {"name": "b3", "group": "Ungrouped variables", "definition": "ch(a3,mz1*mz2,random(-5..5 except 0),-5,5)", "description": "", "templateType": "anything"}, "mz2": {"name": "mz2", "group": "Ungrouped variables", "definition": "abs(z2)^2", "description": "", "templateType": "anything"}, "mz1": {"name": "mz1", "group": "Ungrouped variables", "definition": "abs(z1)^2", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["r12", "mz1", "mz2", "mz3", "a1", "a3", "a2", "b1", "b2", "b3", "z1", "z2", "z3"], "variable_groups": [], "functions": {"ch": {"parameters": [["a", "number"], ["s", "number"], ["b", "number"], ["r", "number"], ["t", "number"]], "type": "number", "language": "jme", "definition": "if(round(a^2+b^2)|round(s),ch(a,s,random(r..t except 0),r,t),b)"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "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$.
\nChoose the correct value for $z_1$:[[0]]
", "stepsPenalty": 0, "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "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.
\nSince $(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.
\nLooking at the constant term we see that :
\n\\[|z_1|^2b = \\var{mz1*mz2}\\]
\nHence $|z_1|^2$ divides $ \\var{mz1*mz2}$.
\nAn 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.
"}], "gaps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minMarks": 0, "maxMarks": 0, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 4, "showCellAnswerState": true, "choices": ["$\\simplify[std]{{a1}+{b1}i}$
", "$\\simplify[std]{{z3}}$
"], "matrix": [1, 0], "distractors": ["", ""]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "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]]
\nApart 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, "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "If $z_1$ is a root then its conjugate $z_2$= $\\overline{z_1}$ is also a root.
"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "z^2-{2*a1}*z+{mz1}", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": [{"name": "z", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a1}-{b1}i", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": []}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "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]]
\nFind 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, "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "$q_1(z)q_2(z)=f(z)$.
\nOnce 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.
"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "z^2-{2*a2}*z+{mz2}", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": [{"name": "z", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a2}-{b2}*i", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a2}+{b2}*i", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": []}], "sortAnswers": false}], "type": "question", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}