// Numbas version: finer_feedback_settings {"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": [{"extensions": [], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Straightforward solving linear equations question

"}, "statement": "", "functions": {}, "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"b": {"templateType": "anything", "name": "b", "description": "", "group": "Ungrouped variables", "definition": "random(-10..10 except 0 except a)"}, "yCoef": {"templateType": "anything", "name": "yCoef", "description": "", "group": "Ungrouped variables", "definition": "{n3}*{n2} - {n1}*{n4}"}, "n1": {"templateType": "anything", "name": "n1", "description": "", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)"}, "ans3": {"templateType": "anything", "name": "ans3", "description": "", "group": "Ungrouped variables", "definition": "{ans1}*{n3} - {ans2}*{n1}"}, "ans1": {"templateType": "anything", "name": "ans1", "description": "", "group": "Ungrouped variables", "definition": "{n1}*{a} + {n2}*{b}"}, "n2": {"templateType": "anything", "name": "n2", "description": "", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)"}, "n4": {"templateType": "anything", "name": "n4", "description": "", "group": "Ungrouped variables", "definition": "random(-10..10 except 0 except n2)"}, "n3": {"templateType": "anything", "name": "n3", "description": "", "group": "Ungrouped variables", "definition": "random(-10..10 except 0 except n1)"}, "ans2": {"templateType": "anything", "name": "ans2", "description": "", "group": "Ungrouped variables", "definition": "{n3}*{a}+{n4}*{b}"}, "a": {"templateType": "anything", "name": "a", "description": "", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)"}}, "ungrouped_variables": ["a", "b", "ans1", "ans2", "ans3", "yCoef", "n1", "n2", "n3", "n4"], "tags": [], "preamble": {"js": "", "css": ""}, "variable_groups": [], "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

", "name": "Simultaneous equations by elimination 2", "parts": [{"gaps": [{"failureRate": 1, "vsetRangePoints": 5, "checkVariableNames": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "marks": 1, "answer": "{n3}*{n1}", "valuegenerators": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "type": "jme", "scripts": {}, "customName": "", "showPreview": true, "variableReplacements": [], "useCustomName": false, "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "unitTests": []}, {"failureRate": 1, "vsetRangePoints": 5, "checkVariableNames": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "marks": 1, "answer": "{n3}*{n2}", "valuegenerators": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "type": "jme", "scripts": {}, "customName": "", "showPreview": true, "variableReplacements": [], "useCustomName": false, "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "unitTests": []}, {"failureRate": 1, "vsetRangePoints": 5, "checkVariableNames": false, "showFeedbackIcon": true, "showCorrectAnswer": false, "marks": 1, "answer": "{n1}*{n3}", "valuegenerators": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "type": "jme", "scripts": {}, "customName": "", "showPreview": true, "variableReplacements": [], "useCustomName": false, "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "unitTests": []}, {"failureRate": 1, "vsetRangePoints": 5, "checkVariableNames": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "marks": 1, "answer": "{n1}*{n4}", "valuegenerators": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "type": "jme", "scripts": {}, "customName": "", "showPreview": true, "variableReplacements": [], "useCustomName": false, "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "unitTests": []}, {"failureRate": 1, "vsetRangePoints": 5, "checkVariableNames": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "marks": 1, "answer": "{yCoef}", "valuegenerators": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "type": "jme", "scripts": {}, "customName": "", "showPreview": true, "variableReplacements": [], "useCustomName": false, "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "unitTests": []}, {"failureRate": 1, "vsetRangePoints": 5, "checkVariableNames": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "marks": 1, "answer": "{b}", "valuegenerators": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "type": "jme", "scripts": {}, "customName": "", "showPreview": true, "variableReplacements": [], "useCustomName": false, "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "unitTests": []}, {"failureRate": 1, "vsetRangePoints": 5, "checkVariableNames": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "marks": 1, "answer": "{n2}*{b}", "valuegenerators": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "type": "jme", "scripts": {}, "customName": "", "showPreview": true, "variableReplacements": [], "useCustomName": false, "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "unitTests": []}, {"failureRate": 1, "vsetRangePoints": 5, "checkVariableNames": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "marks": 1, "answer": "{a}", "valuegenerators": [], "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "type": "jme", "scripts": {}, "customName": "", "showPreview": true, "variableReplacements": [], "useCustomName": false, "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "unitTests": []}], "sortAnswers": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "marks": 0, "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

", "variableReplacementStrategy": "originalfirst", "type": "gapfill", "scripts": {}, "customName": "", "variableReplacements": [], "useCustomName": false, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "unitTests": []}], "type": "question", "contributors": [{"name": "", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/514/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}], "resources": []}]}], "contributors": [{"name": "", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/514/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}