// Numbas version: finer_feedback_settings {"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}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Expanding a binomial product (difference of two squares, perfect squares)", "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": {}, "extensions": [], "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)

\n

Notice 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]}}$

\n

Method 2 (the distributive law)

\n

We 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]})}$

\n

Then we use the distributive law on each bracket: $\\simplify[basic, !collectnumbers]{x^2-{a[0]}x+{a[0]}x-{a[0]*a[0]}}$

\n

And collect like terms: $\\simplify[basic, unitfactor]{x^2-{a[0]*a[0]}}$

\n

Method 3 (FOIL)

\n

Multiply 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)

\n

Notice 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]}}$

\n

Method 2 (the distributive law)

\n

We 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]})}$

\n

Then we use the distributive law on each bracket: $\\simplify[basic, !collectnumbers]{r^2+{a[3]}r+{a[3]}r+{a[3]*a[3]}}$

\n

And collect like terms: $\\simplify[basic, unitfactor]{r^2+{a[3]+a[3]}r+{a[3]*a[3]}}$

\n

Method 3 (FOIL)

\n

Multiply 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)

\n

Notice 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]}}$

\n

Method 2 (the distributive law)

\n

We 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]})}$

\n

Then we use the distributive law on each bracket: $\\simplify[basic, !collectnumbers]{x^2+{a[3]}x+{a[3]}x+{a[3]*a[3]}}$

\n

And collect like terms: $\\simplify[basic, unitfactor]{x^2+{a[3]+a[3]}x+{a[3]*a[3]}}$

\n

Method 3 (FOIL)

\n

Multiply 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", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}