// Numbas version: exam_results_page_options {"name": "Gareth's copy of Denis's copy of Simultaneous equations (2)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"c1": {"templateType": "anything", "description": "", "definition": "random(1..5)", "group": "Ungrouped variables", "name": "c1"}, "c": {"templateType": "anything", "description": "", "definition": "random(1..9)", "group": "Ungrouped variables", "name": "c"}, "b": {"templateType": "anything", "description": "", "definition": "random(-9..9 except [0,a])", "group": "Ungrouped variables", "name": "b"}, "a1": {"templateType": "anything", "description": "", "definition": "random(1..9)", "group": "Ungrouped variables", "name": "a1"}, "b1": {"templateType": "anything", "description": "", "definition": "random(1..9 except round(a1*b/a))", "group": "Ungrouped variables", "name": "b1"}, "a": {"templateType": "anything", "description": "", "definition": "random(1..9)", "group": "Ungrouped variables", "name": "a"}}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Shows how to define variables to stop degenerate examples.

Multiply the first equation by $\\var{b1}$ and the second equation by $\\var{b}$ so they both have the same $y$ coefficient:

\n

\\begin{align}
\\simplify{{a*b1}x+{b*b1}y} &= \\var{c*b1} \\\\
\\simplify{{a1*b}x+{b1*b}y} &= \\var{c1*b}
\\end{align}

\n

Next, subtract the second equation from the first to get

\n

\$\\simplify[std]{{a*b1-a1*b}x} = \\var{c*b1-c1*b} \$

\n

So $x = \\simplify[std]{{(c*b1-c1*b)/(a*b1-a1*b)}}$.

\n

Substitute this value of $x$ into the first equation and rearrange to obtain $y$:

\n

\\begin{align}
\\simplify[std]{{a}*{(c*b1-c1*b)/(a*b1-a1*b)} + {b}y} &= \\var{c} \\\\
\\simplify[std]{{b}y} &= \\simplify[std]{{c}-{a*(c*b1-c1*b)/(a*b1-a1*b)}} \\\\
y &= \\simplify[std]{{(c-a*(c*b1-c1*b)/(a*b1-a1*b))/b}}
\\end{align}

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "statement": "

Solve the following pair of simultaneous equations:

\n

\$\\begin{eqnarray*} \\simplify{{a}x+{b}y}&=&\\var{c}\\\\\\\\\\simplify{{a1}x+{b1}y}&=&\\var{c1}\\end{eqnarray*}\$

", "ungrouped_variables": ["a", "c", "b", "a1", "b1", "c1"], "rulesets": {"std": ["All", "fractionnumbers"]}, "functions": {}, "name": "Gareth's copy of Denis's copy of Simultaneous equations (2)", "extensions": [], "parts": [{"prompt": "

$x=$ [[0]]

\n

$y=$ [[1]]

\n

input your answers as fractions in the form a/b and not as decimals.

", "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrange": [0, 1], "scripts": {}, "expectedvariablenames": [], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showpreview": true, "notallowed": {"partialCredit": 0, "showStrings": false, "message": "