// Numbas version: exam_results_page_options {"showQuestionGroupNames": false, "navigation": {"browse": true, "showresultspage": "oncompletion", "startpassword": "", "showfrontpage": false, "preventleave": false, "onleave": {"action": "none", "message": ""}, "allowregen": true, "reverse": true}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": ""}, "name": "Shivendra's copy of Maths Support: Simultaneous equations", "showstudentname": true, "question_groups": [{"pickingStrategy": "all-ordered", "pickQuestions": 1, "name": "Group", "questions": [{"name": "Simultaneous linear equations (variables)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}], "functions": {}, "ungrouped_variables": ["a", "c", "b", "a1", "b1", "c1"], "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}

\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.

", "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*}\\]

", "type": "question", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "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": []}]}, {"name": "Solving equations. (Video)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}], "functions": {}, "ungrouped_variables": ["a", "c", "b", "that", "this", "fromorto", "s1", "s6", "a1", "aort", "a2", "b1", "b2", "sc", "sb", "sa", "sc1", "c1"], "tags": ["Solving equations", "equations", "linear", "pair of linear equations", "simultaneous", "simultaneous linear equations", "solve linear equations", "solving equations", "video"], "preamble": {"css": "", "js": ""}, "advice": "\n

\\[ \\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 any of the equations (1) and (2) 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.

\n ", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "parts": [{"stepsPenalty": 0, "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

Click Show steps for a video that describes a more direct method of solving when, for example, one of the equations gives a variable directly in terms of the other variable.

", "marks": 0, "gaps": [{"notallowed": {"message": "

Input as a fraction or an integer 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*b1-b*c1}/{b1*a-a1*b}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"notallowed": {"message": "

Input as a fraction or an integer 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-a*c1}/{b*a1-a*b1}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "steps": [{"type": "information", "showCorrectAnswer": true, "scripts": {}, "prompt": "

The following video gives a direct way of solving a pair of linear equations when you can easily find one variable in terms of the other. 

\n

", "marks": 0}], "type": "gapfill"}], "statement": "

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

", "type": "question", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "sa*random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "sc*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "sb*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "that": {"definition": "lcm(abs(b),abs(b1))/abs(b1)", "templateType": "anything", "group": "Ungrouped variables", "name": "that", "description": ""}, "this": {"definition": "lcm(abs(b),abs(b1))/abs(b)", "templateType": "anything", "group": "Ungrouped variables", "name": "this", "description": ""}, "sc1": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "sc1", "description": ""}, "s1": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s1", "description": ""}, "s6": {"definition": "if(b*b1>0,-1,1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s6", "description": ""}, "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)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "aort": {"definition": "if(b*b1>0,'take away the equation','add the equation')", "templateType": "anything", "group": "Ungrouped variables", "name": "aort", "description": ""}, "a2": {"definition": "abs(a)", "templateType": "anything", "group": "Ungrouped variables", "name": "a2", "description": ""}, "b1": {"definition": "if(a*b2=a1*b,b2+1,b2)", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "description": ""}, "b2": {"definition": "random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "b2", "description": ""}, "sc": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "sc", "description": ""}, "sb": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "sb", "description": ""}, "sa": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "sa", "description": ""}, "fromorto": {"definition": "if(b*b1>0,'from','to')", "templateType": "anything", "group": "Ungrouped variables", "name": "fromorto", "description": ""}, "c1": {"definition": "sc1*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "c1", "description": ""}}, "metadata": {"notes": "\n \t\t

5/08/2012:

\n \t\t

Added more tags.

\n \t\t

Added description.

\n \t\t

Checked calculation. OK.

\n \t\t", "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.

", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}]}], "timing": {"timeout": {"action": "none", "message": ""}, "allowPause": true, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "allowrevealanswer": true, "showtotalmark": true, "showanswerstate": true, "intro": "", "feedbackmessages": [], "advicethreshold": 0}, "duration": 0, "percentPass": 0, "type": "exam", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Shivendra Dayal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3002/"}], "extensions": [], "custom_part_types": [], "resources": []}