// Numbas version: exam_results_page_options {"percentPass": 0, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questions": [{"name": "Expansion of brackets", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}], "tags": ["brackets", "expanding brackets", "expansion of brackets", "simplifying algebraic expressions", "simplifying expressions", "taxonomy"], "metadata": {"description": "

This question is made up of 10 exercises to practice the multiplication of brackets by a single term.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Expand the expressions below by multiplying each of the terms inside the brackets by the term outside. Give each answer in its simplest form.

", "advice": "

Expand brackets using the general formula $\\displaystyle a(x+c)=ax+ac$. This means we multiply each term inside the brackets by the term outside the brackets.

\n

It is easy to forget that the sign outside the brackets also needs to be involved in the multiplication so remember that when two of the same sign are multiplied, the resultant term is positive and when opposite signs are multiplied, the result is negative.

\n

a)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[1]}({a[2]}x+{a[3]})}&=
\\simplify[!collectNumbers]{({a[1]}{a[2]})x+({a[1]}{a[3]})}\\\\&
=\\simplify{{a[1]}*{a[2]}x+{a[1]}{a[3]}}\\text{.}
\\end{align}
\\]

\n

b)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[4]}({a[5]}x+{a[6]})}&=
\\simplify[!collectNumbers]{{a[4]}{a[5]}x+{a[4]}{a[6]}}\\\\&=
\\simplify{{a[4]}*{a[5]}x+{a[4]}{a[6]}}\\text{.}
\\end{align}
\\]

\n

c)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[7]}({a[8]}x^2+{a[9]}y)}&=
\\simplify[!collectNumbers]{{a[7]}{a[8]}x^2+{a[7]}{a[9]}y}\\\\&=
\\simplify{{a[7]}*{a[8]}x^2+{a[7]}*{a[9]}y}\\text{.}
\\end{align}
\\]

\n

d)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[10]}({a[11]}x^2+{a[12]}y)}&=
\\simplify[!collectNumbers]{{a[10]}{a[11]}x^2+{a[10]}{a[12]}y}\\\\&=
\\simplify{{a[10]}*{a[11]}x^2+{a[10]}*{a[12]}y}\\text{.}
\\end{align}
\\]

\n

e)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[13]}x({a[14]}x^2+{a[15]}x+{a[16]})}&=
\\simplify[!collectNumbers]{{a[13]}x{a[14]}x^2+{a[13]}x{a[15]}x+{a[13]}x{a[16]}}\\\\&=
\\simplify{{a[13]}{a[14]}x^3+{a[13]}{a[15]}x^2+{a[13]}{a[16]}x}\\text{.}
\\end{align}
\\]

\n

f)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[17]}x({a[18]}x^2+{a[19]}x+{a[20]})}&=
\\simplify[!collectNumbers]{{a[17]}x{a[18]}x^2+{a[17]}x{a[19]}x+{a[17]}x{a[20]}}\\\\&=
\\simplify{{a[17]}{a[18]}x^3+{a[17]}{a[19]}x^2+{a[17]}{a[20]}x}\\text{.}
\\end{align}
\\]

\n


g)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[21]}x({a[22]}x^2+{a[23]}x)+{a[24]}x^2+{a[25]}x^3}&=
\\simplify[!collectNumbers]{x^2({a[21]}{a[23]})+x^2{a[24]}+x^3({a[21]}{a[22]})+x^3{a[25]}}\\\\&=
\\simplify[!collectNumbers]{x^2({a[21]}{a[23]}+{a[24]})+x^3({a[21]}{a[22]}+{a[25]})}\\\\&=
\\simplify{x^2({a[21]}{a[23]}+{a[24]})+x^3({a[21]}{a[22]}+{a[25]})}\\text{.}
\\end{align}
\\]

\n

h)

\n

\\[
\\begin{align}
\\simplify[terms]{({a[26]}x^2+{a[27]}x^3)+{a[28]}x({a[29]}x^2+{a[30]}x)}&=
\\simplify[!collectNumbers]{x^2({a[26]})+x^2({a[28]}{a[30]})+x^3({a[28]}{a[29]})+x^3({a[27]})}\\\\&=
\\simplify[!collectNumbers]{x^2({a[26]}+{a[28]}{a[30]})+x^3({a[28]}{a[29]}+{a[27]})}\\\\&=
\\simplify{x^2({a[26]}+{a[28]}{a[30]})+x^3({a[28]}{a[29]}+{a[27]})}\\text{.}
\\end{align}
\\]

\n

i)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[31]}({a[32]}x+{a[33]}y)+{a[34]}x({a[42]}+{a[35]}y)}&=
\\simplify[!collectNumbers]{({a[31]}{a[32]})x+({a[34]}{a[42]})x+{a[31]}{a[33]}y+{a[34]}{a[35]}x*y}\\\\&=
\\simplify[!collectNumbers]{({a[31]}{a[32]}+{a[34]}{a[42]})x+{a[31]}{a[33]}y+{a[34]}{a[35]}x*y}\\\\&=
\\simplify{({a[31]}{a[32]}+{a[34]}{a[42]})x+{a[31]}{a[33]}y+{a[34]}{a[35]}x*y}\\text{.}
\\end{align}
\\]

\n

j)

\n

\\[
\\begin{align}
\\simplify[terms]{{a[36]}a^2({a[37]}+{a[38]}b)+{a[39]}b^2({a[40]}a+{a[41]}b)}&=
\\simplify[!collectNumbers]{{a[37]}{a[36]}a^2+{a[38]}{a[36]}a^2b+{a[40]}{a[39]}a*b^2+{a[39]}{a[41]}b^3}\\\\&=
\\simplify{{a[37]}{a[36]}a^2+{a[38]}{a[36]}a^2b+{a[40]}{a[39]}a*b^2+{a[39]}{a[41]}b^3}\\text{.}
\\end{align}
\\]

", "rulesets": {"terms": ["all", "!collectNumbers", "!unitFactor", "!noLeadingMinus"]}, "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "repeat(random(-10..10 except [-1,0,1] ),50)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a"], "variable_groups": [], "functions": {}, "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": "

$\\simplify{{a[1]}({a[2]}x+{a[3]})}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[1]*a[2]}x+{a[1]*a[3]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "x*(`+-$n) + `+-$n", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[4]}({a[5]}x+{a[6]})}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[4]*a[5]}x+{a[4]*a[6]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n*x + `+-$n", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[7]}({a[8]}x^2+{a[9]}y)}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[7]*a[8]}x^2+{a[7]*a[9]}y", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n*x^2 + `+-$n*y", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[10]}({a[11]}x^2+{a[12]}y)}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[10]*a[11]}x^2+{a[10]*a[12]}y", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n*x^2 + `+-$n*y", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[13]}x({a[14]}x^2+{a[15]}x+{a[16]})}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[13]*a[14]}x^3+{a[13]*a[15]}x^2+{a[13]*a[16]}x", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n*x^3 + `+-$n*x^2 + `+-$n*x", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[17]}x({a[18]}x^2+{a[19]}x+{a[20]})}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[17]*a[18]}x^3+{a[17]*a[19]}x^2+{a[17]*a[20]}x", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n`?*x^3 + `+-$n`?*x^2 + `+-$n`?*x", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[21]}x({a[22]}x^2+{a[23]}x)+{a[24]}x^2+{a[25]}x^3}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "x^2*{a[21]*a[23]+a[24]}+x^3*{a[21]*a[22]+a[25]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "x^2*`+-$n`? + x^3*`+-$n`?", "partialCredit": 0, "message": "It doesn't look like you've expanded - make sure you don't use any brackets in your answer.", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{({a[26]}x^2+{a[27]}x^3)+{a[28]}x({a[29]}x^2+{a[30]}x)}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "x^2*{a[26]+a[28]*a[30]} + x^3*{a[28]*a[29]+a[27]}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "x^2*`+-$n`? + x^3*`+-$n`?", "partialCredit": 0, "message": "It doesn't look like you've expanded - make sure you don't use any brackets in your answer.", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[31]}({a[32]}x+{a[33]}y)+{a[34]}x({a[42]}+{a[35]}y)}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[31]*a[32]+a[34]*a[42]}x+{a[31]*a[33]}y+{a[34]*a[35]}x*y", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "x*(`+-$n) + y*(`+-$n) + x*y*(`+-$n)", "partialCredit": 0, "message": "", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\simplify{{a[36]}a^2({a[37]}+{a[38]}b)+{a[39]}b^2({a[40]}a+{a[41]}b)}=$ [[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{a[37]*a[36]}a^2+{a[38]*a[36]}a^2b+{a[40]*a[39]}a*b^2+{a[39]*a[41]}b^3", "answerSimplification": "basic", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "mustmatchpattern": {"pattern": "`+-$n`?*a^2 + `+-$n`?*a^2*b + `+-$n`?*a*b^2 + `+-$n`?*b^3", "partialCredit": 0, "message": "

It doesn't look like you've expanded - make sure you don't use any brackets in your answer.

", "nameToCompare": ""}, "valuegenerators": [{"name": "a", "value": ""}, {"name": "b", "value": ""}]}], "sortAnswers": false}]}, {"name": "Create an algebraic expression from a word problem, simplify, and evaluate", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Bradley Bush", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1521/"}], "tags": ["algebraic expressions", "collect terms", "create algebraic expressions", "simplify algebraic expressions", "simplifying algebraic expressions", "taxonomy"], "metadata": {"description": "

Given a description in words of the costs of some items in terms of an unknown cost, write down an expression for the total cost of a selection of items. Then simplify the expression, and finally evaluate it at a given point.

\n

The word problem is about the costs of sweets in a sweet shop.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

{pname} eats a lot of sweets. You are trying to work out the cost of the sweets that {pname} ate last week.

\n

{pname} ate $\\var{a1}$ packets of lollipops, $\\var{b1}$ packets of toffee and $\\simplify{{c1}}$ packets of jelly sweets.

\n

You know that a packet of toffee costs $£1$ more than a packet of lollipops, and a packet of jelly sweets costs half as much as a packet of toffees.

", "advice": "

a)

\n

We are told that the price of a packet of lollipops is represented by the letter $x$.

\n

A packet of toffee costs $£1$ more than a packet of lollipops, i.e. $x+1$.

\n

A packet of jelly sweets costs half as much as a packet of toffee, so $\\frac{1}{2}(x+1)$.

\n

b)

\n

To find the total cost, multiply the expressions above for the cost of each kind of sweet by the number of packets eaten, and add them together.

\n

Without simplifying, we obtain:

\n

\\begin{align}
\\text{Cost} &= \\simplify[]{{a1}x+{b1}(x+1) + {c1}*(1/2)*(x+1)} \\\\
&= \\simplify[]{{a1}x+{b1}(x+1) + {c1/2}*(x+1)}
\\text{.}
\\end{align}

\n

c)

\n

The first step in simplifying this expression is to expand both sets of brackets:

\n

\\begin{align}
\\simplify[]{ {a1}x + {b1}(x+1) + {c1/2}*(x+1)} &= \\simplify[]{ {a1}x + {b1}x + {b1}*1 + {c1/2}x + {c1/2}*1} \\\\
&= \\simplify[] { {a1}x + {b1}x + {b1} + {c1/2}x + {c1/2} } \\text{.}
\\end{align}

\n

Finally, collect like terms:

\n

\\begin{align}
\\simplify[] { {a1}x + {b1}x + {b1} + {c1/2}x + {c1/2} } &= \\simplify[]{ {a1+b1+c1/2}x + {b1+c1/2} } \\text{.}
\\end{align}

\n

\n

d)

\n

Once we know that the price of a packet of lollipops is $£2$, we can substitute this for $x$ in the equation above.

\n

\\begin{align}
\\text{Cost}&=\\simplify{ {a1+b1+c1/2}x+{b1+c1/2} }\\\\
&=\\var{a1+b1+c1/2} \\times 2+\\var{b1+c1/2} \\\\
&=\\var{(a1+b1+c1/2)*2+b1+c1/2} \\text{.}
\\end{align}

\n

So {pname} spent $£\\var{total}$ on sweets last week.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"b1": {"name": "b1", "group": "Number of packets eaten", "definition": "random(2..10 except a1)", "description": "

Number of packets of toffee eaten

", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "Number of packets eaten", "definition": "random(2..5)*2", "description": "

Number of packets of jelly sweets eaten.

", "templateType": "anything", "can_override": false}, "pname": {"name": "pname", "group": "Ungrouped variables", "definition": "random('Jerry','Jessica')", "description": "", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Number of packets eaten", "definition": "random(5..10)", "description": "

Number of packets of lollipops eaten

", "templateType": "anything", "can_override": false}, "total": {"name": "total", "group": "Ungrouped variables", "definition": "(a1+b1+c1/2)*2 + b1+c1/2", "description": "

The total spent.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "gcd(a1,b1+c1/2)=1", "maxRuns": 100}, "ungrouped_variables": ["pname", "total"], "variable_groups": [{"name": "Number of packets eaten", "variables": ["a1", "b1", "c1"]}], "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": "

Let the cost of a packet of lollipops be $£x$.

\n

Write an expression in terms of $x$ for the cost of each kind of sweet:

\n

Lollipops: £[[0]]

\n

Toffees: £[[1]]

\n

Jelly sweets: £[[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": "x", "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": [{"name": "x", "value": ""}]}, {"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+1", "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": [{"name": "x", "value": ""}]}, {"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": "1/2(x+1)", "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": [{"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": "

Write an algebraic expression for the overall cost of the sweets {pname} ate, in terms of $x$.

\n

£[[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": "({a1}+{b1}+{c1}/2)x+({b1}+{c1}/2)", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "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": "

Now simplify your expression for the total cost.

\n

£[[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": "({a1}+{b1}+{c1}/2)x+({b1}+{c1}/2)", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "$n*x + $n", "partialCredit": 0, "message": "Your answer is not fully simplified.", "nameToCompare": ""}, "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": "

You find out that a packet of lollipops costs $£2$.

\n

Calculate {pname}'s total expenditure on sweets last week.

\n

£[[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": "({a1}+{b1}+{c1}/2)2+{b1}+{c1}/2", "answerSimplification": "all", "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": true, "partialCredit": 0, "message": "

Don't use brackets

"}, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "navigation": {"showfrontpage": true, "onleave": {"action": "none", "message": ""}, "preventleave": true, "allowregen": true, "browse": true, "startpassword": "", "showresultspage": "oncompletion", "reverse": true}, "showstudentname": true, "metadata": {"licence": "None specified", "description": "from workshop"}, "feedback": {"showtotalmark": true, "allowrevealanswer": true, "advicethreshold": 0, "showanswerstate": true, "showactualmark": true, "intro": "", "feedbackmessages": []}, "showQuestionGroupNames": false, "name": "Test12345", "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "duration": 0, "contributors": [{"name": "Richard Law", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3479/"}], "extensions": ["stats"], "custom_part_types": [], "resources": []}