// Numbas version: finer_feedback_settings {"name": "Solving two linear equations", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"scripts": {}, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "prompt": "

Input the value for \\(x\\) as an exact fraction.

\n

\\(x = \\) [[0]]

\n

Input the value for \\(y\\) as an exact fraction.

\n

\\(y = \\) [[1]]

", "type": "gapfill", "variableReplacementStrategy": "originalfirst", "gaps": [{"notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "maxValue": "({d}*{r1}-{b}*{r2})/({a}*{d}-{b}*{c})", "mustBeReduced": false, "showCorrectAnswer": true, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "correctAnswerFraction": true, "allowFractions": true, "minValue": "({d}*{r1}-{b}*{r2})/({a}*{d}-{b}*{c})", "marks": 1, "variableReplacements": [], "showFeedbackIcon": true}, {"notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "maxValue": "(-{c}*{r1}+{a}*{r2})/({a}*{d}-{b}*{c})", "mustBeReduced": false, "showCorrectAnswer": true, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "correctAnswerFraction": true, "allowFractions": true, "minValue": "(-{c}*{r1}+{a}*{r2})/({a}*{d}-{b}*{c})", "marks": 1, "variableReplacements": [], "showFeedbackIcon": true}]}], "statement": "

Solve the following system of simultaneous equations:

\n

\\(\\var{a}x+\\var{b}y=\\var{r1}\\)

\n

and

\n

\\(\\var{c}x+\\var{d}y=\\var{r2}\\)

", "rulesets": {}, "variable_groups": [], "ungrouped_variables": ["a", "b", "c", "d", "r1", "r2"], "name": "Solving two linear equations", "functions": {}, "extensions": [], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Solving two simultaneous linear equations

"}, "variablesTest": {"condition": "{a}*{d}>{b}*{c}\n", "maxRuns": 100}, "advice": "

equation (i)    \\(\\var{a}x+\\var{b}y=\\var{r1}\\)

\n

equation (ii)    \\(\\var{c}x+\\var{d}y=\\var{r2}\\)

\n

If we decide to eliminate the \\(x\\) variables we need to have the same number of \\(x\\) in both equations

\n

\\(\\var{c}\\)*equation (i)      \\(\\simplify{{c}*{a}}x+\\simplify{{c}*{b}}y=\\simplify{{c}*{r1}}\\)

\n

\\(\\var{a}\\)*equation (ii)     \\(\\simplify{{c}*{a}}x+\\simplify{{d}*{a}}y=\\simplify{{a}*{r2}}\\)

\n

Subtracting gives:

\n

                      \\(\\simplify{{c}*{b}-{d}*{a}}y=\\simplify{{c}*{r1}-{a}*{r2}}\\)

\n

                       \\(y=\\simplify{({c}*{r1}-{a}*{r2})/({c}*{b}-{d}*{a})}\\)

\n

Substituting this solution for \\(y\\) into equation (i) gives

\n

       \\(\\var{a}x+\\var{b}*(\\simplify{({c}*{r1}-{a}*{r2})/({c}*{b}-{d}*{a})})=\\var{r1}\\)

\n

        \\(\\var{a}x=\\var{r1}-\\var{b}*(\\simplify{({c}*{r1}-{a}*{r2})/({c}*{b}-{d}*{a})})\\)

\n

        \\(\\var{a}x=\\simplify{{r1}-{b}*({c}*{r1}-{a}*{r2})/({c}*{b}-{d}*{a})}\\)

\n

\n

        \\(x=\\simplify{({r1}-{b}*({c}*{r1}-{a}*{r2})/({c}*{b}-{d}*{a}))/{a}}\\)

\n

", "preamble": {"css": "", "js": ""}, "variables": {"b": {"name": "b", "templateType": "randrange", "group": "Ungrouped variables", "description": "", "definition": "random(2..12#1)"}, "d": {"name": "d", "templateType": "randrange", "group": "Ungrouped variables", "description": "", "definition": "random(2..12#1)"}, "r1": {"name": "r1", "templateType": "randrange", "group": "Ungrouped variables", "description": "", "definition": "random(10..40#1)"}, "c": {"name": "c", "templateType": "randrange", "group": "Ungrouped variables", "description": "", "definition": "random(2..11#1)"}, "a": {"name": "a", "templateType": "randrange", "group": "Ungrouped variables", "description": "", "definition": "random(1..10#1)"}, "r2": {"name": "r2", "templateType": "randrange", "group": "Ungrouped variables", "description": "", "definition": "random(16..50#1)"}}, "tags": [], "type": "question", "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}]}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}