// Numbas version: exam_results_page_options {"name": "1.3.1. Addition and Subtraction of Like Terms", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "1.3.1. Addition and Subtraction of Like Terms", "tags": [], "metadata": {"description": "

Collect like terms to simplify an algebraic expression. Part of HELM Book 1.3

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

Addition and Subtraction of Like Terms

\n

Like terms are multiples of the same quantity. For example $5y$, $17y$ and $\\displaystyle{\\frac{1}{2}y}$ are all multiples of $y$ and so are like terms. Similarly, $3x^2$, $-5x^2$ and $\\displaystyle{\\frac{1}{4}x^2}$ are all multiples of $x^2$ and so are like terms.

\n

Further examples of like terms are:

\n

$kx$ and $mx$ which are both multiples of $x$,

\n

$x^2y$, $6x^2y$, $-13x^2y$, $-2yx^2$, which are all multiples of $x^2y$,

\n

$abc^2$, $-7abc^2$, $kabc^2$, which are multiples of $abc^2$

\n

Like terms can be added or subtracted in order to simplify expressions.

\n

Example 27

\n

Simplify $5x-13x+22x$

\n

Solution

\n

All three terms are multiples of $x$ and so are like terms. The expression can be simplified to $14x$.

\n

Example 28

\n

Simplify $5z+2x$

\n

Solution

\n

$5z$ and $2x$ are not like terms. They are not multiples of the same quantity. This expression cannot be simplified.

", "advice": "

By collecting like terms, $\\var{q1expr} = \\var{q1ans}$

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"q1expr": {"name": "q1expr", "group": "question1", "definition": "simplify(expression(q1ints[0] +\"*\"+ q1letter1 + \"+\" + \n q1ints[1] +\"*\"+ q1letter2 + \"+\" + \n q1ints[2] +\"*\"+ q1letter1 + \"+\" + \n q1ints[3] +\"*\"+ q1letter2 ),[\"basic\"])", "description": "", "templateType": "anything", "can_override": false}, "alphabet": {"name": "alphabet", "group": "Ungrouped variables", "definition": "['a','b','c','d','f','g','h','k','m','n','p','q','r','s','t','u','v','w','x','y','z']", "description": "", "templateType": "anything", "can_override": false}, "q1letter1": {"name": "q1letter1", "group": "question1", "definition": "random(alphabet)", "description": "", "templateType": "anything", "can_override": false}, "q1letter2": {"name": "q1letter2", "group": "question1", "definition": "random(alphabet except q1letter1)", "description": "", "templateType": "anything", "can_override": false}, "q1ints": {"name": "q1ints", "group": "question1", "definition": "[random(-20..20 except 0),\n random(-20..20 except 0),\n random(-20..20 except 0),\n random(-20..20 except 0)\n ]", "description": "", "templateType": "anything", "can_override": false}, "q1ans": {"name": "q1ans", "group": "question1", "definition": "simplify(q1expr,[\"all\"])", "description": "", "templateType": "anything", "can_override": false}, "q2expr": {"name": "q2expr", "group": "question 2", "definition": "simplify( expression( q2coeffs[0] + \"*\" + q2letter1 + \"+\" +\n q2coeffs[1] + \"*\" + q2letter1 + \"+\" +\n q2coeffs[2] + \"*\" + q2letter2\n ),[\"basic\"])", "description": "", "templateType": "anything", "can_override": false}, "q2letter1": {"name": "q2letter1", "group": "question 2", "definition": "random(alphabet)", "description": "", "templateType": "anything", "can_override": false}, "q2letter2": {"name": "q2letter2", "group": "question 2", "definition": "random(alphabet except q2letter1)", "description": "", "templateType": "anything", "can_override": false}, "q2coeffs": {"name": "q2coeffs", "group": "question 2", "definition": "[random(-1,1)*random(1/6,5/6,1/4,3/4,1/3,2/3,1/2,2,3,4,5,6,7,8),\n random(-1,1)*random(1/6,5/6,1/4,3/4,1/3,2/3,1/2,2,3,4,5,6,7,8),\n random(-1,1)*random(1/6,5/6,1/4,3/4,1/3,2/3,1/2,2,3,4,5,6,7,8)\n ]", "description": "", "templateType": "anything", "can_override": false}, "q2ans": {"name": "q2ans", "group": "question 2", "definition": "simplify(expression(\n \"(\"+(q2coeffs[0]+q2coeffs[1])+\")\"+\"*\" + q2letter1 + \"+\" +\n q2coeffs[2]+\"*\" + q2letter2\n ),[\"all\"])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["alphabet"], "variable_groups": [{"name": "question1", "variables": ["q1letter1", "q1letter2", "q1ints", "q1expr", "q1ans"]}, {"name": "question 2", "variables": ["q2letter1", "q2letter2", "q2coeffs", "q2expr", "q2ans"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": true, "customName": "Task 1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Simplify $\\var{q1expr}$.

", "answer": "{q1ans}", "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": "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": "

Example 29

\n

Simplify $2x^2-7x+11x^2+x$.

\n

Solution

\n

$2x^2$ and $11x^2$, both being multiples of $x^2$, can be collected together and added to give $13x^2$.

\n

Similarly, $-7x$ and $x$ can be added to give $-6x$.

\n

We get $2x^2-7x+11x^2+x=13x^2-6x$ which cannot be simplified further.

"}, {"type": "jme", "useCustomName": true, "customName": "Task 2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Simplify $\\var{q2expr}$

", "answer": "{q2ans}", "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": "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": "

Example 30

\n

Simplify $3a^2b - 7a^2b - 2b^2 + a^2$.

\n

Solution

\n

Note that $3a^2b$ and $7a^2b$ are both multiples of $a^2b$ and so are like terms. There are no other like terms. Therefore 

\n

$3a^2b - 7a^2b - 2b^2 + a^2 = -4a^2b - 2b^2 + a^2$

"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}]}], "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}]}