Algebra · real student question

Factor x^2 + x - (a^2 - a), treating a as a constant.

Question

Factor

x2+x(a2a)x^2+x-\left(a^2-a\right)

treating aa as a constant.

Step-by-step solution

  1. Clear the outer bracket carefully. The minus sign distributes over both terms inside:

    x2+x(a2a)=x2+xa2+ax^2+x-\left(a^2-a\right)=x^2+x-a^2+a

    Missing the sign change on the a-a (and writing a-a instead of +a+a) is the main trap.

  2. Treat it as a monic quadratic in x. The coefficient of xx is 11 and the constant term is aa2a-a^2. So we need two expressions whose sum is 11 and whose product is aa2=a(1a)a-a^2=a(1-a).

  3. Spot the pair. The two obvious candidates are aa and 1a1-a:

    a+(1a)=1 ,a(1a)=aa2 a+(1-a)=1\ \checkmark,\qquad a(1-a)=a-a^2\ \checkmark

    Both conditions hold identically in aa, which is what makes this work for every value of the parameter.

  4. Write the factorisation.

    x2+x(a2a)=(x+a)(x+(1a))=(x+a)(xa+1)x^2+x-\left(a^2-a\right)=(x+a)\bigl(x+(1-a)\bigr)=(x+a)(x-a+1)

  5. Verify by expanding symbolically.

    (x+a)(xa+1)=x2ax+x+axa2+a=x2+xa2+a (x+a)(x-a+1)=x^2-ax+x+ax-a^2+a=x^2+x-a^2+a\ \checkmark

    The ±ax\pm ax terms cancel exactly, which is why only xx survives in the middle.

  6. Read off the roots and a useful check. The expression vanishes at x=ax=-a and x=a1x=a-1. Their sum is 1=b/a-1=-b/a ✓ and their product is a(a1)=aa2-a(a-1)=a-a^2 ✓, matching the constant term. Numerically, comparing the original with the factored form at 6060 random pairs (x,a)(x,a) in [6,6][-6,6] gives agreement to machine precision throughout ✓.

Answer

x2+x(a2a)=(x+a)(xa+1)x^2+x-\left(a^2-a\right)=(x+a)(x-a+1)

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