// Numbas version: exam_results_page_options {"name": "Simultaneous equations by elimination 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "b", "ans1", "ans2", "ans3", "yCoef", "n1", "n2", "n3", "n4"], "name": "Simultaneous equations by elimination 2", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

Solve the pair of equations

\n

\\[\\begin{eqnarray} \\simplify{{n1}*x + {n2}*y} & = & \\var{ans1} &&&&&&&(1)\\\\ \\simplify{{n3}*x + {n4}*y} & = & \\var{ans2}&&&&&&&(2)\\end{eqnarray}\\]

\n

\n

We are going to solve for $y$ first. To do this, we need to eliminate $x$ from the equations. The quickest way to do this is to multiply the first equation by the co-efficient of $x$ in the second equation (here $\\var{n3}$), and multiply the second equation by the co-efficient of $x$ in the first equation (here $\\var{n1}$). We then get the equations:

\n

\n

$\\simplify{{n3}*{n1}*x + {n3}*{n2}*y  =  {ans1}*{n3}}$

\n

$\\simplify{{n1}*{n3}*x + {n1}*{n4}*y = {ans2}*{n1}}$

\n

\n

We then subtract one new equation from the other to get:

\n

$\\simplify{{yCoef}y = {ans3}}$

\n

Now we can work out $y$

\n

$y = \\var{b}$

\n

and substitute this value back in to any of the previous equations to get the value for $x$. 

\n

$\\simplify{{n1}*x + {n2}*{b} = {ans1}}$

\n

which then solves to give $x = \\var{a}$.

\n

\n

", "rulesets": {}, "parts": [{"prompt": "

Solve the pair of equations

\n

\\[\\begin{eqnarray} \\simplify{{n1}*x + {n2}*y} & = & \\var{ans1} &&&&&&&(1)\\\\ \\simplify{{n3}*x + {n4}*y} & = & \\var{ans2}&&&&&&&(2)\\end{eqnarray}\\]

\n

\n

We are going to solve for $y$ first. To do this, we need to eliminate $x$ from the equations. The quickest way to do this is to multiply the first equation by the co-efficient of $x$ in the second equation (here $\\var{n3}$), and multiply the second equation by the co-efficient of $x$ in the first equation (here $\\var{n1}$). We then get the equations:

\n

\n

[[0]]$x + $[[1]]$y  =  \\simplify{{ans1}*{n3}}$

\n

 [[2]]$x + $[[3]]$y =  \\simplify{{ans2}*{n1}}$

\n

\n

We then subtract one new equation from the other to get:

\n

[[4]]$\\simplify{y = {ans3}}$

\n

Now we can work out $y$

\n

$y =$[[5]]

\n

and substitute this value back in to any of the previous equations to get the value for $x$. 

\n

$\\simplify{{n1}*x}$ + [[6]] = $\\var{ans1}$

\n

which then solves to give $x = $[[7]].

\n

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{n3}*{n1}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{n3}*{n2}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": false, "scripts": {}, "answer": "{n1}*{n3}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{n1}*{n4}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{yCoef}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{b}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{n2}*{b}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{a}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(-10..10 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "b": {"definition": "random(-10..10 except 0 except a)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "ans1": {"definition": "{n1}*{a} + {n2}*{b}", "templateType": "anything", "group": "Ungrouped variables", "name": "ans1", "description": ""}, "ans2": {"definition": "{n3}*{a}+{n4}*{b}", "templateType": "anything", "group": "Ungrouped variables", "name": "ans2", "description": ""}, "ans3": {"definition": "{ans1}*{n3} - {ans2}*{n1}", "templateType": "anything", "group": "Ungrouped variables", "name": "ans3", "description": ""}, "yCoef": {"definition": "{n3}*{n2} - {n1}*{n4}", "templateType": "anything", "group": "Ungrouped variables", "name": "yCoef", "description": ""}, "n1": {"definition": "random(-10..10 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "n1", "description": ""}, "n2": {"definition": "random(-10..10 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "n2", "description": ""}, "n3": {"definition": "random(-10..10 except 0 except n1)", "templateType": "anything", "group": "Ungrouped variables", "name": "n3", "description": ""}, "n4": {"definition": "random(-10..10 except 0 except n2)", "templateType": "anything", "group": "Ungrouped variables", "name": "n4", "description": ""}}, "metadata": {"notes": "", "description": "

Straightforward solving linear equations question

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