// Numbas version: finer_feedback_settings {"name": "John's copy of Simultaneous linear equations (variables)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "c", "b", "a1", "b1", "c1"], "name": "John's copy of Simultaneous linear equations (variables)", "tags": ["Defining variables", "Except", "Linear equations", "Simultaneous equations", "Solving equations", "linear equations", "simultaneous equations", "solving equations"], "preamble": {"css": "", "js": ""}, "advice": "
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}
Next, subtract the second equation from the first to get
\n\\[ \\simplify[std]{{a*b1-a1*b}x} = \\var{c*b1-c1*b} \\]
\nSo $x = \\simplify[std]{{(c*b1-c1*b)/(a*b1-a1*b)}}$.
\nSubstitute 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}
$x=$ [[0]]
\n$y=$ [[1]]
\ninput your answers as fractions and not as decimals.
", "marks": 0, "gaps": [{"notallowed": {"message": "Input your answer as a fraction and not a decimal.
", "showStrings": false, "strings": ["."], "partialCredit": 0}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "Std", "scripts": {}, "answer": "{b1*c-b*c1}/{a*b1-a1*b}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"notallowed": {"message": "Input your answer as a fraction and not as a decimal.
", "showStrings": false, "strings": ["."], "partialCredit": 0}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "Std", "scripts": {}, "answer": "{-c*a1+c1*a}/{a*b1-a1*b}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "Solve:
\n\\[\\begin{eqnarray*} \\simplify{{a}x+{b}y}&=&\\var{c}\\\\\\\\\\simplify{{a1}x+{b1}y}&=&\\var{c1}\\end{eqnarray*}\\]
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "type": "question", "variables": {"a": {"definition": "random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(-9..9 except [0,a])", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "a1": {"definition": "random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "b1": {"definition": "random(1..9 except round(a1*b/a))", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "description": ""}, "c1": {"definition": "random(1..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "c1", "description": ""}}, "metadata": {"notes": "", "description": "Shows how to define variables to stop degenerate examples.
", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "John Bridges", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/913/"}]}]}], "contributors": [{"name": "John Bridges", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/913/"}]}