Math Core

Module 1.1 · Algebra

Quadratics and Vieta's formulas

Many AMC quadratic problems never ask you to find the roots. They ask for something built from the roots, like the sum of their squares or a new equation whose roots are related. Vieta's formulas let you answer those questions using only the coefficients, often with no square roots in sight.

Sum and product of the roots

If rr and ss are the roots of ax2+bx+c=0ax^2 + bx + c = 0, then the quadratic factors as a(x−r)(x−s)a(x - r)(x - s). Expanding gives

a(x−r)(x−s)=ax2−a(r+s)x+a rs.a(x - r)(x - s) = ax^2 - a(r + s)x + a\,rs.

Match this with ax2+bx+cax^2 + bx + c term by term.

Vieta's formulas for a quadratic

If rr and ss are the roots of ax2+bx+c=0ax^2 + bx + c = 0, then

r+s=−baandrs=ca.r + s = -\dfrac{b}{a} \qquad \text{and} \qquad rs = \dfrac{c}{a}.

These hold whether the roots are integers, irrational or even complex.

The graph of y=x2−4x+1y = x^2 - 4x + 1 crosses the xx-axis at 2−32 - \sqrt{3} and 2+32 + \sqrt{3}. Their sum is 44 and their product is 4−3=14 - 3 = 1, exactly as Vieta predicts.

The roots of x² − 4x + 1 add to 4 and multiply to 1.Open in grapher →

Symmetric expressions

An expression in rr and ss is symmetric if swapping rr and ss leaves it unchanged, like r2+s2r^2 + s^2 or 1r+1s\dfrac{1}{r} + \dfrac{1}{s}. Every symmetric expression can be rewritten using only r+sr + s and rsrs. These are the identities to know by heart:

ExpressionIn terms of r+sr + s and rsrs
r2+s2r^2 + s^2(r+s)2−2rs(r + s)^2 - 2rs
1r+1s\dfrac{1}{r} + \dfrac{1}{s}r+srs\dfrac{r + s}{rs}
(r−s)2(r - s)^2(r+s)2−4rs(r + s)^2 - 4rs
r3+s3r^3 + s^3(r+s)3−3rs(r+s)(r + s)^3 - 3rs(r + s)
r4+s4r^4 + s^4(r2+s2)2−2(rs)2(r^2 + s^2)^2 - 2(rs)^2

Notice that (r−s)2=b2−4aca2(r - s)^2 = \dfrac{b^2 - 4ac}{a^2}. That is where the discriminant comes from: the roots are equal exactly when b2−4ac=0b^2 - 4ac = 0, and they are real exactly when b2−4ac≥0b^2 - 4ac \ge 0.

Worked example: Symmetric expressions

Let rr and ss be the roots of x2−7x+3=0x^2 - 7x + 3 = 0. Find r2+s2r^2 + s^2 and 1r+1s\dfrac{1}{r} + \dfrac{1}{s}.

By Vieta, r+s=7r + s = 7 and rs=3rs = 3. Then

r2+s2=72−2⋅3=43,1r+1s=r+srs=73.r^2 + s^2 = 7^2 - 2 \cdot 3 = 43, \qquad \frac{1}{r} + \frac{1}{s} = \frac{r + s}{rs} = \frac{7}{3}.

The roots themselves are 7±372\dfrac{7 \pm \sqrt{37}}{2}, which you never needed.

Building a new quadratic

To write a quadratic whose roots are uu and vv, you only need u+vu + v and uvuv: the monic quadratic is x2−(u+v)x+uvx^2 - (u + v)x + uv. So if the new roots are built from old roots, compute the new sum and product with Vieta.

Worked example: Transformed roots

The roots of x2−5x+2=0x^2 - 5x + 2 = 0 are rr and ss. Find a quadratic with integer coefficients whose roots are r+1sr + \dfrac{1}{s} and s+1rs + \dfrac{1}{r}.

We have r+s=5r + s = 5 and rs=2rs = 2.

New sum: (r+1s)+(s+1r)=(r+s)+r+srs=5+52=152\left(r + \dfrac{1}{s}\right) + \left(s + \dfrac{1}{r}\right) = (r + s) + \dfrac{r + s}{rs} = 5 + \dfrac{5}{2} = \dfrac{15}{2}.

New product: (r+1s)(s+1r)=rs+1+1+1rs=2+2+12=92\left(r + \dfrac{1}{s}\right)\left(s + \dfrac{1}{r}\right) = rs + 1 + 1 + \dfrac{1}{rs} = 2 + 2 + \dfrac{1}{2} = \dfrac{9}{2}.

So the quadratic is x2−152x+92x^2 - \dfrac{15}{2}x + \dfrac{9}{2}, or, multiplying by 22, 2x2−15x+9=02x^2 - 15x + 9 = 0.

Integer roots

When a problem says the roots are integers, write the two Vieta equations and eliminate the parameter. What is left usually factors with a "add a constant to both sides" trick.

Worked example: A parameter with integer roots

For how many integers kk does x2−kx+(k+11)=0x^2 - kx + (k + 11) = 0 have two integer roots (possibly equal)? What is the sum of all such kk?

Let the roots be rr and ss. Vieta gives r+s=kr + s = k and rs=k+11rs = k + 11. Subtract to eliminate kk:

rs−r−s=11⟹rs−r−s+1=12⟹(r−1)(s−1)=12.rs - r - s = 11 \quad\Longrightarrow\quad rs - r - s + 1 = 12 \quad\Longrightarrow\quad (r - 1)(s - 1) = 12.

The unordered factor pairs of 1212 are (1,12),(2,6),(3,4)(1, 12), (2, 6), (3, 4) and their negatives (−1,−12),(−2,−6),(−3,−4)(-1, -12), (-2, -6), (-3, -4). Since k=r+s=(r−1)+(s−1)+2k = r + s = (r - 1) + (s - 1) + 2, the values are

k=15, 10, 9, −11, −6, −5.k = 15,\ 10,\ 9,\ -11,\ -6,\ -5.

There are 66 values, and their sum is 1212. (Check k=9k = 9: x2−9x+20=(x−4)(x−5)x^2 - 9x + 20 = (x - 4)(x - 5).)

Common mistake

Watch the signs. For ax2+bx+cax^2 + bx + c, the sum of the roots is −ba-\dfrac{b}{a}, not ba\dfrac{b}{a}. And if the leading coefficient isn't 11, you must divide by it: the roots of 2x2−6x−52x^2 - 6x - 5 add to 33, not 66.

Tip

If a problem says "real roots," check the discriminant at the end. Vieta happily produces a sum and product for complex roots too, and a contest answer choice may be designed to catch that.

Practice

Practice 1

Let rr and ss be the roots of 2x2−6x−5=02x^2 - 6x - 5 = 0. What is r2+s2r^2 + s^2?

Practice 2

The equation x2+bx+18=0x^2 + bx + 18 = 0 has two roots, one of which is twice the other. If b>0b > 0, what is bb?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

Let rr and ss be the roots of x2−3x+1=0x^2 - 3x + 1 = 0. What is r4+s4r^4 + s^4?

Practice 4

The two roots of x2−kx+12=0x^2 - kx + 12 = 0 differ by 11, and k>0k > 0. What is kk?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

The roots of x2+2x−4=0x^2 + 2x - 4 = 0 are rr and ss. Which quadratic has roots r2r^2 and s2s^2?

Practice 6

Both roots of x2−21x+c=0x^2 - 21x + c = 0 are prime numbers. What is cc?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

For some integers mm, both roots of x2+mx+(m+7)=0x^2 + mx + (m + 7) = 0 are integers. What is the sum of all such mm?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

For which value of kk do the equations x2+kx+1=0x^2 + kx + 1 = 0 and x2+x+k=0x^2 + x + k = 0 have a common real root?

Real contest practice