// Numbas version: exam_results_page_options {"name": "Dividing a polynomial with remainders, using algebraic division", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "preventleave": false, "showfrontpage": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"js": "", "css": ""}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}], "functions": {}, "type": "question", "variables": {"coef_x": {"name": "coef_x", "group": "Ungrouped variables", "templateType": "anything", "description": "

Coefficient of x in part b.

", "definition": "random(-3..3 except 0 except const2)"}, "a": {"name": "a", "group": "Ungrouped variables", "templateType": "anything", "description": "

Positive coefficient of x^3

", "definition": "random(1..3)"}, "c": {"name": "c", "group": "Ungrouped variables", "templateType": "anything", "description": "

Coefficient of x.

", "definition": "random(-4..4 except 0)"}, "const": {"name": "const", "group": "Ungrouped variables", "templateType": "anything", "description": "

Constant term in part b.

", "definition": "random(-4..4 except 0)"}, "const2": {"name": "const2", "group": "Ungrouped variables", "templateType": "anything", "description": "

Constant term in the divisor in part b.

", "definition": "random(-3..3 except 0)"}, "coef2_x": {"name": "coef2_x", "group": "Ungrouped variables", "templateType": "anything", "description": "

Coefficient of x in divisor in part b.

", "definition": "random(-3..3 except 0)"}, "b": {"name": "b", "group": "Ungrouped variables", "templateType": "anything", "description": "

Coefficient of x^2.

", "definition": "random(-4..4 except 0 except f)"}, "f": {"name": "f", "group": "Ungrouped variables", "templateType": "anything", "description": "

Dividing term.

", "definition": "random(-4..4 except 0 except 1 except -1 except 2 except -2)"}, "d": {"name": "d", "group": "Ungrouped variables", "templateType": "anything", "description": "

Free coefficient.

", "definition": "random(-4..4 except c except 0)"}, "coef_x2": {"name": "coef_x2", "group": "Ungrouped variables", "templateType": "anything", "description": "

Coefficient of x^2 in part b.

", "definition": "random(-3..3 except 0 except coef2_x)"}, "n": {"name": "n", "group": "Ungrouped variables", "templateType": "anything", "description": "

Used to simplify calculation.

", "definition": "((b)-(a)*(f))*f"}}, "parts": [{"expectedvariablenames": [], "variableReplacements": [], "marks": 1, "showpreview": true, "showFeedbackIcon": true, "prompt": "

Find the remainder when $g(x) = \\simplify{{a}x^3+{b}x^2+{c}x+{d}}$ is divided by $(\\simplify{x+{f}})$.

", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "vsetrangepoints": 5, "vsetrange": [0, 1], "checkvariablenames": false, "answer": "{{d}-{c}*{f}+{b}*{f}^2-{a}*{f}^3}", "checkingaccuracy": 0.001, "type": "jme", "scripts": {}}, {"expectedvariablenames": [], "variableReplacements": [], "marks": 1, "showpreview": true, "showFeedbackIcon": true, "prompt": "

Find the remainder when $p(x) = \\simplify{x^3+{coef_x2}x^2+{coef_x}x+{const}}$ is divided by $\\simplify{x^2+{coef2_x}x+{const2}}$.

", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "vsetrangepoints": 5, "vsetrange": [0, 1], "checkvariablenames": false, "answer": "({coef_x-const2-coef2_x*(coef_x2-coef2_x)})x+{const-const2*(coef_x2-coef2_x)} ", "checkingaccuracy": 0.001, "type": "jme", "scripts": {}}], "tags": ["algebraic division", "division with remainder", "Long division", "long division", "polynomials", "Polynomials", "taxonomy"], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find the remainder when dividing two polynomials, by algebraic long division.

"}, "statement": "", "advice": "

Algebraic long division is a method of presenting the division of polynomials.

\n

For example, we can use long division to write

\n

\$\\displaystyle\\frac{\\simplify{x^3+4x^2+5x+8}}{\\simplify{x-2}} = \\simplify{x-2}\\;\\overline{)\\simplify{x^3+4x^2+5x+8}}.\$

\n

Notice that we write the denominator - the polynomial we're dividing by - to the left of the numerator - the polynomial to be divided - with a division line between them.

\n

The process of long division goes as follows:

\n
\n
• Divide the first term of the numerator by the first term of the denominator; this becomes the first term of the answer.
• \n
• Multiply the denominator by the term you just obtained, and write the result directly below the numerator.
• \n
• Subtract this expression from the numerator to obtain a new polynomial representing the remainder.
• \n
\n

We then repeat these same steps with the remainder until we are only left with an integer or a polynomial of lower degree than the denominator.

\n

#### a)

\n

The long division illustration will be shown for each step in the following calculation:

\n

To divide $\\simplify[all,!noleadingMinus]{{a}x^3+{b}x^2+{c}x+{d}}$ by $(\\simplify[all,!noleadingMinus]{x+{f}})$, using algebraic division, we must first divide the first term of the polynomial by the first term of the divisor, which in this case is $x$, so that

\n

\\\begin{align} \\simplify{{a}x^3} \\div x &= \\simplify{{a}x^2}. & &\\,\\,\\simplify{{a}x^2}\\\\ && \\simplify[all,!noleadingMinus]{x+{f}} \\; &\\overline{)\\simplify[all,!noleadingMinus]{{a}x^3+{b}x^2+{c}x+{d}}}\\\\ \\end{align} \

\n

Next, we multiply $(\\simplify{x+{f}})$ by $\\simplify{{a}x^2}$, giving us

\n

\\\begin{align} \\simplify{{a}x^2} \\times (\\simplify{x+{f}}) &= \\simplify[all,!noleadingMinus]{{a}x^3+{a}{f}x^2}. &&\\,\\,\\simplify{{a}x^2}\\\\ &&\\simplify[all,!noleadingMinus]{x+{f}} \\; &\\overline{)\\simplify[all,!noleadingMinus]{{a}x^3+{b}x^2+{c}x+{d}}}\\\\ &&&\\;\\, \\simplify[all,!noleadingMinus]{{a}x^3+{a}{f}x^2}\\\\ \\end{align} \

\n

Then, we subtract this expression from the first two terms of the polynomial, which gives

\n

\\\begin{align} (\\simplify[all,!noleadingMinus]{{a}x^3+{b}x^2}) - (\\simplify{{a}x^3+{a}{f}x^2}) &= \\simplify[all,!noleadingMinus]{({b-a*f})x^2}. &&\\,\\,\\simplify{{a}x^2}\\\\ &&\\simplify[all,!noleadingMinus]{x+{f}} \\; &\\overline{)\\simplify[all,!noleadingMinus]{{a}x^3+{b}x^2+{c}x+{d}}}\\\\ &&&\\;\\, \\simplify[all,!noleadingMinus]{{a}x^3+{a}{f}x^2}\\\\ &&&\\;\\qquad\\quad \\overline{\\simplify[all,!noleadingMinus]{({b-a*f})x^2+{c}x+{d}}}\\text{.}\\\\ \\end{align} \

\n

We bring the $\\simplify[all,!noleadingMinus]{{c}x+{d}}$ down from the line above, as these terms have not yet been used in the calculation.

\n

We then repeat the previous steps for this new polynomial.

\n

We divide the first term of the new polynomial by the first term of the divisor.

\n

Dividing $\\simplify[all,!noleadingMinus]{({b-a*f})x^2}$ by $x$, gives

\n

\\\begin{align} \\simplify[all,!noleadingMinus]{({b-a*f})x^2} \\div x &= \\simplify[all,!noleadingMinus]{({b-a*f})x}. &&\\,\\,\\simplify{{a}x^2+({b}-{a}{f})x}\\\\ &&\\simplify[all,!noleadingMinus]{x+{f}} \\; &\\overline{)\\simplify[all,!noleadingMinus]{{a}x^3+{b}x^2+{c}x+{d}}}\\\\ &&&\\;\\, \\simplify[all,!noleadingMinus]{{a}x^3+{a}{f}x^2}\\\\ &&&\\;\\;\\qquad\\quad \\overline{\\simplify[all,!noleadingMinus]{({b-a*f})x^2+{c}x+{d}}}\\text{.}\\\\ \\end{align} \

\n

Multiplying $(\\simplify{x+{f}})$ by $\\simplify{({b-a*f})x}$ gives us

\n

\\\begin{align} \\simplify{({b-a*f})x} \\times (\\simplify{x+{f}}) &= \\simplify[all,!noleadingMinus]{({b-a*f})x^2+{n}x}. &&\\,\\,\\simplify{{a}x^2+({b}-{a}{f})x}\\\\ &&\\simplify[all,!noleadingMinus]{x+{f}} \\; &\\overline{)\\simplify[all,!noleadingMinus]{{a}x^3+{b}x^2+{c}x+{d}}}\\\\ &&&\\;\\, \\simplify[all,!noleadingMinus]{{a}x^3+{a}{f}x^2}\\\\ &&&\\;\\;\\qquad\\quad \\overline{\\simplify[all,!noleadingMinus]{({b-a*f})x^2+{c}x+{d}}}\\\\ &&&\\;\\;\\qquad\\quad \\simplify[all,!noleadingMinus]{({b-a*f})x^2+{n}x}\\\\ \\end{align} \

\n

Now, subtracting $\\simplify[all,!noleadingMinus]{({b-a*f})x^2+{n}x}$ from $\\simplify[all,!noleadingMinus]{({b-a*f})x^2+{c}x+{d}}$ so that

\n

\\\begin{align} (\\simplify[all,!noleadingMinus]{({b-a*f})x^2+{c}x+{d}}) - (\\simplify[all,!noleadingMinus]{({b-a*f})x^2+{n}x}) &= \\simplify{({c-n})x+{d}}. &&\\,\\,\\simplify{{a}x^2+({b}-{a}{f})x}\\\\ &&\\simplify[all,!noleadingMinus]{x+{f}} \\; &\\overline{)\\simplify[all,!noleadingMinus]{{a}x^3+{b}x^2+{c}x+{d}}}\\\\ &&&\\;\\, \\simplify[all,!noleadingMinus]{{a}x^3+{a}{f}x^2}\\\\ &&&\\;\\;\\qquad\\quad \\overline{\\simplify[all,!noleadingMinus]{({b-a*f})x^2+{c}x+{d}}}\\\\ &&&\\;\\;\\qquad\\quad \\simplify[all,!noleadingMinus]{({b-a*f})x^2+{n}x}\\\\ &&&\\;\\;\\;\\qquad\\quad\\quad\\quad\\quad \\overline{\\simplify[all,!noleadingMinus]{{{c}-{b}*{f}+{a}*{f}^2}x+{d}}}\\text{.}\\\\ \\end{align} \

\n

Finally, we have to repeat this method one more time.

\n

We divide the first term of the new polynomial by the first term of the divisor.

\n

Hence, we divide $\\simplify{({c-n})x}$ by $x$, so that

\n

\\\begin{align} \\simplify{({c-n})x} \\div x &= \\simplify{{c-n}}. &&\\,\\,\\simplify{{a}x^2+({b}-{a}{f})x+{{c}-{b}*{f}+{a}*{f}^2}}\\\\ &&\\simplify[all,!noleadingMinus]{x+{f}} \\; &\\overline{)\\simplify[all,!noleadingMinus]{{a}x^3+{b}x^2+{c}x+{d}}}\\\\ &&&\\;\\, \\simplify[all,!noleadingMinus]{{a}x^3+{a}{f}x^2}\\\\ &&&\\;\\;\\qquad\\quad \\overline{\\simplify[all,!noleadingMinus]{({b-a*f})x^2+{c}x+{d}}}\\\\ &&&\\;\\;\\qquad\\quad \\simplify[all,!noleadingMinus]{({b-a*f})x^2+{n}x}\\\\ &&&\\;\\;\\;\\qquad\\quad\\quad\\quad\\quad \\overline{\\simplify[all,!noleadingMinus]{{{c}-{b}*{f}+{a}*{f}^2}x+{d}}}\\\\ \\end{align} \

\n

Then, multiply $(\\simplify{x+{f}})$ by $\\simplify{{c-n}}$, giving us

\n

\\\begin{align} \\simplify{{c-n}} \\times (\\simplify{x+{f}}) &= \\simplify{({c-n})x+{c-n}{f}}. &&\\,\\,\\simplify{{a}x^2+({b}-{a}{f})x+{{c}-{b}*{f}+{a}*{f}^2}}\\\\ &&\\simplify[all,!noleadingMinus]{x+{f}} \\; &\\overline{)\\simplify[all,!noleadingMinus]{{a}x^3+{b}x^2+{c}x+{d}}}\\\\ &&&\\;\\, \\simplify[all,!noleadingMinus]{{a}x^3+{a}{f}x^2}\\\\ &&&\\;\\;\\qquad\\quad \\overline{\\simplify[all,!noleadingMinus]{({b-a*f})x^2+{c}x+{d}}}\\\\ &&&\\;\\;\\qquad\\quad \\simplify[all,!noleadingMinus]{({b-a*f})x^2+{n}x}\\\\ &&&\\;\\;\\qquad\\quad\\quad\\quad\\quad \\overline{\\simplify[all,!noleadingMinus]{{{c}-{b}*{f}+{a}*{f}^2}x+{d}}}\\\\ &&&\\;\\;\\qquad\\quad\\quad\\quad\\quad \\simplify[all,!noleadingMinus]{{{c}-{b}*{f}+{a}*{f}^2}x+{{c}*{f}-{b}*{f}^2+{a}*{f}^3}}\\\\ \\end{align} \

\n

Lastly, subtract $\\simplify[all,!noleadingMinus]{({c-n})x+{c-n}{f}}$ from $\\simplify[all,!noleadingMinus]{({c-n})x+{d}}$, so that

\n

\\\begin{align} (\\simplify[all,!noleadingMinus]{({c-n})x+{d}}) - (\\simplify[all,!noleadingMinus]{({c-n})x+{c-n}{f}}) &= \\simplify[all,!noleadingMinus]{{{d}-({c-n})*{f}}}. &&\\,\\,\\simplify{{a}x^2+({b}-{a}{f})x+{{c}-{b}*{f}+{a}*{f}^2}}\\\\ &&\\simplify[all,!noleadingMinus]{x+{f}} \\; &\\overline{)\\simplify[all,!noleadingMinus]{{a}x^3+{b}x^2+{c}x+{d}}}\\\\ &&&\\;\\, \\simplify[all,!noleadingMinus]{{a}x^3+{a}{f}x^2}\\\\ &&&\\;\\;\\qquad\\quad \\overline{\\simplify[all,!noleadingMinus]{({b-a*f})x^2+{c}x+{d}}}\\\\ &&&\\;\\;\\qquad\\quad \\simplify[all,!noleadingMinus]{({b-a*f})x^2+{n}x}\\\\ &&&\\;\\;\\qquad\\quad\\quad\\quad\\quad \\overline{\\simplify[all,!noleadingMinus]{{{c}-{b}*{f}+{a}*{f}^2}x+{d}}}\\\\ &&&\\;\\;\\qquad\\quad\\quad\\quad\\quad \\simplify[all,!noleadingMinus]{{{c}-{b}*{f}+{a}*{f}^2}x+{{c}*{f}-{b}*{f}^2+{a}*{f}^3}}\\\\ &&&\\;\\;\\;\\qquad\\qquad\\quad\\quad\\quad\\; \\overline{\\simplify[all,!noleadingMinus]{{{d}-{c}*{f}+{b}*{f}^2-{a}*{f}^3}}.} \\end{align} \

\n

#### b)

\n

The long division illustration will be shown for each step in the following calculation:

\n

To divide $\\simplify[all,!noleadingMinus]{x^3+{coef_x2}x^2+{coef_x}x+{const}}$ by $\\simplify[all,!noleadingMinus]{x^2+{coef2_x}x+{const2}}$, using algebraic division, we must first divide the first term of the polynomial by the first term of the divisor, which in this case is $x^2$, so that

\n

\\\begin{align} \\simplify{x^3} \\div x^2 &= \\simplify{x}. & &\\,\\,\\simplify{x}\\\\ && \\simplify[all,!noleadingMinus]{x^2+{coef2_x}x+{const2}} \\; &\\overline{)\\simplify[all,!noleadingMinus]{x^3+{coef_x2}x^2+{coef_x}x+{const}}}\\\\ \\end{align} \

\n

Next, we multiply $\\simplify{x^2+{coef2_x}x+{const2}}$ by $\\simplify{x}$, giving us

\n

\\\begin{align} \\simplify{x} \\times (\\simplify{x^2+{coef2_x}x+{const2}}) &= \\simplify[all,!noleadingMinus]{x^3+{coef2_x}x^2+{const2}x}. &&\\,\\,\\simplify{x}\\\\ &&\\simplify[all,!noleadingMinus]{x^2+{coef2_x}x+{const2}} \\; &\\overline{)\\simplify[all,!noleadingMinus]{x^3+{coef_x2}x^2+{coef_x}x+{const}}}\\\\ &&&\\;\\, \\simplify[all,!noleadingMinus]{x^3+{coef2_x}x^2+{const2}x}\\\\ \\end{align} \

\n

Then, we subtract this expression from the first three terms of the polynomial, which gives

\n

\\\begin{align} (\\simplify[all,!noleadingMinus]{x^3+{coef_x2}x^2+{coef_x}x}) - (\\simplify{x^3+{coef2_x}x^2+{const2}x}) &= \\simplify[all,!noleadingMinus]{{coef_x2-coef2_x}x^2+{coef_x-const2}x}. &&\\,\\,\\simplify{x}\\\\ &&\\simplify[all,!noleadingMinus]{x^2+{coef2_x}x+{const2}}\\; &\\overline{)\\simplify[all,!noleadingMinus]{x^3+{coef_x2}x^2+{coef_x}x+{const}}}\\\\ &&&\\;\\, \\simplify[all,!noleadingMinus]{x^3+{coef2_x}x^2+{const2}x}\\\\ &&&\\;\\qquad\\quad \\overline{\\simplify[all,!noleadingMinus]{{coef_x2-coef2_x}x^2+{coef_x-const2}x+{const}}}\\\\ \\end{align} \

\n

Note that we bring the $\\simplify[all,!noleadingMinus]{{const}}$ down from the line above, as this term has not yet been used in the calculation.

\n

We then repeat the previous steps for this new polynomial.

\n

We divide the first term of the new polynomial by the first term of the divisor.

\n

Dividing $\\simplify[all,!noleadingMinus]{{coef_x2-coef2_x}x^2}$ by $x^2$ gives,

\n

\\\begin{align} \\simplify[all,!noleadingMinus]{{coef_x2-coef2_x}x^2} \\div x^2 &= \\simplify[all,!noleadingMinus]{{coef_x2-coef2_x}}. &&\\,\\,\\simplify{x+{coef_x2-coef2_x}}\\\\ &&\\simplify[all,!noleadingMinus]{x^2+{coef2_x}x+{const2}}\\; &\\overline{)\\simplify[all,!noleadingMinus]{x^3+{coef_x2}x^2+{coef_x}x+{const}}}\\\\ &&&\\;\\, \\simplify[all,!noleadingMinus]{x^3+{coef2_x}x^2+{const2}x}\\\\ &&&\\;\\;\\qquad\\quad \\overline{\\simplify[all,!noleadingMinus]{{coef_x2-coef2_x}x^2+{coef_x-const2}x+{const}}}\\\\ \\end{align} \

\n

Multiplying $\\simplify{x^2+{coef2_x}x+{const2}}$ by $\\simplify{{coef_x2-coef2_x}}$ gives us

\n

\\\begin{align} (\\simplify{x^2+{coef2_x}x+{const2}}) \\times \\simplify{{coef_x2-coef2_x}} &= \\simplify[all,!noleadingMinus]{{coef_x2-coef2_x}x^2+{coef2_x*(coef_x2-coef2_x)}x+{const2*(coef_x2-coef2_x)}}. &&\\,\\,\\simplify{x+{coef_x2-coef2_x}}\\\\ &&\\simplify[all,!noleadingMinus]{x^2+{coef2_x}x+{const2}}\\; &\\overline{)\\simplify[all,!noleadingMinus]{x^3+{coef_x2}x^2+{coef_x}x+{const}}}\\\\ &&&\\;\\, \\simplify[all,!noleadingMinus]{x^3+{coef2_x}x^2+{const2}x}\\\\ &&&\\;\\;\\qquad\\quad \\overline{\\simplify[all,!noleadingMinus]{{coef_x2-coef2_x}x^2+{coef_x-const2}x+{const}}}\\\\ &&&\\;\\;\\qquad\\quad \\simplify[all,!noleadingMinus]{{coef_x2-coef2_x}x^2+{coef2_x*(coef_x2-coef2_x)}x+{const2*(coef_x2-coef2_x)}}. \\end{align} \

\n

Now, subtracting $\\simplify[all,!noleadingMinus]{{coef_x2-coef2_x}x^2+{coef2_x*(coef_x2-coef2_x)}x+{const2*(coef_x2-coef2_x)}}$ from $\\simplify[all,!noleadingMinus]{{coef_x2-coef2_x}x^2+{coef_x-const2}x+{const}}$  so that

\n

\\\begin{align} (\\simplify[all,!noleadingMinus]{{coef_x2-coef2_x}x^2+{coef_x-const2}x+{const}})- (\\simplify[all,!noleadingMinus]{{coef_x2-coef2_x}x^2+{coef2_x*(coef_x2-coef2_x)}x+{const2*(coef_x2-coef2_x)}}) &= \\simplify{({coef_x-const2-coef2_x*(coef_x2-coef2_x)})x+{const-const2*(coef_x2-coef2_x)}}. &&\\,\\,\\simplify{x+{coef_x2-coef2_x}}\\\\ &&\\simplify[all,!noleadingMinus]{x^2+{coef2_x}x+{const2}}\\; &\\overline{)\\simplify[all,!noleadingMinus]{x^3+{coef_x2}x^2+{coef_x}x+{const}}}\\\\ &&&\\;\\, \\simplify[all,!noleadingMinus]{x^3+{coef2_x}x^2+{const2}x}\\\\ &&&\\;\\;\\qquad\\quad \\overline{\\simplify[all,!noleadingMinus]{{coef_x2-coef2_x}x^2+{coef_x-const2}x+{const}}}\\\\ &&&\\;\\;\\qquad\\quad \\simplify[all,!noleadingMinus]{{coef_x2-coef2_x}x^2+{coef2_x*(coef_x2-coef2_x)}x+{const2*(coef_x2-coef2_x)}}\\\\ &&&\\;\\;\\;\\qquad\\quad\\quad\\quad\\quad \\overline{\\simplify{({coef_x-const2-coef2_x*(coef_x2-coef2_x)})x+{const-const2*(coef_x2-coef2_x)}}}\\text{.}\\\\ \\end{align} \

", "name": "Dividing a polynomial with remainders, using algebraic division", "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}, "variable_groups": [], "extensions": [], "ungrouped_variables": ["a", "b", "c", "d", "f", "n", "coef_x2", "coef_x", "const", "coef2_x", "const2"]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Elliott Fletcher", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1591/"}]}