// Numbas version: exam_results_page_options {"name": "Solve a linear equation $ax+b = cx+d$", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "

Solve a simple linear equation algebraically. The unknown appears on both sides of the equation.

", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["d", "f", "g", "h", "x", "gcd_hfdg", "hf_coprime", "dg_coprime", "finalb"], "type": "question", "rulesets": {}, "extensions": [], "variable_groups": [], "statement": "", "name": "Solve a linear equation $ax+b = cx+d$", "advice": "

We are asked to solve the equation

\n

\\[ \\var{d}x-\\var{f}=\\var{g}x+\\var{h} \\]

\n

In this equation, there are $x$ terms and constant terms on both sides of the equals sign.

\n

To solve this equation, we must rearrange it to get $x$ on its own.

\n

\\begin{align}
\\var{d}x-\\var{f} &= \\var{g}x+\\var{h} \\\\[0.5em]
\\var{d}x-\\var{g}x &= \\var{h}+\\var{f} & \\text{Move } x \\text{ terms to the left, and constant terms to the right.}\\\\[0.5em]
\\simplify{{d-g}*x} &= {\\var{h+f}} & \\text{Collect like terms together.}\\\\[0.5em]
x &=\\frac{\\var{h+f}}{\\var{d-g}} & \\text{Divide both sides by } \\var{d-g} \\text{.} \\\\[0.5em]
x &= \\simplify{{h+f}/{d-g}}
\\end{align}

", "parts": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

$\\var{d}x-\\var{f}=\\var{g}x+\\var{h}$

\n

What is the value of $x$?

\n

$x = $ [[0]]

", "gaps": [{"correctAnswerFraction": false, "showCorrectAnswer": true, "mustBeReducedPC": 0, "showFeedbackIcon": true, "marks": "2", "minValue": "finalb", "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "finalb", "mustBeReduced": false, "allowFractions": false, "variableReplacements": [], "correctAnswerStyle": "plain"}], "showFeedbackIcon": true, "marks": 0}], "tags": ["taxonomy"], "preamble": {"js": "", "css": ""}, "functions": {}, "variables": {"dg_coprime": {"description": "", "group": "Ungrouped variables", "definition": "(d-g)/gcd_hfdg", "name": "dg_coprime", "templateType": "anything"}, "x": {"description": "", "group": "Ungrouped variables", "definition": "random(2..6)", "name": "x", "templateType": "anything"}, "gcd_hfdg": {"description": "", "group": "Ungrouped variables", "definition": "gcd((h+f),(d-g))", "name": "gcd_hfdg", "templateType": "anything"}, "hf_coprime": {"description": "", "group": "Ungrouped variables", "definition": "(h+f)/gcd_hfdg", "name": "hf_coprime", "templateType": "anything"}, "f": {"description": "", "group": "Ungrouped variables", "definition": "random(2..6)", "name": "f", "templateType": "anything"}, "h": {"description": "", "group": "Ungrouped variables", "definition": "(x*(d-g))-f", "name": "h", "templateType": "anything"}, "g": {"description": "", "group": "Ungrouped variables", "definition": "random(2..5)", "name": "g", "templateType": "anything"}, "finalb": {"description": "", "group": "Ungrouped variables", "definition": "hf_coprime/dg_coprime", "name": "finalb", "templateType": "anything"}, "d": {"description": "", "group": "Ungrouped variables", "definition": "random(g+2..8)", "name": "d", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}