Algebra · real student question

Factor x^n - y^n for a general positive integer n.

Question

Factor

xnynx^{n}-y^{n}

for any positive integer nn.

Step-by-step solution

  1. Show (xy)(x-y) must be a factor. Treat the expression as a polynomial in xx and substitute x=yx=y:

    ynyn=0y^{n}-y^{n}=0

    By the factor theorem this holds for every nn, so (xy)(x-y) always divides xnynx^{n}-y^{n} — no parity condition, unlike the sum xn+ynx^{n}+y^{n}, which needs nn odd.

  2. State the identity.

    xnyn=(xy)(xn1+xn2y+xn3y2++xyn2+yn1)=(xy)k=0n1xn1kykx^{n}-y^{n}=(x-y)\left(x^{n-1}+x^{n-2}y+x^{n-3}y^{2}+\cdots+xy^{n-2}+y^{n-1}\right)=(x-y)\sum_{k=0}^{n-1}x^{n-1-k}y^{k}

    The cofactor has exactly nn terms, every one of total degree n1n-1, and all signs are positive.

  3. Prove it by telescoping. Distribute the two terms of (xy)(x-y) over the sum:

    xk=0n1xn1kyk=xn+xn1y++xyn1x\sum_{k=0}^{n-1}x^{n-1-k}y^{k}=x^{n}+x^{n-1}y+\cdots+xy^{n-1}

    yk=0n1xn1kyk=xn1y+xn2y2++yny\sum_{k=0}^{n-1}x^{n-1-k}y^{k}=x^{n-1}y+x^{n-2}y^{2}+\cdots+y^{n}

    Subtracting, every term except the first of the top row and the last of the bottom row cancels, leaving exactly xnynx^{n}-y^{n} ✓.

  4. Check the small cases.

    n=2: x2y2=(xy)(x+y)n=2:\ x^{2}-y^{2}=(x-y)(x+y)

    n=3: x3y3=(xy)(x2+xy+y2)n=3:\ x^{3}-y^{3}=(x-y)\left(x^{2}+xy+y^{2}\right)

    These are the familiar difference of squares and difference of cubes — both special cases of the one identity. Numerically the general formula was confirmed for every nn from 11 to 88 across 121121 integer pairs each ✓.

  5. Note when more factoring is available. If nn is composite, say n=pqn=pq, the expression also equals (xp)q(yp)q\left(x^{p}\right)^{q}-\left(y^{p}\right)^{q} and splits again — which is how x6y6x^{6}-y^{6} gains the extra factors (x+y)(x+y) and x2±xy+y2x^{2}\pm xy+y^{2}. A useful consequence in number theory: xyx-y always divides xnynx^{n}-y^{n} for integers, so for example 10n110^{n}-1 is always divisible by 99.

Answer

xnyn=(xy)(xn1+xn2y++xyn2+yn1)x^{n}-y^{n}=(x-y)\left(x^{n-1}+x^{n-2}y+\cdots+xy^{n-2}+y^{n-1}\right)

Need to solve a different problem like this? Open the solver →