// Numbas version: finer_feedback_settings {"name": "1.3.1.4 Simplify an expression", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "1.3.1.4 Simplify an expression", "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}$
\nThis is a subtraction of like terms, so we subtract the coefficients.
\n(b) $\\var{q4bexpr} = \\var{q4bans}$
\nThis 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}$
\nThis is a product: $\\var{q4coeffs[0]}\\times\\var{ve}\\times\\var{-q4coeffs[1]}\\times{\\var{ve}}$ so we multiply everything together.
\nNote that the second constant, $\\var{-q4coeffs[1]}$, is negative, so the final answer is negative.
\n(d) $\\var{q4dexpr} = \\var{q4dans}$
\nThis is a subtraction of like terms, so we subtract the coefficients.
\n(e) $\\var{q4eexpr} = \\var{q4eans}$
\nThis is a product: $\\var{-q4coeffs[0]}\\times\\var{ve}\\times\\var{q4coeffs[1]}\\times{\\var{ve}}$ so we multiply everything together.
\nNote that the first constant, $\\var{-q4coeffs[0]}$, is negative, so the final answer is negative.
", "rulesets": {}, "extensions": [], "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", "type": "question", "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/"}]}