Algebra · real student question

Factor x2 - 2ax + x + a2 - a - 2 completely.

Question

Factor completely (with aa a parameter):

x22ax+x+a2a2x^2-2ax+x+a^2-a-2

Step-by-step solution

  1. Collect the terms by powers of xx.

    x2+(12a)x+(a2a2)x^2+(1-2a)x+\left(a^2-a-2\right)

    It is a quadratic in xx whose coefficients involve aa — so any factorization should be a product of two linear-in-xx brackets.

  2. Spot the completed square hiding inside. The pieces x2x^2, 2ax-2ax and a2a^2 are exactly (xa)2(x-a)^2. Peeling them off leaves

    x22ax+a2+xa2=(xa)2+(xa)2x^2-2ax+a^2+x-a-2=(x-a)^2+(x-a)-2

    because the leftover +xa+x-a is itself (xa)(x-a). Every occurrence of xx and aa now sits inside the single combination xax-a.

  3. Substitute u=xau=x-a and factor the plain quadratic.

    u2+u2=(u1)(u+2)u^2+u-2=(u-1)(u+2)

    since (1)(2)=2(-1)(2)=-2 and 1+2=1-1+2=1. With the substitution the parameter has disappeared entirely.

  4. Back-substitute u=xau=x-a.

    (xa1)(xa+2)(x-a-1)(x-a+2)

  5. Cross-check two ways. By the coefficient route: a2a2=(a2)(a+1)a^2-a-2=(a-2)(a+1), and the two bracket constants (a+1)-(a+1) and 2a2-a sum to 12a1-2a ✓ matching the linear coefficient. Numerically at x=1x=1, a=2a=2: the original is 14+1+422=21-4+1+4-2-2=-2, and (121)(12+2)=(2)(1)=2(1-2-1)(1-2+2)=(-2)(1)=-2 ✓.

Answer

x22ax+x+a2a2=(xa1)(xa+2)x^2-2ax+x+a^2-a-2=(x-a-1)(x-a+2)

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