// Numbas version: exam_results_page_options {"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": ""}}, "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "

Very good feedback and corresponds to instance of randomisation

"}, "tags": ["l4", "L4"], "extensions": [], "preamble": {"js": "", "css": ""}, "variable_groups": [{"variables": ["m", "n", "p", "q", "r", "s", "xcans", "ycans"], "name": "part c"}], "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$.

", "ungrouped_variables": [], "parts": [{"showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "type": "gapfill", "scripts": {}, "showFeedbackIcon": true, "prompt": "

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

\n

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

\n

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

", "rulesets": {}, "functions": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "name": "Polynomials: Equating coefficients 2 (simultaneous equations) [L4 Randomised]", "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": "Abbi Mullins", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2466/"}, {"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": "Abbi Mullins", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2466/"}, {"name": "Matthew James Sykes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2582/"}]}