// Numbas version: finer_feedback_settings {"name": "Expanding binomial products", "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", ""], "variable_overrides": [[], [], []], "questions": [{"name": "Expanding a binomial product (monic factors)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "tags": ["binomial", "Binomial", "binomial product", "distributive law", "expanding", "Expanding", "factorisation", "Factorisation", "factors", "Factors", "monic", "quadratic"], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "
Expand and simplify the following.
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"b": {"name": "b", "group": "Ungrouped variables", "definition": "shuffle(-12..12 except 0)[0..4]", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "shuffle(-12..12 except 0)[0..4]", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "[1,1,1,1]", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "[1,1,1,1]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": "127"}, "ungrouped_variables": ["a", "b", "c", "d"], "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": "$\\simplify{(x+{a[0]})(x+{b[0]})}$ = [[0]]
\n\n", "stepsPenalty": "1", "steps": [{"type": "information", "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": "Method 1 (the distributive law)
\nWe expand $\\simplify[basic]{(x+{a[0]})(x+{b[0]})}$ one bracket at a time. Each term in the first bracket times the entire other bracket: $\\simplify[basic]{x(x+{b[0]})+{a[0]}(x+{b[0]})}$
\nThen we use the distributive law on each bracket: $\\simplify[basic, !collectnumbers]{x^2+{b[0]}x+{a[0]}x+{a[0]*b[0]}}$
\nAnd collect like terms: $\\simplify[basic, unitfactor]{x^2+{a[0]+b[0]}x+{a[0]*b[0]}}$
\nMethod 2 (FOIL)
\nMultiply the First terms in each bracket to get $x^2$, then the Outer terms to get $\\var{b[0]}x$, then the Inner terms to get $\\var{a[0]}x$, and then the Last terms to get $\\var{a[0]*b[0]}$. Now add them all together: $\\simplify[basic, unitfactor]{x^2+{a[0]+b[0]}x+{a[0]*b[0]}}$
"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "x^2+{a[0]+b[0]}x+{a[0]*b[0]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": ["(", ")"], "showStrings": false, "partialCredit": 0, "message": "Ensure you don't use brackets in your answer.
"}, "mustmatchpattern": {"pattern": "$v^2+`+-$n*$v+`+-$n", "partialCredit": 0, "message": "", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"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": "$\\simplify{(x+{a[1]})(x+{b[1]})}$ = [[0]]
\n\n", "stepsPenalty": "1", "steps": [{"type": "information", "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": "Method 1 (the distributive law)
\nWe expand $\\simplify[basic]{(x+{a[1]})(x+{b[1]})}$ one bracket at a time. Each term in the first bracket times the entire other bracket: $\\simplify[basic]{x(x+{b[1]})+{a[1]}(x+{b[1]})}$
\nThen we use the distributive law on each bracket: $\\simplify[basic, !collectnumbers]{x^2+{b[1]}x+{a[1]}x+{a[1]*b[1]}}$
\nAnd collect like terms: $\\simplify[basic, unitfactor]{x^2+{a[1]+b[1]}x+{a[1]*b[1]}}$
\nMethod 2 (FOIL)
\nMultiply the First terms in each bracket to get $x^2$, then the Outer terms to get $\\var{b[1]}x$, then the Inner terms to get $\\var{a[1]}x$, and then the Last terms to get $\\var{a[1]*b[1]}$. Now add them all together: $\\simplify[basic, unitfactor]{x^2+{a[1]+b[1]}x+{a[1]*b[1]}}$
\nEnsure you don't use brackets in your answer.
"}, "mustmatchpattern": {"pattern": "$v^2+`+-$n*$v+`+-$n", "partialCredit": 0, "message": "", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"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": "$\\simplify{(m+{a[2]})(m+{b[2]})}$ = [[0]]
\n\n", "stepsPenalty": "1", "steps": [{"type": "information", "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": "Method 1 (the distributive law)
\nWe expand $\\simplify[basic]{(m+{a[2]})(m+{b[2]})}$ one bracket at a time. Each term in the first bracket times the entire other bracket: $\\simplify[basic]{m(m+{b[2]})+{a[2]}(m+{b[2]})}$
\nThen we use the distributive law on each bracket: $\\simplify[basic, !collectnumbers]{m^2+{b[2]}m+{a[2]}m+{a[2]*b[2]}}$
\nAnd collect like terms: $\\simplify[basic, unitfactor]{m^2+{a[2]+b[2]}m+{a[2]*b[2]}}$
\nMethod 2 (FOIL)
\nMultiply the First terms in each bracket to get $m^2$, then the Outer terms to get $\\var{b[2]}m$, then the Inner terms to get $\\var{a[2]}m$, and then the Last terms to get $\\var{a[2]*b[2]}$. Now add them all together: $\\simplify[basic, unitfactor]{m^2+{a[2]+b[2]}m+{a[2]*b[2]}}$
"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "m^2+{a[2]+b[2]}m+{a[2]*b[2]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": ["(", ")"], "showStrings": false, "partialCredit": 0, "message": "Ensure you don't use brackets in your answer.
"}, "mustmatchpattern": {"pattern": "$v^2+`+-$n*$v+`+-$n", "partialCredit": 0, "message": "", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "m", "value": ""}]}], "sortAnswers": false}, {"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": "$\\simplify{(t+{a[3]})(t+{b[3]})}$ = [[0]]
\n\n", "stepsPenalty": "1", "steps": [{"type": "information", "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": "Method 1 (the distributive law)
\nWe expand $\\simplify[basic]{(t+{a[3]})(t+{b[3]})}$ one bracket at a time. Each term in the first bracket times the entire other bracket: $\\simplify[basic]{t(t+{b[3]})+{a[3]}(t+{b[3]})}$
\nThen we use the distributive law on each bracket: $\\simplify[basic, !collectnumbers]{t^2+{b[3]}t+{a[3]}t+{a[3]*b[3]}}$
\nAnd collect like terms: $\\simplify[basic, unitfactor]{t^2+{a[3]+b[3]}t+{a[3]*b[3]}}$
\nMethod 2 (FOIL)
\nMultiply the First terms in each bracket to get $t^2$, then the Outer terms to get $\\var{b[3]}t$, then the Inner terms to get $\\var{a[3]}t$, and then the Last terms to get $\\var{a[3]*b[3]}$. Now add them all together: $\\simplify[basic, unitfactor]{t^2+{a[3]+b[3]}t+{a[3]*b[3]}}$
"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "t^2+{a[3]+b[3]}t+{a[3]*b[3]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": ["(", ")"], "showStrings": false, "partialCredit": 0, "message": "Ensure you don't use brackets in your answer.
"}, "mustmatchpattern": {"pattern": "$v^2+`+-$n*$v+`+-$n", "partialCredit": 0, "message": "", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "t", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Expanding a binomial product (difference of two squares, perfect squares)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "tags": ["binomial", "Binomial", "binomial product", "difference of two squares", "distributive law", "expanding", "Expanding", "factorisation", "Factorisation", "factors", "Factors", "monic", "perfect square", "quadratic"], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Expand and simplify the following.
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "shuffle(-12..12 except 0)[0..2]+random([neg,pos], [pos,neg])", "description": "", "templateType": "anything", "can_override": false}, "neg": {"name": "neg", "group": "Ungrouped variables", "definition": "random(-12..-1)", "description": "", "templateType": "anything", "can_override": false}, "pos": {"name": "pos", "group": "Ungrouped variables", "definition": "random(1..12 except -neg)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": "127"}, "ungrouped_variables": ["a", "neg", "pos"], "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": "$\\simplify{(x+{a[0]})(x-{a[0]})}$ = [[0]]
", "stepsPenalty": "1", "steps": [{"type": "information", "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": "Method 1 (difference of two squares)
\nNotice that the product will expand to be a difference of two squares. Therefore, we can square the first term and subtract the square of the second term (see the other methods below if you aren't sure why):
\n$\\simplify{(x+{a[0]})(x-{a[0]})}=\\simplify{x^2-{a[0]*a[0]}}$
\nMethod 2 (the distributive law)
\nWe expand $\\simplify[basic]{(x+{a[0]})(x-{a[0]})}$ one bracket at a time. Each term in the first bracket times the entire other bracket: $\\simplify[basic]{x(x-{a[0]})+{a[0]}(x-{a[0]})}$
\nThen we use the distributive law on each bracket: $\\simplify[basic, !collectnumbers]{x^2-{a[0]}x+{a[0]}x-{a[0]*a[0]}}$
\nAnd collect like terms: $\\simplify[basic, unitfactor]{x^2-{a[0]*a[0]}}$
\nMethod 3 (FOIL)
\nMultiply the First terms in each bracket to get $x^2$, then the Outer terms to get $\\var{-a[0]}x$, then the Inner terms to get $\\var{a[0]}x$, and then the Last terms to get $-\\var{a[0]*a[0]}$. Now add them all together: $\\simplify[basic, unitfactor]{x^2-{a[0]*a[0]}}$
"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "x^2-{a[0]*a[0]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": ["(", ")"], "showStrings": false, "partialCredit": 0, "message": "Ensure you don't use brackets in your answer.
"}, "mustmatchpattern": {"pattern": "$v^2+`+-$n*$v+`+-$n `| $v^2+`+-$n", "partialCredit": 0, "message": "", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"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": "$\\simplify{(r+{a[3]})(r+{a[3]})}$ = [[0]]
", "stepsPenalty": "1", "steps": [{"type": "information", "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": "Method 1 (perfect square)
\nNotice that $\\simplify{(r+{a[3]})(r+{a[3]})}$ is a perfect square. Therefore, we can square the first term $r$, double the product of the two terms $r$ and $\\var{a[3]}$, then square the last term $\\var{a[3]}$, add them all together (see the other methods below if you aren't sure why):
\n$\\simplify{(r+{a[3]})(r+{a[3]})}=\\simplify{r^2+{2*a[3]}r+{a[3]*a[3]}}$
\nMethod 2 (the distributive law)
\nWe expand $\\simplify[basic]{(r+{a[3]})(r+{a[3]})}$ one bracket at a time. Each term in the first bracket times the entire other bracket: $\\simplify[basic]{r(r+{a[3]})+{a[3]}(r+{a[3]})}$
\nThen we use the distributive law on each bracket: $\\simplify[basic, !collectnumbers]{r^2+{a[3]}r+{a[3]}r+{a[3]*a[3]}}$
\nAnd collect like terms: $\\simplify[basic, unitfactor]{r^2+{a[3]+a[3]}r+{a[3]*a[3]}}$
\nMethod 3 (FOIL)
\nMultiply the First terms in each bracket to get $r^2$, then the Outer terms to get $\\var{a[3]}r$, then the Inner terms to get $\\var{a[3]}r$, and then the Last terms to get $\\var{a[3]*a[3]}$. Now add them all together: $\\simplify[basic, unitfactor]{r^2+{a[3]+a[3]}r+{a[3]*a[3]}}$
"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "r^2+{2*a[3]}r+{a[3]*a[3]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": ["(", ")"], "showStrings": false, "partialCredit": 0, "message": "Ensure you don't use brackets in your answer.
"}, "mustmatchpattern": {"pattern": "$v^2+`+-$n*$v+`+-$n", "partialCredit": 0, "message": "", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "r", "value": ""}]}], "sortAnswers": false}, {"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": "$\\simplify{(x+{a[2]})^2}$ = [[0]]
", "stepsPenalty": "1", "steps": [{"type": "information", "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": "It is important to realise that $\\simplify{(x+{a[2]})^2}=\\simplify[basic]{(x+{a[2]})(x+{a[2]})}$. Recall that squaring something is multiplying it by itself.
\n\n
Method 1 (perfect square)
\nNotice that $\\simplify{(x+{a[3]})(x+{a[3]})}$ is a perfect square. Therefore, we can square the first term $r$, double the product of the two terms $r$ and $\\var{a[3]}$, then square the last term $\\var{a[3]}$, add them all together (see the other methods below if you aren't sure why):
\n$\\simplify{(x+{a[3]})(x+{a[3]})}=\\simplify{x^2+{2*a[3]}x+{a[3]*a[3]}}$
\nMethod 2 (the distributive law)
\nWe expand $\\simplify[basic]{(x+{a[3]})(x+{a[3]})}$ one bracket at a time. Each term in the first bracket times the entire other bracket: $\\simplify[basic]{x(x+{a[3]})+{a[3]}(x+{a[3]})}$
\nThen we use the distributive law on each bracket: $\\simplify[basic, !collectnumbers]{x^2+{a[3]}x+{a[3]}x+{a[3]*a[3]}}$
\nAnd collect like terms: $\\simplify[basic, unitfactor]{x^2+{a[3]+a[3]}x+{a[3]*a[3]}}$
\nMethod 3 (FOIL)
\nMultiply the First terms in each bracket to get $x^2$, then the Outer terms to get $\\var{a[3]}x$, then the Inner terms to get $\\var{a[3]}x$, and then the Last terms to get $\\var{a[3]*a[3]}$. Now add them all together: $\\simplify[basic, unitfactor]{x^2+{a[3]+a[3]}x+{a[3]*a[3]}}$
"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "x^2+{2*a[2]}x+{a[2]*a[2]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": ["(", ")"], "showStrings": false, "partialCredit": 0, "message": "Ensure you don't use brackets in your answer.
"}, "mustmatchpattern": {"pattern": "$v^2+`+-$n*$v+`+-$n", "partialCredit": 0, "message": "", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Expanding a binomial product (non-monic factors)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "tags": ["binomial", "Binomial", "binomial product", "distributive law", "expanding", "Expanding", "factorisation", "Factorisation", "factors", "Factors", "non-monic", "quadratic"], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Expand and simplify the following.
", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "shuffle(-12..12 except [0,1])[0..2]", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "shuffle(-12..12 except 0)[0..2]", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "shuffle(-12..12 except 0)[0..2]", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "shuffle(-12..12 except [0,1])[0..2]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": "127"}, "ungrouped_variables": ["a", "b", "c", "d"], "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": "$\\simplify[basic]{({c[0]}x+{a[0]})({d[0]}x+{b[0]})}$ = [[0]]
\n\n", "stepsPenalty": "1", "steps": [{"type": "information", "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": "Method 1 (the distributive law)
\nWe expand $\\simplify[basic]{({c[0]}x+{a[0]})({d[0]}x+{b[0]})}$ one bracket at a time. Each term in the first bracket times the entire other bracket: $\\simplify[basic]{{c[0]}x({d[0]}x+{b[0]})+{a[0]}({d[0]}x+{b[0]})}$
\nThen we use the distributive law on each bracket: $\\simplify[basic, !collectnumbers]{{c[0]*d[0]}x^2+{c[0]*b[0]}x+{d[0]*a[0]}x+{a[0]*b[0]}}$
\nAnd collect like terms: $\\simplify[basic, unitfactor]{{c[0]*d[0]}x^2+{d[0]*a[0]+c[0]*b[0]}x+{a[0]*b[0]}}$
\nMethod 2 (FOIL)
\nMultiply the First terms in each bracket to get $\\var{c[0]*d[0]}x^2$, then the Outer terms to get $\\var{c[0]*b[0]}x$, then the Inner terms to get $\\var{d[0]*a[0]}x$, and then the Last terms to get $\\var{a[0]*b[0]}$. Now add them all together: $\\simplify[basic, unitfactor]{{c[0]*d[0]}x^2+{d[0]*a[0]+c[0]*b[0]}x+{a[0]*b[0]}}$
"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{c[0]*d[0]}x^2+{d[0]*a[0]+c[0]*b[0]}x+{a[0]*b[0]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": ["(", ")"], "showStrings": false, "partialCredit": 0, "message": "Ensure you don't use brackets in your answer.
"}, "mustmatchpattern": {"pattern": "`+-$n*$v^2+`+-$n*$v+`+-$n", "partialCredit": 0, "message": "", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"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": "$\\simplify[basic]{({c[1]}x+{a[1]})({d[1]}x+{b[1]})}$ = [[0]]
\n\n", "stepsPenalty": "1", "steps": [{"type": "information", "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": "Method 1 (the distributive law)
\nWe expand $\\simplify[basic]{({c[1]}x+{a[1]})({d[1]}x+{b[1]})}$ one bracket at a time. Each term in the first bracket times the entire other bracket: $\\simplify[basic]{{c[1]}x({d[1]}x+{b[1]})+{a[1]}({d[1]}x+{b[1]})}$
\nThen we use the distributive law on each bracket: $\\simplify[basic, !collectnumbers]{{c[1]*d[1]}x^2+{c[1]*b[1]}x+{d[1]*a[1]}x+{a[1]*b[1]}}$
\nAnd collect like terms: $\\simplify[basic, unitfactor]{{c[1]*d[1]}x^2+{d[1]*a[1]+c[1]*b[1]}x+{a[1]*b[1]}}$
\nMethod 2 (FOIL)
\nMultiply the First terms in each bracket to get $\\var{c[1]*d[1]}x^2$, then the Outer terms to get $\\var{c[1]*b[1]}x$, then the Inner terms to get $\\var{d[1]*a[1]}x$, and then the Last terms to get $\\var{a[1]*b[1]}$. Now add them all together: $\\simplify[basic, unitfactor]{{c[1]*d[1]}x^2+{d[1]*a[1]+c[1]*b[1]}x+{a[1]*b[1]}}$
"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{c[1]*d[1]}x^2+{d[1]*a[1]+c[1]*b[1]}x+{a[1]*b[1]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": ["(", ")"], "showStrings": false, "partialCredit": 0, "message": "Ensure you don't use brackets in your answer.
"}, "mustmatchpattern": {"pattern": "`+-$n*$v^2+`+-$n*$v+`+-$n", "partialCredit": 0, "message": "", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": false, "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": false, "typeendtoleave": false, "startpassword": "", "autoSubmit": true, "allowAttemptDownload": false, "downloadEncryptionKey": "", "showresultspage": "oncompletion"}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"enterreviewmodeimmediately": true, "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview", "allowrevealanswer": true, "intro": "", "end_message": "", "results_options": {"printquestions": true, "printadvice": true}, "feedbackmessages": [], "reviewshowexpectedanswer": true, "showanswerstate": true, "reviewshowfeedback": true, "showactualmark": true, "showtotalmark": true, "reviewshowscore": true, "reviewshowadvice": true}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "extensions": [], "custom_part_types": [], "resources": []}