# Extra Credit — Polynomial Long Division

Source: https://cca.twango.dev/AP-Calculus-AB/classwork/extra-credit

# Extra Credit — Polynomial Long Division

James Ding, January 6, 2023. Original three-page handwritten calculation:
[Extra credit work](../assets/ECS2.pdf).

## Problem recorded in the work

Find a value of $a$ for which $x^2-x+a$ divides $x^{13}+x+90$ evenly.
The assignment prompt itself is not included; this statement comes from the
student's concluding sentence and the long-division layout.

## Student long division

Pages 1–2 divide

$$
\frac{x^{13}+0x^{12}+0x^{11}+\cdots+0x^2+x+90}{x^2-x+a}.
$$

The quotient is written across the two pages. Its coefficients, gathered into a
readable table, are:

| Term | Coefficient in the handwritten quotient |
| --- | --- |
| $x^{11}$ | $1$ |
| $x^{10}$ | $1$ |
| $x^9$ | $1-a$ |
| $x^8$ | $1-2a$ |
| $x^7$ | $a^2-3a+1$ |
| $x^6$ | $3a^2-4a+1$ |
| $x^5$ | $-a^3+6a^2-5a+1$ |
| $x^4$ | $-4a^3+10a^2-6a+1$ |
| $x^3$ | $a^4-10a^3+15a^2-7a+1$ |
| $x^2$ | $5a^4-20a^3+21a^2-8a+1$ |
| $x$ | $-a^5+15a^4-35a^3+28a^2-9a+1$ |
| $1$ | $-6a^5+35a^4-56a^3+36a^2-10a+1$ |

The repeated subtraction rows follow the same operation: multiply the next
quotient term by $x^2-x+a$, subtract it, and bring down the next term. For example,
the opening rows are

$$
\begin{aligned}
x^{13}-(x^{13}-x^{12}+ax^{11})&=x^{12}-ax^{11},\\
(x^{12}-ax^{11})-(x^{12}-x^{11}+ax^{10})
&=(1-a)x^{11}-ax^{10},\\
[(1-a)x^{11}-ax^{10}]-[(1-a)x^{11}-(1-a)x^{10}+a(1-a)x^9]
&=(1-2a)x^{10}-a(1-a)x^9.
\end{aligned}
$$

> [!note] Clarified subtraction signs
> Several handwritten intermediate rows omit or reverse a subtraction sign.
> The displayed opening rows above clarify those operations; the quotient table
> agrees with direct polynomial division. The original preserves all crossed-out
> and intermediate arithmetic across the page breaks.

On page 3 the student factors out $a-2$ and concludes:

$$
a-2=0\quad\Longrightarrow\quad\boxed{a=2}.
$$

## Reviewed remainder

> [!warning] Correction to the final algebra
> The expanded remainder on page 3 contains sign errors, and the final factorized
> line does not clearly apply $a-2$ to both coefficients. The corrected remainder
> is below. The student's final value $a=2$ is valid.

If $Q(x)$ is the quotient tabulated above, then

$$
x^{13}+x+90=(x^2-x+a)Q(x)+R(x),
$$

where

$$
\begin{aligned}
R(x)={}&(a^6-21a^5+70a^4-84a^3+45a^2-11a+2)x\\
&+6a^6-35a^5+56a^4-36a^3+10a^2-a+90\\
={}&(a-2)\Bigl[(a^5-19a^4+32a^3-20a^2+5a-1)x\\
&\hspace{3.5em}+6a^5-23a^4+10a^3-16a^2-22a-45\Bigr].
\end{aligned}
$$

Thus $a=2$ makes **both** the coefficient of $x$ and the constant remainder zero.
The corrected identity was checked by multiplying the quotient and divisor and
adding the remainder.
