// Numbas version: finer_feedback_settings {"name": "Cubics: Calculating Coefficients", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Cubics: Calculating Coefficients", "tags": [], "metadata": {"description": "

Calculating two unknown coefficients of a cubic expression when given two of the expression's linear factors.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

If $\\simplify{{a1}x+{b1}}$ and $\\simplify{{a2}x+{b2}}$ are factors of \\[\\simplify{{a1*a2*a3}x^3+m*x^2+n*x+{b1*b2*b3}},\\]

\n

find the values of $m$ and $n$.

", "advice": "

In order to find the values of $m$ and $n$, we want to find the remaining factor of the polynomial, which can be done without knowing these two terms. 

\n

Let us first write the polynomial as a product of the factors we already know, and the unknown factor $(ax+b)$:

\n

\\[\\simplify{{a1*a2*a3}x^3+m*x^2+n*x+{b1*b2*b3}} =(ax+b)(\\simplify{{a1}x+{b1}})(\\simplify{{a2}x+{b2}}).\\]

\n

Now, the coefficient of the $x^3$ term is the product of the three $x$-coefficients from the linear factors: \\[ \\begin{split} \\simplify{{a1*a2*a3}} &\\,= \\simplify{{a1*a2}a} \\\\ \\ \\implies \\quad a &\\,=\\var{a3}.\\end{split}\\]

\n

Similarly, the constant term is the product of the three constants from the linear factors: \\[ \\begin{split} \\simplify{{b1*b2*b3}} &\\,= \\simplify{{b1*b2}b} \\\\ \\implies \\quad b &\\,=\\var{b3}. \\end{split} \\]

\n

Therefore, 

\n

\\[\\simplify{{a1*a2*a3}x^3+m*x^2+n*x+{b1*b2*b3}} =(\\simplify{{a3}x+{b3}})(\\simplify{{a1}x+{b1}})(\\simplify{{a2}x+{b2}}).\\]

\n

If we now expand the right-hand side of this equation, we can compare coefficients to find the values of $m$ and $m$:

\n

\\[ \\begin{split} \\simplify{{a1*a2*a3}x^3+m*x^2+n*x+{b1*b2*b3}} &\\,=(\\simplify{{a3}x+{b3}})(\\simplify{{a1}x+{b1}})(\\simplify{{a2}x+{b2}}) \\\\ &\\,=(\\simplify{{a3}x+{b3}})(\\simplify{{a1*a2}x^2+{a1*b2+a2*b1}x+{b1*b2}}) \\\\ &\\,= \\simplify[all,!collectNumbers,!cancelTerms]{{a3}x({a1*a2}x^2+{a1*b2+a2*b1}x+{b1*b2})+{b3}({a1*a2}x^2+{a1*b2+a2*b1}x+{b1*b2})} \\\\ &\\,=\\simplify[all,!collectNumbers,!cancelTerms]{{a3*a1*a2}x^3+{a3*a1*b2+a3*a2*b1}x^2+{a3*b1*b2} + {b3*a1*a2}x^2+{b3*a1*b2+b3*a2*b1}x+{b3*b1*b2}} \\\\ &\\,= \\simplify{{a1*a2*a3}x^3+{a1*a2*b3+a1*b2*a3+b1*a2*a3}x^2+{a1*b2*b3+b1*a2*b3+b1*b2*a3}x+{b1*b2*b3}}. \\end{split}\\]

\n

Therefore, 

\n

\\[m=\\simplify{{a1*a2*b3+a1*b2*a3+b1*a2*a3}},\\quad n=\\simplify{{a1*b2*b3+b1*a2*b3+b1*b2*a3}}.\\]

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything", "can_override": false}, "a3": {"name": "a3", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "b2": {"name": "b2", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "b3": {"name": "b3", "group": "Ungrouped variables", "definition": "random(-5..5 except [0,b1,b2])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a1", "a2", "a3", "b1", "b2", "b3"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$m$ = [[0]]

\n

 $n$ = [[1]]

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a1*a2*b3+a1*b2*a3+b1*a2*a3}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": true, "customName": "Gap 1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a1*b2*b3+b1*a2*b3+b1*b2*a3}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}]}], "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}