// Numbas version: finer_feedback_settings {"name": "Polynomials: Equating coefficients 2 (simultaneous equations) [L4 Randomised]", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"ycans": {"group": "part c", "name": "ycans", "templateType": "anything", "definition": "(q*p-s*m)/(r*m-n*q)", "description": ""}, "r": {"group": "part c", "name": "r", "templateType": "anything", "definition": "random(-12..12 except [0,ceil(n*q/m),floor(n*q/m)])", "description": ""}, "xcans": {"group": "part c", "name": "xcans", "templateType": "anything", "definition": "(n*s-p*r)/(r*m-n*q)", "description": ""}, "p": {"group": "part c", "name": "p", "templateType": "anything", "definition": "random(-12..12 except 0)", "description": ""}, "s": {"group": "part c", "name": "s", "templateType": "anything", "definition": "random(-12..12 except 0)", "description": ""}, "n": {"group": "part c", "name": "n", "templateType": "anything", "definition": "random(-12..12 except 0)", "description": ""}, "m": {"group": "part c", "name": "m", "templateType": "anything", "definition": "random(-12..12 except 0)", "description": ""}, "q": {"group": "part c", "name": "q", "templateType": "anything", "definition": "random(-12..12 except 0)", "description": ""}}, "statement": "
Suppose that during some working, you find that
\n\\[\\simplify{{-s}x+{-p}={q}*A*x+{r}*B*x+{m}A+{n}B}\\]
\nfor all $x$.
", "tags": ["l4", "L4"], "ungrouped_variables": [], "extensions": [], "variable_groups": [{"variables": ["m", "n", "p", "q", "r", "s", "xcans", "ycans"], "name": "part c"}], "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": ""}, "name": "Polynomials: Equating coefficients 2 (simultaneous equations) [L4 Randomised]", "advice": "Two polynomials are equal if and only if their corresponding coefficients are also equal.
\nSo we 'equate the coefficients' of the polynomials given in this question, this means that the constant terms must be equal, ie
\n\n\\[\\simplify{{-p}={m}*A+{n}*B}\\qquad\\qquad(1)\\]
\nthe coefficients of the $x$ terms must be equal, ie
\n\\[\\simplify{{-s}={q}A+{r}*B}\\qquad\\qquad(2)\\]
\n\nWe now solve these equations simultaneously and find $A=\\simplify[fractionnumbers]{{xcans}}$ and $B=\\simplify[fractionnumbers]{{ycans}}$.
\n\nThe working for simulations equations
There are many ways to solve these equations simultaneously. Here is one method.
\n$\\simplify{{m}A+{n}B}$ | \n$=$ | \n$\\var{-p}$ | \n$(1)$ | \n
$\\simplify{{q}A+{r}B}$ | \n$=$ | \n$\\var{-s}$ | \n$(2)$ | \n
Solve one of the equations for one of the variables. Here we solve equation $(1)$ for $B$:
\n$\\var{n}B$ | \n$=$ | \n$\\simplify{{-m}A+{-p}}$ | \n\n |
\n | \n | \n | \n |
$B$ | \n$=$ | \n$\\displaystyle{\\simplify{({-m}A+{-p})/({n})}}$ | \n$(3)$ | \n
Substitute this expression for $B$ given in $(3)$ into $(2)$:
\n\\[\\simplify[all,!collectnumbers]{{q}A+{r}*(({-m}A+{-p})/{n}) =- {s}}\\]
\nCollect like terms:
\\[\\simplify[fractionnumbers]{{q-r*m/n}A={-s+r*p/n}}\\]
Solve for $A$:
\\[A=\\simplify[fractionnumbers]{{xcans}}\\]
Now we know the $A$ value we can determine the corresponding $B$ value by substituting $A=\\simplify[fractionnumbers]{{xcans}}$ into equation $(3)$:
$B$ | \n$=$ | \n$\\displaystyle{\\simplify[unitdenominator,!collectnumbers,fractionnumbers]{({-m}*({xcans})+{-p})/({n})}}$ | \n
\n | \n | \n |
\n | $=$ | \n$\\simplify[fractionnumbers]{{ycans}}$ | \n
Therefore the values that satisfy equations $(1)$ and $(2)$ are $A=\\simplify[fractionnumbers]{{xcans}}$ and $B=\\simplify[fractionnumbers]{{ycans}}$.
", "preamble": {"js": "", "css": ""}, "rulesets": {}, "functions": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"showCorrectAnswer": true, "sortAnswers": false, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "type": "gapfill", "scripts": {}, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "prompt": "By equating coefficients, determine the values of $A$ and $B$.
\n$A=$ [[0]], $B=$ [[1]]
\n", "gaps": [{"minValue": "xcans", "showCorrectAnswer": true, "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "type": "numberentry", "scripts": {}, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "maxValue": "xcans", "correctAnswerFraction": true, "mustBeReducedPC": 0, "variableReplacements": [], "marks": 1, "allowFractions": true, "unitTests": [], "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"minValue": "ycans", "showCorrectAnswer": true, "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "type": "numberentry", "scripts": {}, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "maxValue": "ycans", "correctAnswerFraction": true, "mustBeReducedPC": 0, "variableReplacements": [], "marks": 1, "allowFractions": true, "unitTests": [], "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "unitTests": []}], "type": "question", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Paul Hancock", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1738/"}, {"name": "Matthew James Sykes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2582/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Paul Hancock", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1738/"}, {"name": "Matthew James Sykes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2582/"}]}