// Numbas version: finer_feedback_settings {"name": "Jos\u00e9's copy of Lois'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": "Jos\u00e9's copy of Lois's copy of Simultaneous linear equations (variables)", "tags": ["Defining variables", "Except", "Linear equations", "linear equations", "Simultaneous equations", "simultaneous equations", "solving equations", "Solving equations"], "advice": "

The first step is to make the coefficients of either $x$ or $y$ equal. For instance you could 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}

", "rulesets": {"std": ["All", "fractionnumbers"]}, "parts": [{"prompt": "

$x=$ [[0]]

\n

$y=$ [[1]]

\n

Input your answers as fractions and not as decimals.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "

Input your answer as a fraction and not a decimal.

", "showStrings": false, "strings": ["."], "partialCredit": 0}, "variableReplacements": [], "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "Std", "scripts": {}, "answer": "{b1*c-b*c1}/{a*b1-a1*b}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"notallowed": {"message": "

Input your answer as a fraction and not as a decimal.

", "showStrings": false, "strings": ["."], "partialCredit": 0}, "variableReplacements": [], "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "Std", "scripts": {}, "answer": "{-c*a1+c1*a}/{a*b1-a1*b}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "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": ""}, "preamble": {"css": "", "js": ""}, "variables": {"a": {"definition": "random(1..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(1..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(-5..5 except [0,1,-1, a])", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "a1": {"definition": "random(1..5 except a)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "b1": {"definition": "random(2..6 except[round(a1*b/a), -b, b])", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "description": ""}, "c1": {"definition": "random(1..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "c1", "description": ""}}, "metadata": {"notes": "

Lois 14/08/15: Changed definition of variables. Smaller range and tried to eliminate versions which mean that advice is a strange (e.g. multiply by 1). Still has issue of common factors.

", "description": "

Shows how to define variables to stop degenerate examples.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Jos Klenner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/84/"}]}]}], "contributors": [{"name": "Jos Klenner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/84/"}]}