// Numbas version: exam_results_page_options {"name": "Simon's copy of Solving equations", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Simon's copy of Solving equations", "preamble": {"js": "", "css": ""}, "variable_groups": [], "variables": {"b": {"templateType": "anything", "name": "b", "definition": "sb*random(1..9)", "description": "", "group": "Ungrouped variables"}, "c1": {"templateType": "anything", "name": "c1", "definition": "sc1*random(1..9)", "description": "", "group": "Ungrouped variables"}, "s6": {"templateType": "anything", "name": "s6", "definition": "if(b*b1>0,-1,1)", "description": "", "group": "Ungrouped variables"}, "b1": {"templateType": "anything", "name": "b1", "definition": "if(a*b2=a1*b,b2+1,b2)", "description": "", "group": "Ungrouped variables"}, "this": {"templateType": "anything", "name": "this", "definition": "lcm(abs(b),abs(b1))/abs(b)", "description": "", "group": "Ungrouped variables"}, "a2": {"templateType": "anything", "name": "a2", "definition": "abs(a)", "description": "", "group": "Ungrouped variables"}, "sc1": {"templateType": "anything", "name": "sc1", "definition": "random(1,-1)", "description": "", "group": "Ungrouped variables"}, "sc": {"templateType": "anything", "name": "sc", "definition": "random(1,-1)", "description": "", "group": "Ungrouped variables"}, "fromorto": {"templateType": "anything", "name": "fromorto", "definition": "if(b*b1>0,'from','to')", "description": "", "group": "Ungrouped variables"}, "a1": {"templateType": "anything", "name": "a1", "definition": "switch(a2=2,random(3,5,7,9),a2=3,random(2,4,5,7),a2=4,random(3,5,7,9),a2=5,random(3,4,6,7,9),a2=6,random(4,5,7,8,9),a2=7,random(3,4,5,6,8,9),a2=8,random(3,5,6,7,9),a2=9,random(2,4,5,7,8),9)", "description": "", "group": "Ungrouped variables"}, "aort": {"templateType": "anything", "name": "aort", "definition": "if(b*b1>0,'take away the equation','add the equation')", "description": "", "group": "Ungrouped variables"}, "a": {"templateType": "anything", "name": "a", "definition": "sa*random(2..9)", "description": "", "group": "Ungrouped variables"}, "s1": {"templateType": "anything", "name": "s1", "definition": "random(1,-1)", "description": "", "group": "Ungrouped variables"}, "that": {"templateType": "anything", "name": "that", "definition": "lcm(abs(b),abs(b1))/abs(b1)", "description": "", "group": "Ungrouped variables"}, "sa": {"templateType": "anything", "name": "sa", "definition": "random(1,-1)", "description": "", "group": "Ungrouped variables"}, "c": {"templateType": "anything", "name": "c", "definition": "sc*random(1..9)", "description": "", "group": "Ungrouped variables"}, "b2": {"templateType": "anything", "name": "b2", "definition": "random(2..9)", "description": "", "group": "Ungrouped variables"}, "sb": {"templateType": "anything", "name": "sb", "definition": "random(1,-1)", "description": "", "group": "Ungrouped variables"}}, "statement": "

Solve the following simultaneous equations for $x$ and $y$. Input your answers as fractions or integers, not as decimals.

", "parts": [{"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "sortAnswers": false, "marks": 0, "scripts": {}, "type": "gapfill", "gaps": [{"vsetRangePoints": 5, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "marks": 1, "scripts": {}, "expectedVariableNames": [], "answer": "{c*b1-b*c1}/{b1*a-a1*b}", "type": "jme", "showPreview": true, "notallowed": {"partialCredit": 0, "message": "

Input as a fraction or an integer not as a decimal

", "showStrings": false, "strings": ["."]}, "vsetRange": [0, 1], "showCorrectAnswer": true, "failureRate": 1, "answerSimplification": "std", "showFeedbackIcon": true, "unitTests": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "variableReplacements": [], "checkVariableNames": false}, {"vsetRangePoints": 5, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "marks": 1, "scripts": {}, "expectedVariableNames": [], "answer": "{c*a1-a*c1}/{b*a1-a*b1}", "type": "jme", "showPreview": true, "notallowed": {"partialCredit": 0, "message": "

Input as a fraction or an integer not as a decimal

", "showStrings": false, "strings": ["."]}, "vsetRange": [0, 1], "showCorrectAnswer": true, "failureRate": 1, "answerSimplification": "std", "showFeedbackIcon": true, "unitTests": [], "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "variableReplacements": [], "checkVariableNames": false}], "showCorrectAnswer": true, "showFeedbackIcon": true, "unitTests": [], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "prompt": "

\\[ \\begin{eqnarray} \\simplify[std]{{a}x+{b}y}&=&\\var{c}\\\\ \\simplify[std]{{a1}x+{b1}y}&=&\\var{c1} \\end{eqnarray} \\]

\n

$x=\\phantom{{}}$[[0]], $y=\\phantom{{}}$[[1]]

\n

Input your answers as fractions or integers, not as decimals.

\n

"}], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Solve for $x$ and $y$:  \\[ \\begin{eqnarray} a_1x+b_1y&=&c_1\\\\   a_2x+b_2y&=&c_2 \\end{eqnarray} \\]

\n

The included video describes a more direct method of solving when, for example, one of the equations gives a variable directly in terms of the other variable.

"}, "variablesTest": {"condition": "{a}<>{a1} and {b}<>{b1}", "maxRuns": 100}, "extensions": [], "tags": [], "ungrouped_variables": ["a", "c", "b", "that", "this", "fromorto", "s1", "s6", "a1", "aort", "a2", "b1", "b2", "sc", "sb", "sa", "sc1", "c1"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "functions": {}, "advice": "

\\[ \\begin{eqnarray} \\simplify[std]{{a}x+{b}y}&=&\\var{c}&\\mbox{ ........(1)}\\\\ \\simplify[std]{{a1}x+{b1}y}&=&\\var{c1}&\\mbox{ ........(2)} \\end{eqnarray} \\]
To get a solution for $x$ multiply equation (1) by {this} and equation (2) by {that}

\n

This gives:
\\[ \\begin{eqnarray} \\simplify[std]{{a*this}x+{b*this}y}&=&\\var{this*c}&\\mbox{ ........(3)}\\\\ \\simplify[std]{{a1*that}x+{b1*that}y}&=&\\var{that*c1}&\\mbox{ ........(4)} \\end{eqnarray} \\]
Now {aort} (4) {fromorto} equation (3) to get
\\[\\simplify[std]{({a*this}+{s6*a1*that})x={this*c}+{s6*that*c1}}\\]
And so we get the solution for $x$:
\\[x = \\simplify{{c*b1-b*c1}/{b1*a-a1*b}}\\]
Substituting this value into either of the equations (1) and (2), then solving for $y$ gives:
\\[y = \\simplify{{c*a1-a*c1}/{b*a1-a*b1}}\\]
You can check that these solutions are correct by seeing if they satisfy both equations (1) and (2) by substituting these values into the equations.

", "type": "question", "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}