Algebra & Polynomials

Study Sheet

Algebra & Polynomials

Vieta, the remainder theorem, and systems

Polynomial Roots

Tip
Vieta for any degree

For a monic polynomial with roots r1,…,rnr_1,\dots,r_n: ∑ri=−an−1\sum r_i = -a_{n-1}, ∑i<jrirj=an−2\sum_{i<j} r_ir_j = a_{n-2}, and ∏ri=(−1)na0\prod r_i = (-1)^n a_0.

In plain terms. The coefficients ARE the symmetric combinations of the roots (with signs). So you can get sums and products of roots straight from the polynomial.

Example. For x3−6x2+11x−6x^3 - 6x^2 + 11x - 6: the roots sum to 66, sum in pairs to 1111, and multiply to 66 — they are 1,2,31,2,3.

Reminder — Vieta's formulas:  r1+r2=−ba,r1r2=car_1+r_2=-\frac{b}{a},\qquad r_1 r_2=\frac{c}{a}

Why it works. A monic polynomial with roots r1,…,rnr_1, \dots, r_n IS the product (x−r1)⋯(x−rn)(x - r_1)\cdots(x - r_n). Expanding, the xn−1x^{n-1} term collects −ri-r_i once from each factor, the xn−2x^{n-2} term collects every product of two roots, and the constant is the product of all the −ri-r_i. Matching coefficients is the whole theorem, which is also how to rebuild the signs if you forget them: they alternate, starting with minus.

Tip
Remainder and factor theorems

The remainder of P(x)P(x) divided by x−ax-a is P(a)P(a); so x−ax-a is a factor exactly when P(a)=0P(a) = 0.

In plain terms. To find the remainder or test a factor, just plug the number in — no long division needed.

Example. P(x)=x2−5x+6P(x) = x^2 - 5x + 6 has P(2)=0P(2) = 0, so x−2x-2 is a factor; indeed P(x)=(x−2)(x−3)P(x) = (x-2)(x-3).

Why it works. Division gives P(x)=(x−a)Q(x)+RP(x) = (x - a)Q(x) + R with RR a constant, because the remainder has lower degree than x−ax - a. Put x=ax = a: the first term vanishes and P(a)=RP(a) = R. Dividing by a quadratic leaves a LINEAR remainder cx+dcx + d, and two evaluations pin down its two unknowns.

Concept
Manipulate without solving

Symmetric expressions reduce to S=r+sS = r+s and P=rsP = rs: r2+s2=S2−2Pr^2+s^2 = S^2 - 2P and 1r+1s=SP\tfrac1r+\tfrac1s = \tfrac SP.

In plain terms. You rarely need the actual roots — rewrite the expression using only their sum and product, which Vieta hands you.

Example. If x2−3x+1=0x^2 - 3x + 1 = 0 then x+1x=3x + \tfrac1x = 3, so x2+1x2=32−2=7x^2 + \tfrac1{x^2} = 3^2 - 2 = 7.

Example
Worked: a product of shifted roots

The roots of x3−5x2+3x+1=0x^3 - 5x^2 + 3x + 1 = 0 are aa, bb, cc. Find (a+1)(b+1)(c+1)(a + 1)(b + 1)(c + 1).

Spotting it. A product of the form ∏(root+k)\prod(\text{root} + k) is the polynomial itself, evaluated at −k-k. No expansion into symmetric sums is needed.

Step 1. P(x)=(x−a)(x−b)(x−c)P(x) = (x - a)(x - b)(x - c), so P(−1)=(−1−a)(−1−b)(−1−c)=−(a+1)(b+1)(c+1)P(-1) = (-1 - a)(-1 - b)(-1 - c) = -(a + 1)(b + 1)(c + 1).

Step 2. P(−1)=−1−5−3+1=−8P(-1) = -1 - 5 - 3 + 1 = -8, so (a+1)(b+1)(c+1)=8(a + 1)(b + 1)(c + 1) = 8.

Check by Vieta: the product expands to abc+(ab+bc+ca)+(a+b+c)+1=−1+3+5+1=8abc + (ab + bc + ca) + (a + b + c) + 1 = -1 + 3 + 5 + 1 = 8 ✓

Example
Worked: a remainder from two remainders

When P(x)P(x) is divided by x−1x - 1 the remainder is 33, and when it is divided by x−2x - 2 the remainder is 55. What is the remainder when P(x)P(x) is divided by (x−1)(x−2)(x - 1)(x - 2)?

Spotting it. The divisor is a quadratic, so the remainder is linear: P(x)=(x−1)(x−2)Q(x)+cx+dP(x) = (x - 1)(x - 2)Q(x) + cx + d. The remainder theorem gives P(1)P(1) and P(2)P(2), which is exactly two equations.

Step 1. x=1x = 1: c+d=P(1)=3c + d = P(1) = 3. x=2x = 2: 2c+d=P(2)=52c + d = P(2) = 5.

Step 2. Subtract: c=2c = 2, then d=1d = 1. The remainder is 2x+12x + 1.

Example
Worked: a huge power

Find the remainder when x51+2x^{51} + 2 is divided by x2−1x^2 - 1.

Spotting it. Long division is out of the question. The divisor factors as (x−1)(x+1)(x - 1)(x + 1), so evaluate at its two roots.

Step 1. Write x51+2=(x2−1)Q(x)+cx+dx^{51} + 2 = (x^2 - 1)Q(x) + cx + d.

Step 2. x=1x = 1: c+d=3c + d = 3. x=−1x = -1: −c+d=−1+2=1-c + d = -1 + 2 = 1.

Step 3. So d=2d = 2, c=1c = 1, and the remainder is x+2x + 2.

Side note
Where it goes wrong

Sign slips in Vieta for a cubic. For x3−5x2+3x+1x^3 - 5x^2 + 3x + 1 the product of the roots is −1-1, not 11: in x3+a2x2+a1x+a0x^3 + a_2x^2 + a_1x + a_0 the product is (−1)3a0=−a0(-1)^3a_0 = -a_0. And in the first worked example, evaluating at +1+1 instead of −1-1 gives P(1)=0P(1) = 0, the product of (1−root)(1 - \text{root}), which is a different question.

Try it
Try it: sum of squares of roots

Find the sum of the squares of the roots of x3−3x2−4x+12=0x^3 - 3x^2 - 4x + 12 = 0.

Show the answer

By Vieta, e1=3e_1 = 3 and e2=−4e_2 = -4, so ∑r2=e12−2e2=9+8=17\sum r^2 = e_1^2 - 2e_2 = 9 + 8 = 17. Check: the polynomial factors as (x−3)(x−2)(x+2)(x - 3)(x - 2)(x + 2), and 9+4+4=179 + 4 + 4 = 17 ✓

Vieta, Symmetric Sums and Clever Factoring

Tip
Vieta's relations

For ax2+bx+cax^2+bx+c: r1+r2=−bar_1+r_2 = -\tfrac ba, r1r2=car_1r_2 = \tfrac ca. For ax3+bx2+cx+dax^3+bx^2+cx+d: ∑r=−ba\sum r = -\tfrac ba, ∑i<jrirj=ca\sum_{i<j} r_ir_j = \tfrac ca, r1r2r3=−dar_1r_2r_3 = -\tfrac da.

Vieta answers questions about the roots without finding them, which is the point: for x2−7x+10x^2-7x+10, r12+r22=(r1+r2)2−2r1r2=49−20=29r_1^2+r_2^2 = (r_1+r_2)^2 - 2r_1r_2 = 49 - 20 = 29 with no factoring at all. The identities worth knowing cold are ∑r2=e12−2e2\sum r^2 = e_1^2 - 2e_2 and ∑1r=e2e3\sum \tfrac1r = \tfrac{e_2}{e_3} for a cubic.

Tip
Simon's Favourite Factoring Trick

xy+ax+by=c  ⟺  (x+b)(y+a)=c+abxy + ax + by = c \iff (x+b)(y+a) = c + ab: add the missing constant and factor.

It turns a two-variable equation into a divisor problem. xy+3x+2y=20xy + 3x + 2y = 20 becomes (x+2)(y+3)=26(x+2)(y+3) = 26, and the integer solutions come from the divisor pairs of 2626. The signal is a product term plus linear terms in the same equation — the missing constant is always the product of the two linear coefficients.

Example
Worked: a symmetric sum

The roots of x3−6x2+11x−6=0x^3 - 6x^2 + 11x - 6 = 0 are r1,r2,r3r_1, r_2, r_3. Find r12+r22+r32r_1^2 + r_2^2 + r_3^2 and 1r1+1r2+1r3\tfrac1{r_1} + \tfrac1{r_2} + \tfrac1{r_3}.

Step 1 — Vieta: e1=6e_1 = 6, e2=11e_2 = 11, e3=6e_3 = 6.

Step 2 — ∑r2=e12−2e2=36−22=14\sum r^2 = e_1^2 - 2e_2 = 36 - 22 = 14.

Step 3 — ∑1r=e2e3=116\sum \tfrac1r = \tfrac{e_2}{e_3} = \tfrac{11}{6}. Check: the roots are 1,2,31, 2, 3, and 1+4+9=141 + 4 + 9 = 14, 1+12+13=1161 + \tfrac12 + \tfrac13 = \tfrac{11}{6} ✓

Example
Worked: a reciprocal equation
mn61218243036426121824303642
The curve (m−6)(n−6)=36(m - 6)(n - 6) = 36 is a hyperbola; the nine solutions are the lattice points on it.

How many ordered pairs of positive integers (m,n)(m, n) satisfy 1m+1n=16\dfrac1m + \dfrac1n = \dfrac16?

Spotting it. Clearing denominators gives a product term and two linear terms, mn−6m−6n=0mn - 6m - 6n = 0: the signal for Simon's trick.

Step 1. Add 3636 to both sides: (m−6)(n−6)=36(m - 6)(n - 6) = 36.

Step 2. Both factors must be positive. If both were negative, then m−6≥−5m - 6 \ge -5 and n−6≥−5n - 6 \ge -5 would make their product at most 25<3625 < 36.

Step 3. So m−6m - 6 is any positive divisor of 36=223236 = 2^2 3^2, and n−6n - 6 is the complementary divisor. There are (2+1)(2+1)=9(2 + 1)(2 + 1) = 9 divisors, hence 9 ordered pairs, from (7,42)(7, 42) to (42,7)(42, 7).

Example
Worked: a cube sum without the roots

If rr and ss are the roots of x2−4x+1=0x^2 - 4x + 1 = 0, find r3+s3r^3 + s^3.

Spotting it. r3+s3r^3 + s^3 is symmetric, so it is a polynomial in r+s=4r + s = 4 and rs=1rs = 1.

Step 1. (r+s)3=r3+s3+3rs(r+s)(r + s)^3 = r^3 + s^3 + 3rs(r + s), so r3+s3=(r+s)3−3rs(r+s)r^3 + s^3 = (r + s)^3 - 3rs(r + s).

Step 2. =64−3⋅1⋅4=52= 64 - 3 \cdot 1 \cdot 4 = 52. The roots themselves are 2±32 \pm \sqrt3, and nothing in the computation needed them.

Side note
Where it goes wrong

Accepting every factor pair. In the SFFT Try-it, (x+3)(y+2)=48(x + 3)(y + 2) = 48 also has the pair (2,24)(2, 24), but it gives x=−1x = -1, which is not positive. Write down the range each factor must lie in (x+3≥4x + 3 \ge 4, y+2≥3y + 2 \ge 3) BEFORE listing pairs, and remember negative pairs too when the variables are only required to be integers.

Try it
Try it: SFFT

How many positive integer pairs satisfy xy+2x+3y=42xy + 2x + 3y = 42?

Show the answer

Add 66: (x+3)(y+2)=48(x+3)(y+2) = 48. With x≥1x \ge 1, y≥1y \ge 1 we need x+3≥4x + 3 \ge 4 and y+2≥3y + 2 \ge 3, so the factor pairs (4,12),(6,8),(8,6),(12,4),(16,3)(4,12), (6,8), (8,6), (12,4), (16,3) work — five pairs.

Symmetric Systems: Solve for the Sum and Product

Tip
Trade xx and yy for s=x+ys = x + y and p=xyp = xy

If a system is unchanged by swapping xx and yy, rewrite it in s=x+ys = x + y and p=xyp = xy using x2+y2=s2−2px^2 + y^2 = s^2 - 2p and x3+y3=s3−3psx^3 + y^3 = s^3 - 3ps. Then xx and yy are the two roots of t2−st+p=0t^2 - st + p = 0, and they are real exactly when s2≥4ps^2 \ge 4p.

Why it works. Every symmetric polynomial in xx and yy can be written in terms of ss and pp alone, so a symmetric system in x,yx, y becomes a system in s,ps, p, usually of lower degree. Going back is Vieta: numbers with sum ss and product pp are the roots of t2−st+pt^2 - st + p. The discriminant s2−4p=(x−y)2s^2 - 4p = (x - y)^2 is a square of a real number, which is why it must be non-negative when xx and yy are real.

Example
Worked: a cubic system
xy123456123456(2, 3)(3, 2)x + y = 5xy = 6
In the (x, y)-plane the solutions are where the line x + y = 5 meets the hyperbola xy = 6.

Solve x+y=5x + y = 5, x3+y3=35x^3 + y^3 = 35.

Spotting it. Swapping xx and yy changes nothing, so switch to ss and pp; s=5s = 5 is given.

Step 1. x3+y3=s3−3psx^3 + y^3 = s^3 - 3ps gives 35=125−15p35 = 125 - 15p, so p=6p = 6.

Step 2. xx and yy are the roots of t2−5t+6=(t−2)(t−3)t^2 - 5t + 6 = (t - 2)(t - 3): the solutions are (2,3)(2, 3) and (3,2)(3, 2).

Check: 8+27=358 + 27 = 35 ✓

Example
Worked: two unknowns that are themselves roots

Real numbers xx and yy satisfy x+y+xy=11x + y + xy = 11 and x2y+xy2=28x^2y + xy^2 = 28. Find every possible value of x2+y2x^2 + y^2.

Spotting it. Both equations are symmetric. In ss and pp they read s+p=11s + p = 11 and sp=28sp = 28 (since x2y+xy2=xy(x+y)x^2y + xy^2 = xy(x + y)): a sum and a product again, so ss and pp are themselves the roots of a quadratic.

Step 1. t2−11t+28=(t−4)(t−7)t^2 - 11t + 28 = (t - 4)(t - 7), so {s,p}={4,7}\{s, p\} = \{4, 7\}.

Step 2. Case s=4s = 4, p=7p = 7: the reality test fails, since s2=16<28=4ps^2 = 16 < 28 = 4p. No real xx, yy come from this case.

Step 3. Case s=7s = 7, p=4p = 4: real, since 49≥1649 \ge 16. Then x2+y2=49−8=41x^2 + y^2 = 49 - 8 = 41, and this is the only possible value. (The numbers are 7±332\tfrac{7 \pm \sqrt{33}}{2}.)

Side note
Where it goes wrong

Skipping the reality test. From x+y=2x + y = 2 and xy=5xy = 5 the formula gives x2+y2=4−10=−6x^2 + y^2 = 4 - 10 = -6, which is impossible for real numbers. The system has no real solution because s2=4<20=4ps^2 = 4 < 20 = 4p; the tt-quadratic t2−2t+5t^2 - 2t + 5 has complex roots. Whenever a case produces ss and pp, check s2≥4ps^2 \ge 4p before using it.

Try it
Try it: a cube sum from two facts

If x+y=4x + y = 4 and x2+y2=10x^2 + y^2 = 10, find x3+y3x^3 + y^3.

Show the answer

p=s2−(x2+y2)2=16−102=3p = \dfrac{s^2 - (x^2 + y^2)}{2} = \dfrac{16 - 10}{2} = 3, so x3+y3=s3−3ps=64−36=28x^3 + y^3 = s^3 - 3ps = 64 - 36 = 28. Check: x,yx, y are 11 and 33, and 1+27=281 + 27 = 28 ✓