// Numbas version: exam_results_page_options {"name": "HELM Book 1.3.1 exercises", "metadata": {"description": "

HELM Book 1.3.1 exercises

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "duration": 0, "percentPass": "0", "showQuestionGroupNames": true, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Collect like terms", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["Collect like terms 1", "Collect like terms 2"], "variable_overrides": [[], []], "questions": [{"name": "1.3.1.1 Collect like terms", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Given an expression in one or two variables, with two or three terms, collect like terms, if possible. Part of HELM Book 1.3

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

Simplify, if possible: $\\var{q1expr}$.

\n

If the expression cannot be simplified, just type in the expression without changing it.

", "advice": "

$\\var{q1expr}$ $=\\var{q1ans}$

\n

This expression cannot be simplified as the variables are different.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"vars": {"name": "vars", "group": "Ungrouped variables", "definition": "shuffle(['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}, "q1coeffs": {"name": "q1coeffs", "group": "question 1", "definition": "repeat(random(-20..20 except 0),3)", "description": "

coefficients to go in front of the variables.

", "templateType": "anything", "can_override": false}, "q1exprs": {"name": "q1exprs", "group": "question 1", "definition": "[expression(q1coeffs[0] + \"*\" + vars[0] + \"+\" + \n q1coeffs[1] + \"*\" + vars[0] + \"+\" + q1coeffs[2] + \"*\" + vars[0]),\nexpression(q1coeffs[0]+\"*\" + vars[0] + \"^2+\" + q1coeffs[1]+\"*\"+vars[0]+\"^2\"),\nexpression(q1coeffs[0]+\"*\" + vars[0] + \"^2+\" + q1coeffs[1]+\"*\"+vars[1]+\"^2\"),\nexpression(q1coeffs[0] + \"*\" + vars[0] + \"+\" + q1coeffs[1] + \"*\" + vars[1] ) \n]", "description": "", "templateType": "anything", "can_override": false}, "q1idx": {"name": "q1idx", "group": "question 1", "definition": "random(0..3)", "description": "", "templateType": "anything", "can_override": false}, "q1expr": {"name": "q1expr", "group": "question 1", "definition": "simplify(q1exprs[q1idx],[\"basic\"])", "description": "", "templateType": "anything", "can_override": false}, "q1ans": {"name": "q1ans", "group": "question 1", "definition": "simplify(q1expr,[\"all\"])", "description": "", "templateType": "anything", "can_override": false}, "t": {"name": "t", "group": "question 1", "definition": "[expression(\"x\"),expression(\"y\")]", "description": "", "templateType": "anything", "can_override": false}, "test": {"name": "test", "group": "question 1", "definition": "distinct(t)=t", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["vars"], "variable_groups": [{"name": "question 1", "variables": ["q1coeffs", "q1exprs", "q1idx", "q1expr", "q1ans", "t", "test"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"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": "{q1ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "m_commutative(m_associative(\n$v;v1;v2:0 ^2`? * $n`? // v\n`| - $v;v1;v2:0 ^2`? // -v\n`| -$n * $v;v1;v2:0 ^2`? // -nv\n\n`| $v;v1 ^2`? * $n`? + $v;v2 ^2`? * $n`? // (n)v + (n)v\n\n`| $v;v1 ^2`? * $n`? - $v;v2 ^2`? // (n)v - v\n`| $v;v1 ^2`? * $n`? - $n * $v;v2 ^2`? // (n)v - nv\n\n`| -$v;v1 ^2`? - $v;v2 ^2`? // -v -v\n`| -$v;v1 ^2`? - $n * $v;v2 ^2`? // -v -nv\n`| -$n * $v;v1 ^2`? - $v;v2 ^2`? // -nv -v\n`| -$n * $v;v1 ^2`? - $n * $v;v2 ^2`? // -nv -nv\n\n `| -$v;v1 ^2`? + $v;v2 ^2`? * $n`? // -v + (n)v\n `| -$n * $v;v1 ^2`? + $v;v2 ^2`? * $n`? // -nv + (n)v\n\n`| 0;v1:1;v2:2\n\n `where string(v1)<>string(v2)\n))\n\n//this checks that the answer is in the correct form \n//and that there are not two terms with the same variable.\n// All the cases are so that the variables turn up in the\n// correct form for comparison: If I use a `+- in front of the\n// $v, the variable name is captured as -x (say) and this \n// crashes the where check for some reason I don't understand.\n// Also, although it works in Christian's pattern-matching test page,\n// here 4*(-n)<>-4n; hence there are two cases for each negative case,\n// one with, and one without the number.", "partialCredit": 0, "message": "Your answer is not in the expected form. You must collect all the like terms and put the numbers before the letters.", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "1.3.1.2 Collect like terms", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Given either (a) ax+bx+cy+dy, or (b) ax^2+bx+c, (c) ax^2+bx^2+cx^2, where a,b,c,d are randomised constants, and x and y are randomised letters, simplify by collecting like terms (if possible).

\n

Part of HELM Book 1.3

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

Simplify, if possible, $\\var{q2expr}$

\n

If the expression cannot be simplified, just type in the expression without changing it.

", "advice": "

Collecting like terms, $\\var{q2expr}=\\var{q2ans}$.

\n

$\\var{q2expr}$

\n

There are no like terms so this expression cannot be simplified.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"vars": {"name": "vars", "group": "Ungrouped variables", "definition": "shuffle(['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}, "q2coeffs": {"name": "q2coeffs", "group": "question 2", "definition": "repeat(random(-20..20 except [-1,0]),4)", "description": "

The absence of -1 just makes the pattern matching easier!

", "templateType": "anything", "can_override": false}, "q2exprs": {"name": "q2exprs", "group": "question 2", "definition": "[expression(q2coeffs[0] + \"*\" + vars[2] + \"+\" + \n q2coeffs[1] + \"*\" + vars[3] + \"+\" + q2coeffs[2] + \"*\" + vars[2]\n + \"+\" + q2coeffs[3] + \"*\" + vars[3] ),\nexpression(q2coeffs[0]+\"*\" + vars[2] + \"^2+\" + \n q2coeffs[1]+\"*\"+vars[2]+\"+\"+q2coeffs[2]),\nexpression(q2coeffs[0]+\"*\" + vars[2] + \"^2+\" + q2coeffs[1]+\"*\"+vars[2]+\"^2+\"+\n q2coeffs[2]+\"*\" + vars[2] + \"^2\")\n]", "description": "", "templateType": "anything", "can_override": false}, "q2idx": {"name": "q2idx", "group": "question 2", "definition": "random(0..2)", "description": "", "templateType": "anything", "can_override": false}, "q2expr": {"name": "q2expr", "group": "question 2", "definition": "simplify(q2exprs[q2idx],[\"basic\"])", "description": "", "templateType": "anything", "can_override": false}, "q2ans": {"name": "q2ans", "group": "question 2", "definition": "simplify(q2expr,[\"all\"])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["vars"], "variable_groups": [{"name": "question 2", "variables": ["q2coeffs", "q2exprs", "q2idx", "q2expr", "q2ans"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"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": "{q2ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "0\n`| $n`? * $v ^2`? // the v^2 case and the 2 var case where one var->0\n`| -$v ^2`?\n`| -$n * $v ^2`?\n\n`| `+-$n`?*$v^2 + `+-$n`?*$v + `+-$n // the quadratic. All coeffs are nonzero.\n\n`| `+-$n`?*$v + `+-$n`?*$v // the 2 var case\n`| -$v + `+-$n`?*$v\n`| -$v - $v\n`| `+-$n`?*$v - $v", "partialCredit": 0, "message": "You need to collect all the like terms, and put the numbers before the letters.", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}, {"name": "Simplifying expressions 1", "pickingStrategy": "random-subset", "pickQuestions": "2", "questionNames": ["Simplify an expression version 1", "Simplify an expression version 2", "Simplify an expression version 3", "Simplify an expression version 4", "Simplify an expression version 5", "Simplify an expression version 6"], "variable_overrides": [[], [], [], [], [], []], "questions": [{"name": "1.3.1.3 Simplify an expression version 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Simplify ax+b+cx+dy+e to (a+c)x + dy + b+e

\n

There are 6 versions of this question.

\n

Part of HELM Book 1.3

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

Simplify, if possible: $\\var{q3expr}$

\n

If the expression cannot be simplified, just type it into the answer box without changing it.

", "advice": "

Collecting like terms, $\\var{q3expr}=\\var{q3ans}$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"vars": {"name": "vars", "group": "Ungrouped variables", "definition": "shuffle(['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}, "q3coeffs": {"name": "q3coeffs", "group": "question3", "definition": "repeat(random(-20..20 except 0),6)", "description": "", "templateType": "anything", "can_override": false}, "q3exprs": {"name": "q3exprs", "group": "question3", "definition": "[expression(q3coeffs[0] + \"*\" + vars[4] + \"+\" + q3coeffs[1] + \"+\" +\n q3coeffs[2] + \"*\" + vars[4] + \"+\" + q3coeffs[3] + \"*\" + vars[2] + \n \"+\" + q3coeffs[4])\n]", "description": "

(0) ax+b+cx+dy+e -> (a+c)x + dy + b+e,

\n

(1) ax^2+bx+cx+d -> ax^2 + (b+c)x + d,

\n

(2) ax^2+bx^2+cx+d -> (a+b)x^2 + cx + d,

\n

(3) ax^2+by^2+cy+dx -> no change

\n

(4) x^2+yx+xy+y^2 -> x^2 + 2xy + y^2

\n

(5) x^3+ax^2+bx^2+cx+dx+e -> x^3 + (a+b)x^2 + (c+d)x + e

", "templateType": "anything", "can_override": false}, "q3idx": {"name": "q3idx", "group": "question3", "definition": "0", "description": "", "templateType": "anything", "can_override": false}, "q3expr": {"name": "q3expr", "group": "question3", "definition": "simplify(q3exprs[q3idx],[\"basic\"])", "description": "", "templateType": "anything", "can_override": false}, "q3ans": {"name": "q3ans", "group": "question3", "definition": "simplify(q3expr,[\"all\"])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["vars"], "variable_groups": [{"name": "question3", "variables": ["q3coeffs", "q3exprs", "q3idx", "q3expr", "q3ans"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"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": "{q3ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "`+-$n`?*$v;v1 + `+-$n`?*$v;v2 + `+-$n`? // all 3 terms\n`| `+-$n`?*$v;v1;v2:0 + `+-$n`? // only 1 var term\n`| -$v;v1 + `+-$n`?*$v;v2 + `+-$n`? // 1 var with coeff -1\n`| -$v;v1;v2:0 + `+-$n`? // 1 var with coeff -1\n`| -$v;v1 - $v;v2 + `+-$n`? // 2 vars with coeff -1\n`where distinct([string(v1),string(v2)])=[string(v1),string(v2)]\n//ax+b+cx+dy+e -> (a+c)x + dy + b+e", "partialCredit": 0, "message": "You need to collect all like terms.", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "1.3.1.3 Simplify an expression version 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Simplify ax^2+bx+cx+d to ax^2 + (b+c)x + d

\n

There are 6 versions of this question.

\n

Part of HELM Book 1.3

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

Simplify, if possible: $\\var{q3expr}$

\n

If the expression cannot be simplified, just type it into the answer box without changing it.

", "advice": "

Collecting like terms, $\\var{q3expr}=\\var{q3ans}$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"vars": {"name": "vars", "group": "Ungrouped variables", "definition": "shuffle(['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}, "q3coeffs": {"name": "q3coeffs", "group": "question3", "definition": "repeat(random(-20..20 except 0),6)", "description": "", "templateType": "anything", "can_override": false}, "q3exprs": {"name": "q3exprs", "group": "question3", "definition": "[expression(q3coeffs[0] + \"*\" + vars[4] + \"+\" + q3coeffs[1] + \"+\" +\n q3coeffs[2] + \"*\" + vars[4] + \"+\" + q3coeffs[3] + \"*\" + vars[2] + \n \"+\" + q3coeffs[4]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + \n q3coeffs[1]+\"*\"+vars[4]+\"+\" + q3coeffs[2]+\"*\"+vars[4]+ \"+\" + q3coeffs[2]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + q3coeffs[1]+\"*\"+vars[4]+\"^2+\"+\n q3coeffs[2]+\"*\" + vars[4] + \"+\" + q3coeffs[3]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + q3coeffs[1]+\"*\"+vars[5]+\"^2+\"+\n q3coeffs[2]+\"*\" + vars[5] + \"+\" + q3coeffs[3] + \"*\" + vars[4]),\nexpression(vars[4]+\"^2+\"+vars[5]+\"*\"+vars[4]+\"+\"+vars[4]+\"*\"+vars[5]+\"+\"+\n vars[5]+\"^2\"),\nexpression(vars[4]+\"^3+\"+q3coeffs[0]+\"*\"+vars[4]+\"^2+\"+\n q3coeffs[1]+\"*\"+vars[4]+\"^2+\"+q3coeffs[2]+\"*\"+vars[4]+\"+\"+\n q3coeffs[3]+\"*\"+vars[4]+\"+\"+q3coeffs[4] )\n]", "description": "

(0) ax+b+cx+dy+e -> (a+c)x + dy + b+e,

\n

(1) ax^2+bx+cx+d -> ax^2 + (b+c)x + d,

\n

(2) ax^2+bx^2+cx+d -> (a+b)x^2 + cx + d,

\n

(3) ax^2+by^2+cy+dx -> no change

\n

(4) x^2+yx+xy+y^2 -> x^2 + 2xy + y^2

\n

(5) x^3+ax^2+bx^2+cx+dx+e -> x^3 + (a+b)x^2 + (c+d)x + e

", "templateType": "anything", "can_override": false}, "q3idx": {"name": "q3idx", "group": "question3", "definition": "1", "description": "", "templateType": "anything", "can_override": false}, "q3expr": {"name": "q3expr", "group": "question3", "definition": "simplify(q3exprs[q3idx],[\"basic\"])", "description": "", "templateType": "anything", "can_override": false}, "q3ans": {"name": "q3ans", "group": "question3", "definition": "simplify(q3expr,[\"all\"])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["vars"], "variable_groups": [{"name": "question3", "variables": ["q3coeffs", "q3exprs", "q3idx", "q3expr", "q3ans"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"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": "{q3ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "`+-$n`?*$v^2 + (`+-$n`?*$v)`? + `+-$n \n`| -$v^2*$n`? + ($v*`+-$n`?)`? + `+-$n\n`| -$v^2*$n`? -$v*$n`? + `+-$n \n`| $v^2*`+-$n`? + (-$v*$n`?)`? + `+-$n \n\n//ax^2+bx+cx+d -> ax^2 + (b+c)x + d", "partialCredit": 0, "message": "You need to collect all like terms.", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "1.3.1.3 Simplify an expression version 3", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Simplify ax^2+bx^2+cx+d to (a+b)x^2 + cx + d

\n

There are 6 versions of this question.

\n

Part of HELM Book 1.3

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

Simplify, if possible: $\\var{q3expr}$

\n

If the expression cannot be simplified, just type it into the answer box without changing it.

", "advice": "

Collecting like terms, $\\var{q3expr}=\\var{q3ans}$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"vars": {"name": "vars", "group": "Ungrouped variables", "definition": "shuffle(['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}, "q3coeffs": {"name": "q3coeffs", "group": "question3", "definition": "repeat(random(-20..20 except 0),6)", "description": "", "templateType": "anything", "can_override": false}, "q3exprs": {"name": "q3exprs", "group": "question3", "definition": "[expression(q3coeffs[0] + \"*\" + vars[4] + \"+\" + q3coeffs[1] + \"+\" +\n q3coeffs[2] + \"*\" + vars[4] + \"+\" + q3coeffs[3] + \"*\" + vars[2] + \n \"+\" + q3coeffs[4]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + \n q3coeffs[1]+\"*\"+vars[4]+\"+\" + q3coeffs[2]+\"*\"+vars[4]+ \"+\" + q3coeffs[2]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + q3coeffs[1]+\"*\"+vars[4]+\"^2+\"+\n q3coeffs[2]+\"*\" + vars[4] + \"+\" + q3coeffs[3]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + q3coeffs[1]+\"*\"+vars[5]+\"^2+\"+\n q3coeffs[2]+\"*\" + vars[5] + \"+\" + q3coeffs[3] + \"*\" + vars[4]),\nexpression(vars[4]+\"^2+\"+vars[5]+\"*\"+vars[4]+\"+\"+vars[4]+\"*\"+vars[5]+\"+\"+\n vars[5]+\"^2\"),\nexpression(vars[4]+\"^3+\"+q3coeffs[0]+\"*\"+vars[4]+\"^2+\"+\n q3coeffs[1]+\"*\"+vars[4]+\"^2+\"+q3coeffs[2]+\"*\"+vars[4]+\"+\"+\n q3coeffs[3]+\"*\"+vars[4]+\"+\"+q3coeffs[4] )\n]", "description": "

(0) ax+b+cx+dy+e -> (a+c)x + dy + b+e,

\n

(1) ax^2+bx+cx+d -> ax^2 + (b+c)x + d,

\n

(2) ax^2+bx^2+cx+d -> (a+b)x^2 + cx + d,

\n

(3) ax^2+by^2+cy+dx -> no change

\n

(4) x^2+yx+xy+y^2 -> x^2 + 2xy + y^2

\n

(5) x^3+ax^2+bx^2+cx+dx+e -> x^3 + (a+b)x^2 + (c+d)x + e

", "templateType": "anything", "can_override": false}, "q3idx": {"name": "q3idx", "group": "question3", "definition": "2", "description": "", "templateType": "anything", "can_override": false}, "q3expr": {"name": "q3expr", "group": "question3", "definition": "simplify(q3exprs[q3idx],[\"basic\"])", "description": "", "templateType": "anything", "can_override": false}, "q3ans": {"name": "q3ans", "group": "question3", "definition": "simplify(q3expr,[\"all\"])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["vars"], "variable_groups": [{"name": "question3", "variables": ["q3coeffs", "q3exprs", "q3idx", "q3expr", "q3ans"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"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": "{q3ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "(`+-$n`?*$v^2)`? + `+-$n`?*$v + `+-$n \n`| -$v^2 + `+-$n`?*$v + `+-$n\n`| -$v^2 -$v + `+-$n \n`| (`+-$n`?*$v^2)`? + -$v*$n`? + `+-$n \n\n// ax^2+bx^2+cx+d -> (a+b)x^2 + cx + d,", "partialCredit": 0, "message": "You need to collect all like terms.", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "1.3.1.3 Simplify an expression version 4", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Identify that ax^2+by^2+cy+dx cannot be simplified.

\n

There are 6 versions of this question.

\n

Part of HELM Book 1.3

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

Simplify, if possible: $\\var{q3expr}$

\n

If the expression cannot be simplified, just type it into the answer box without changing it.

", "advice": "

There are no like terms, so $\\var{q3expr}$ cannot be simplified.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"vars": {"name": "vars", "group": "Ungrouped variables", "definition": "shuffle(['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}, "q3coeffs": {"name": "q3coeffs", "group": "question3", "definition": "repeat(random(-20..20 except 0),6)", "description": "", "templateType": "anything", "can_override": false}, "q3exprs": {"name": "q3exprs", "group": "question3", "definition": "[expression(q3coeffs[0] + \"*\" + vars[4] + \"+\" + q3coeffs[1] + \"+\" +\n q3coeffs[2] + \"*\" + vars[4] + \"+\" + q3coeffs[3] + \"*\" + vars[2] + \n \"+\" + q3coeffs[4]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + \n q3coeffs[1]+\"*\"+vars[4]+\"+\" + q3coeffs[2]+\"*\"+vars[4]+ \"+\" + q3coeffs[2]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + q3coeffs[1]+\"*\"+vars[4]+\"^2+\"+\n q3coeffs[2]+\"*\" + vars[4] + \"+\" + q3coeffs[3]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + q3coeffs[1]+\"*\"+vars[5]+\"^2+\"+\n q3coeffs[2]+\"*\" + vars[5] + \"+\" + q3coeffs[3] + \"*\" + vars[4]),\nexpression(vars[4]+\"^2+\"+vars[5]+\"*\"+vars[4]+\"+\"+vars[4]+\"*\"+vars[5]+\"+\"+\n vars[5]+\"^2\"),\nexpression(vars[4]+\"^3+\"+q3coeffs[0]+\"*\"+vars[4]+\"^2+\"+\n q3coeffs[1]+\"*\"+vars[4]+\"^2+\"+q3coeffs[2]+\"*\"+vars[4]+\"+\"+\n q3coeffs[3]+\"*\"+vars[4]+\"+\"+q3coeffs[4] )\n]", "description": "

(0) ax+b+cx+dy+e -> (a+c)x + dy + b+e,

\n

(1) ax^2+bx+cx+d -> ax^2 + (b+c)x + d,

\n

(2) ax^2+bx^2+cx+d -> (a+b)x^2 + cx + d,

\n

(3) ax^2+by^2+cy+dx -> no change

\n

(4) x^2+yx+xy+y^2 -> x^2 + 2xy + y^2

\n

(5) x^3+ax^2+bx^2+cx+dx+e -> x^3 + (a+b)x^2 + (c+d)x + e

", "templateType": "anything", "can_override": false}, "q3idx": {"name": "q3idx", "group": "question3", "definition": "3", "description": "", "templateType": "anything", "can_override": false}, "q3expr": {"name": "q3expr", "group": "question3", "definition": "simplify(q3exprs[q3idx],[\"basic\"])", "description": "", "templateType": "anything", "can_override": false}, "q3ans": {"name": "q3ans", "group": "question3", "definition": "simplify(q3expr,[\"all\"])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["vars"], "variable_groups": [{"name": "question3", "variables": ["q3coeffs", "q3exprs", "q3idx", "q3expr", "q3ans"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"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": "{q3ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "1.3.1.3 Simplify an expression version 5", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Simplify x^2+yx+xy+y^2 to x^2 + 2xy + y^2.

\n

There are 6 versions of this question.

\n

Part of HELM Book 1.3

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

Simplify, if possible: $\\var{q3expr}$

\n

If the expression cannot be simplified, just type it into the answer box without changing it.

", "advice": "

Collecting like terms, $\\var{q3expr}=\\var{q3ans}$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"vars": {"name": "vars", "group": "Ungrouped variables", "definition": "shuffle(['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}, "q3coeffs": {"name": "q3coeffs", "group": "question3", "definition": "repeat(random(-20..20 except 0),6)", "description": "", "templateType": "anything", "can_override": false}, "q3exprs": {"name": "q3exprs", "group": "question3", "definition": "[expression(q3coeffs[0] + \"*\" + vars[4] + \"+\" + q3coeffs[1] + \"+\" +\n q3coeffs[2] + \"*\" + vars[4] + \"+\" + q3coeffs[3] + \"*\" + vars[2] + \n \"+\" + q3coeffs[4]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + \n q3coeffs[1]+\"*\"+vars[4]+\"+\" + q3coeffs[2]+\"*\"+vars[4]+ \"+\" + q3coeffs[2]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + q3coeffs[1]+\"*\"+vars[4]+\"^2+\"+\n q3coeffs[2]+\"*\" + vars[4] + \"+\" + q3coeffs[3]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + q3coeffs[1]+\"*\"+vars[5]+\"^2+\"+\n q3coeffs[2]+\"*\" + vars[5] + \"+\" + q3coeffs[3] + \"*\" + vars[4]),\nexpression(vars[4]+\"^2+\"+vars[5]+\"*\"+vars[4]+\"+\"+vars[4]+\"*\"+vars[5]+\"+\"+\n vars[5]+\"^2\"),\nexpression(vars[4]+\"^3+\"+q3coeffs[0]+\"*\"+vars[4]+\"^2+\"+\n q3coeffs[1]+\"*\"+vars[4]+\"^2+\"+q3coeffs[2]+\"*\"+vars[4]+\"+\"+\n q3coeffs[3]+\"*\"+vars[4]+\"+\"+q3coeffs[4] )\n]", "description": "

(0) ax+b+cx+dy+e -> (a+c)x + dy + b+e,

\n

(1) ax^2+bx+cx+d -> ax^2 + (b+c)x + d,

\n

(2) ax^2+bx^2+cx+d -> (a+b)x^2 + cx + d,

\n

(3) ax^2+by^2+cy+dx -> no change

\n

(4) x^2+yx+xy+y^2 -> x^2 + 2xy + y^2

\n

(5) x^3+ax^2+bx^2+cx+dx+e -> x^3 + (a+b)x^2 + (c+d)x + e

", "templateType": "anything", "can_override": false}, "q3idx": {"name": "q3idx", "group": "question3", "definition": "4", "description": "", "templateType": "anything", "can_override": false}, "q3expr": {"name": "q3expr", "group": "question3", "definition": "simplify(q3exprs[q3idx],[\"basic\"])", "description": "", "templateType": "anything", "can_override": false}, "q3ans": {"name": "q3ans", "group": "question3", "definition": "expression(vars[4]+\"^2+\"+2+\"*\"+vars[5]+\"*\"+vars[4]+\"+\"+vars[5]+\"^2\")", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["vars"], "variable_groups": [{"name": "question3", "variables": ["q3coeffs", "q3exprs", "q3idx", "q3expr", "q3ans"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"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": "{q3ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "$v^2 + 2*$v*$v + $v^2\n\n// x^2+yx+xy+y^2 -> x^2 + 2xy + y^2", "partialCredit": 0, "message": "You need to collect all like terms.", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "1.3.1.3 Simplify an expression version 6", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Simplify x^3+ax^2+bx^2+cx+dx+e to x^3 + (a+b)x^2 + (c+d)x + e

\n

There are 6 versions of this question.

\n

Part of HELM Book 1.3

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

Simplify, if possible: $\\var{q3expr}$

\n

If the expression cannot be simplified, just type it into the answer box without changing it.

", "advice": "

Collecting like terms, $\\var{q3expr}=\\var{q3ans}$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"vars": {"name": "vars", "group": "Ungrouped variables", "definition": "shuffle(['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}, "q3coeffs": {"name": "q3coeffs", "group": "question3", "definition": "repeat(random(-20..20 except 0),6)", "description": "", "templateType": "anything", "can_override": false}, "q3exprs": {"name": "q3exprs", "group": "question3", "definition": "[expression(q3coeffs[0] + \"*\" + vars[4] + \"+\" + q3coeffs[1] + \"+\" +\n q3coeffs[2] + \"*\" + vars[4] + \"+\" + q3coeffs[3] + \"*\" + vars[2] + \n \"+\" + q3coeffs[4]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + \n q3coeffs[1]+\"*\"+vars[4]+\"+\" + q3coeffs[2]+\"*\"+vars[4]+ \"+\" + q3coeffs[2]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + q3coeffs[1]+\"*\"+vars[4]+\"^2+\"+\n q3coeffs[2]+\"*\" + vars[4] + \"+\" + q3coeffs[3]),\nexpression(q3coeffs[0]+\"*\" + vars[4] + \"^2+\" + q3coeffs[1]+\"*\"+vars[5]+\"^2+\"+\n q3coeffs[2]+\"*\" + vars[5] + \"+\" + q3coeffs[3] + \"*\" + vars[4]),\nexpression(vars[4]+\"^2+\"+vars[5]+\"*\"+vars[4]+\"+\"+vars[4]+\"*\"+vars[5]+\"+\"+\n vars[5]+\"^2\"),\nexpression(vars[4]+\"^3+\"+q3coeffs[0]+\"*\"+vars[4]+\"^2+\"+\n q3coeffs[1]+\"*\"+vars[4]+\"^2+\"+q3coeffs[2]+\"*\"+vars[4]+\"+\"+\n q3coeffs[3]+\"*\"+vars[4]+\"+\"+q3coeffs[4] )\n]", "description": "

(0) ax+b+cx+dy+e -> (a+c)x + dy + b+e,

\n

(1) ax^2+bx+cx+d -> ax^2 + (b+c)x + d,

\n

(2) ax^2+bx^2+cx+d -> (a+b)x^2 + cx + d,

\n

(3) ax^2+by^2+cy+dx -> no change

\n

(4) x^2+yx+xy+y^2 -> x^2 + 2xy + y^2

\n

(5) x^3+ax^2+bx^2+cx+dx+e -> x^3 + (a+b)x^2 + (c+d)x + e

", "templateType": "anything", "can_override": false}, "q3idx": {"name": "q3idx", "group": "question3", "definition": "5", "description": "", "templateType": "anything", "can_override": false}, "q3expr": {"name": "q3expr", "group": "question3", "definition": "simplify(q3exprs[q3idx],[\"basic\"])", "description": "", "templateType": "anything", "can_override": false}, "q3ans": {"name": "q3ans", "group": "question3", "definition": "simplify(q3expr,[\"all\"])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["vars"], "variable_groups": [{"name": "question3", "variables": ["q3coeffs", "q3exprs", "q3idx", "q3expr", "q3ans"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"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": "{q3ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "$v^3 + $n + ((`+-$n)`?*$v^2)`? + ((`+-$n)`?*$v)`?\n`| $v^3 + $n + -$v^2 + ((`+-$n)`?*$v)`?\n`| $v^3 + $n + -$v^2 + -$v\n`| $v^3 + $n + ((`+-$n)`?*$v^2)`? + -$v\n\n// x^3+ax^2+bx^2+cx+dx+e -> x^3 + (a+b)x^2 + (c+d)x + e", "partialCredit": 0, "message": "You need to collect all like terms.", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}, {"name": "Simplifying expressions 2", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["Simplify an expression 1", "Simplify an expression 2"], "variable_overrides": [[], []], "questions": [{"name": "1.3.1.4 Simplify an expression", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Compare ax-bx, and ax(bx) and simplify, where a and b are +ve or -ve integers, and x is a randomised variable. Part of HELM Book 1.3

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

Explain the distinction, if any, between each of the following expressions, and simplify if possible.

", "advice": "

(a) $\\var{q4aexpr} = \\var{q4aans}$

\n

This is a subtraction of like terms, so we subtract the coefficients.

\n

(b) $\\var{q4bexpr} = \\var{q4bans}$

\n

This is a product: $\\var{q4coeffs[0]}\\times\\var{ve}\\times\\var{q4coeffs[1]}\\times{\\var{ve}}$ so we multiply everything together.

\n

(c) $\\var{q4cexpr} = \\var{q4cans}$ 

\n

This is a product: $\\var{q4coeffs[0]}\\times\\var{ve}\\times\\var{-q4coeffs[1]}\\times{\\var{ve}}$ so we multiply everything together.

\n

Note that the second constant, $\\var{-q4coeffs[1]}$, is negative, so the final answer is negative.

\n

(d) $\\var{q4dexpr} = \\var{q4dans}$ 

\n

This is a subtraction of like terms, so we subtract the coefficients.

\n

(e) $\\var{q4eexpr} = \\var{q4eans}$

\n

This is a product: $\\var{-q4coeffs[0]}\\times\\var{ve}\\times\\var{q4coeffs[1]}\\times{\\var{ve}}$ so we multiply everything together.

\n

Note that the first constant, $\\var{-q4coeffs[0]}$, is negative, so the final answer is negative.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"vars": {"name": "vars", "group": "Ungrouped variables", "definition": "shuffle(['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}, "q4aexpr": {"name": "q4aexpr", "group": "question 4", "definition": "simplify(expression(q4coeffs[0] + \"*\" + vars[6] + \"-\" \n + q4coeffs[1] + \"*\" + vars[6]),[\"basic\"])", "description": "", "templateType": "anything", "can_override": false}, "q4bexpr": {"name": "q4bexpr", "group": "question 4", "definition": "latex(q4coeffs[0] + vars[6] + \"(\" + q4coeffs[1] + vars[6]+\")\")", "description": "", "templateType": "anything", "can_override": false}, "q4cexpr": {"name": "q4cexpr", "group": "question 4", "definition": "latex(q4coeffs[0] + vars[6] + \"(-\" + q4coeffs[1] + vars[6]+\")\")", "description": "", "templateType": "anything", "can_override": false}, "q4dexpr": {"name": "q4dexpr", "group": "question 4", "definition": "simplify(expression(\"-\"+q4coeffs[0] + \"*\" + vars[6] + \"-\" \n + q4coeffs[1] + \"*\" + vars[6]),[\"basic\"])", "description": "", "templateType": "anything", "can_override": false}, "q4eexpr": {"name": "q4eexpr", "group": "question 4", "definition": "latex(\"-\"+q4coeffs[0] + vars[6] + \"(\" + q4coeffs[1] + vars[6]+\")\")", "description": "", "templateType": "anything", "can_override": false}, "q4aans": {"name": "q4aans", "group": "question 4", "definition": "simplify(q4aexpr,[\"all\"])", "description": "", "templateType": "anything", "can_override": false}, "q4bans": {"name": "q4bans", "group": "question 4", "definition": "simplify(expression(\n q4coeffs[0] + \"*\" + vars[6] + \"*(\" \n + q4coeffs[1] + \"*\" + vars[6]+\")\"),\n [\"all\"])", "description": "", "templateType": "anything", "can_override": false}, "q4cans": {"name": "q4cans", "group": "question 4", "definition": "simplify(expression(\n q4coeffs[0] + \"*\" + vars[6] + \"*(-\" \n + q4coeffs[1] + \"*\" + vars[6]+\")\"),\n [\"all\"])", "description": "", "templateType": "anything", "can_override": false}, "q4dans": {"name": "q4dans", "group": "question 4", "definition": "simplify(q4dexpr,[\"all\"])", "description": "", "templateType": "anything", "can_override": false}, "q4eans": {"name": "q4eans", "group": "question 4", "definition": "simplify(expression(\"-\"+\n q4coeffs[0] + \"*\" + vars[6] + \"*(\" \n + q4coeffs[1] + \"*\" + vars[6]+\")\"),\n [\"all\"])", "description": "", "templateType": "anything", "can_override": false}, "q4coeffs": {"name": "q4coeffs", "group": "question 4", "definition": "repeat(random(1..20 except 0),2)", "description": "", "templateType": "anything", "can_override": false}, "ve": {"name": "ve", "group": "question 4", "definition": "expression(vars[6])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["vars"], "variable_groups": [{"name": "question 4", "variables": ["q4aexpr", "q4aans", "q4bexpr", "q4bans", "q4cexpr", "q4cans", "q4dexpr", "q4dans", "q4eexpr", "q4eans", "q4coeffs", "ve"]}], "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": "

(a) $\\var{q4aexpr}$ = [[0]]

\n

(b) $\\var{q4bexpr}$ = [[1]]

\n

(c) $\\var{q4cexpr}$ = [[2]]

\n

(d) $\\var{q4dexpr}$ = [[3]]

\n

(e) $\\var{q4eexpr}$ = [[4]]

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "q4a", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{q4aans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": true, "customName": "q4b", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{q4bans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": true, "customName": "q4c", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{q4cans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": true, "customName": "q4d", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{q4dans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": true, "customName": "q4e", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{q4eans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "1.3.1.5 Simplify an expression", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "tags": [], "metadata": {"description": "

Simplify, if possible,
(a) $\\frac{2}{3}x^2 + \\frac{x^2}{3}$, (b) $0.5x^2 + \\frac{3}{4}x^2 - \\frac{11}{2}x$, (c) $3x^3 - 11x + 3yx + 11$, and (d) $-4\\alpha x^2 + \\beta x^2$ where $\\alpha$ and $\\beta$ are constants.

\n

The numbers and letters are all randomised.

\n

Part of HELM Book 1.3

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

Note: After you have answered these questions, choose \"reveal answers\" and compare your answers to check that you have entered the most simplified forms of the expressions.

", "advice": "

$\\var{q5expr}=\\var{q5ans}$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"vars": {"name": "vars", "group": "Ungrouped variables", "definition": "shuffle(['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}, "q5den": {"name": "q5den", "group": "question 5", "definition": "[random(2..6),random(2,4,5,8)]", "description": "", "templateType": "anything", "can_override": false}, "q5num": {"name": "q5num", "group": "question 5", "definition": "flatten([repeat(random(1..11 except q5den),3),[random(1..q5den[1]-1)]])", "description": "", "templateType": "anything", "can_override": false}, "q5ints": {"name": "q5ints", "group": "question 5", "definition": "repeat(random(-20..20 except [-1,0,1]),4)", "description": "", "templateType": "anything", "can_override": false}, "q5exprs": {"name": "q5exprs", "group": "question 5", "definition": "[ expression(\"(\"+q5num[0]+\"/\"+q5den[0]+\")*\"+vars[7]+\"^2+\"+\n \"(\"+vars[7]+\"^2)/\"+q5den[0]),\n expression(q5den[0] + \".\" + q5den[1]+\"*\"+vars[7]+\"^2+(\"+\n q5num[0] + \".\" + q5num[1]+\")*\"+vars[7]+\"^2+(\"+\n q5num[2] + \".\" + q5num[3] +\")*\"+vars[7] ),\n expression(q5ints[0]+\"*\"+vars[7]+\"^2+\"+q5ints[1]+\"*\"+vars[7]+\"+\"+\n q5ints[0]+\"*\"+vars[8]+\"*\"+vars[7]+\"+(-1)*\"+q5ints[1] ),\n expression(q5ints[0]+ \"*\\alpha \" + vars[7]+\"^2+\"+q5ints[1]+\"*\\beta \"+vars[7]+\"^2\")\n ]", "description": "

1) (a/b)x^2+(x^2)/c (a,b,c >0)

\n

2) dx^2+(a/b)x^2+(e/f)x (a,b,c,d,e > 0)

\n

3) ax^2+bx+cyx-d (a,b,c,d are not 1 or -1)

\n

4) a.alpha.x^2+b.beta.x^2 (a and b are not 1 or -1)

", "templateType": "anything", "can_override": false}, "q5idx": {"name": "q5idx", "group": "question 5", "definition": "random(0..3)", "description": "

random(0..3)

", "templateType": "anything", "can_override": false}, "q5expr": {"name": "q5expr", "group": "question 5", "definition": "simplify(q5exprs[q5idx],[\"basic\",\"simplifyFractions\",\"unitFactor\"])", "description": "", "templateType": "anything", "can_override": false}, "q5ans": {"name": "q5ans", "group": "question 5", "definition": "simplify([ expression(\n eval(expression(\"(\"+q5num[0]+\"/\"+q5den[0]+\") + (1/\"+q5den[0]+\")\"))+\n \"*\"+ vars[7]+\"^2\"),\n simplify(q5expr,\"all\"),\n expression(q5ints[0]+\"*\"+vars[7]+\"^2+\"+q5ints[1]+\"*\"+vars[7]+\"+\"+\n q5ints[0]+\"*\"+vars[8]+\"*\"+vars[7]+\"+(-1)*\"+q5ints[1] ),\n expression(\"(\"+q5ints[0]+ \"*\\alpha\" + \"+\"+q5ints[1]+\"*\\beta)*\"+vars[7]+\"^2\")\n ][q5idx],[\"all\"])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["vars"], "variable_groups": [{"name": "question 5", "variables": ["q5den", "q5num", "q5ints", "q5exprs", "q5idx", "q5expr", "q5ans"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"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, "prompt": "

Simplify, if possible: $\\var{q5expr}$ where $\\alpha$ and $\\beta$ are constants.

\n

(Type alpha to enter $\\alpha$ and beta to enter $\\beta$.)

", "answer": "{q5ans}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "singleLetterVariables": true, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "((`+-($n)`?*alpha + `+-($n)`?*beta) * $v^2) `| // alpha +/- beta\n(((rational:$n `| decimal:$n `| `+-$n)*$v^2)`? + // v^2\n((decimal:$n `| `+-$n)*v)`? + // v\n($n*$v*$v)`? + // two variables\n($n)`?) // constant term", "partialCredit": 0, "message": "You need to collect all like terms.", "nameToCompare": ""}, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "menu", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": "", "allowAttemptDownload": false, "downloadEncryptionKey": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "

Work through these practice questions. You are encouraged to try each question multiple times as the expressions in each question will change each time you try it. 

\n

If you close and re-open this practice set, some of the questions will randomly be replaced with other questions, so you can practice multiple times.

", "end_message": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Merryn Horrocks", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4052/"}], "extensions": [], "custom_part_types": [], "resources": []}