// Numbas version: exam_results_page_options {"name": "Polynomials: Equating coefficients 2 (simultaneous equations)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": [], "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": ""}, "functions": {}, "preamble": {"css": "", "js": ""}, "extensions": [], "statement": "

Suppose that during some working, you find that

\n

\\[\\simplify{{-s}x+{-p}={q}*A*x+{r}*B*x+{m}A+{n}B}\\]

\n

for all $x$.

", "tags": [], "advice": "

Two polynomials are equal if and only if their corresponding coefficients are also equal.

\n

So 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)\\]

\n

the coefficients of the $x$ terms must be equal, ie

\n

\\[\\simplify{{-s}={q}A+{r}*B}\\qquad\\qquad(2)\\]

\n

\n

We now solve these equations simultaneously and find $A=\\simplify[fractionnumbers]{{xcans}}$ and $B=\\simplify[fractionnumbers]{{ycans}}$.

\n

\n
\n

\n

The working for simulations equations is given below.

\n

There are many ways to solve these equations simultaneously. Here is one method.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\simplify{{m}A+{n}B}$$=$$\\var{-p}$               $(1)$
$\\simplify{{q}A+{r}B}$$=$$\\var{-s}$               $(2)$
\n

Solve one of the equations for one of the variables. Here we solve equation $(1)$ for $B$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\var{n}B$$=$$\\simplify{{-m}A+{-p}}$
 
$B$$=$$\\displaystyle{\\simplify{({-m}A+{-p})/({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}}\\]

\n

Collect like terms:
\\[\\simplify[fractionnumbers]{{q-r*m/n}A={-s+r*p/n}}\\]

\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)$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$B$$=$$\\displaystyle{\\simplify[unitdenominator,!collectnumbers,fractionnumbers]{({-m}*({xcans})+{-p})/({n})}}$
 
$=$$\\simplify[fractionnumbers]{{ycans}}$
\n

Therefore the values that satisfy equations $(1)$ and $(2)$ are $A=\\simplify[fractionnumbers]{{xcans}}$ and $B=\\simplify[fractionnumbers]{{ycans}}$.

", "variables": {"r": {"group": "part c", "definition": "random(-12..12 except [0,ceil(n*q/m),floor(n*q/m)])", "templateType": "anything", "name": "r", "description": ""}, "q": {"group": "part c", "definition": "random(-12..12 except 0)", "templateType": "anything", "name": "q", "description": ""}, "ycans": {"group": "part c", "definition": "(q*p-s*m)/(r*m-n*q)", "templateType": "anything", "name": "ycans", "description": ""}, "n": {"group": "part c", "definition": "random(-12..12 except 0)", "templateType": "anything", "name": "n", "description": ""}, "s": {"group": "part c", "definition": "random(-12..12 except 0)", "templateType": "anything", "name": "s", "description": ""}, "xcans": {"group": "part c", "definition": "(n*s-p*r)/(r*m-n*q)", "templateType": "anything", "name": "xcans", "description": ""}, "m": {"group": "part c", "definition": "random(-12..12 except 0)", "templateType": "anything", "name": "m", "description": ""}, "p": {"group": "part c", "definition": "random(-12..12 except 0)", "templateType": "anything", "name": "p", "description": ""}}, "variable_groups": [{"variables": ["m", "n", "p", "q", "r", "s", "xcans", "ycans"], "name": "part c"}], "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}, "name": "Polynomials: Equating coefficients 2 (simultaneous equations)", "parts": [{"marks": 0, "variableReplacements": [], "scripts": {}, "type": "gapfill", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "prompt": "

By equating coefficients, determine the values of $A$ and $B$.

\n

$A=$ [[0]],   $B=$ [[1]]

\n

", "showCorrectAnswer": true, "gaps": [{"variableReplacements": [], "marks": 1, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "type": "numberentry", "allowFractions": true, "variableReplacementStrategy": "originalfirst", "maxValue": "xcans", "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "showCorrectAnswer": true, "scripts": {}, "correctAnswerFraction": true, "minValue": "xcans"}, {"variableReplacements": [], "marks": 1, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "type": "numberentry", "allowFractions": true, "variableReplacementStrategy": "originalfirst", "maxValue": "ycans", "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "showCorrectAnswer": true, "scripts": {}, "correctAnswerFraction": true, "minValue": "ycans"}]}], "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/"}]}]}], "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/"}]}