Algebra · real student question

Expand and collect like terms in ((a1(x - y) + b1)(x - y) + (a2 y + b2) y) / x.

Question

Expand and collect like terms:

(a1(xy)+b1)(xy)+(a2y+b2)yx\frac{\left(a_1(x-y)+b_1\right)(x-y)+\left(a_2y+b_2\right)y}{x}

Step-by-step solution

  1. Recognise the nested (Horner) shape. Each half has the form (coefficientt+constant)t(\text{coefficient}\cdot t+\text{constant})\cdot t, which is a quadratic written to minimise multiplications: the first with t=xyt=x-y, the second with t=yt=y. Unfolding one layer at a time is safer than expanding everything at once.

  2. Unfold each half into a quadratic in its own variable.

    (a1(xy)+b1)(xy)=a1(xy)2+b1(xy)\left(a_1(x-y)+b_1\right)(x-y)=a_1(x-y)^2+b_1(x-y)

    (a2y+b2)y=a2y2+b2y\left(a_2y+b_2\right)y=a_2y^2+b_2y

    so the numerator is a1(xy)2+b1(xy)+a2y2+b2ya_1(x-y)^2+b_1(x-y)+a_2y^2+b_2y.

  3. Expand the square and the linear bracket. Using (xy)2=x22xy+y2(x-y)^2=x^2-2xy+y^2:

    a1(xy)2=a1x22a1xy+a1y2,b1(xy)=b1xb1ya_1(x-y)^2=a_1x^2-2a_1xy+a_1y^2,\qquad b_1(x-y)=b_1x-b_1y

    Every term of the bracket gets the coefficient, including the middle term 2a1xy-2a_1xy that is easiest to lose.

  4. Collect like terms across the two halves. Only the y2y^2 and the yy terms can merge:

    a1y2+a2y2=(a1+a2)y2,b1y+b2y=(b2b1)ya_1y^2+a_2y^2=(a_1+a_2)y^2,\qquad -b_1y+b_2y=(b_2-b_1)y

    The numerator becomes

    a1x22a1xy+(a1+a2)y2+b1x+(b2b1)ya_1x^2-2a_1xy+(a_1+a_2)y^2+b_1x+(b_2-b_1)y

  5. Divide term by term if a fully split form is wanted. With x0x\neq 0,

    a1x2a1y+(a1+a2)y2x+b1+(b2b1)yxa_1x-2a_1y+\frac{(a_1+a_2)y^2}{x}+b_1+\frac{(b_2-b_1)y}{x}

    Only the terms containing xx simplify; the y2y^2 and yy terms keep an xx in the denominator, so this form is not a polynomial.

  6. Check with numbers. Take a1=1,b1=2,a2=3,b2=4,x=5,y=1a_1=1,b_1=2,a_2=3,b_2=4,x=5,y=1. Original numerator: (14+2)4+(3+4)1=24+7=31(1\cdot 4+2)\cdot 4+(3+4)\cdot 1=24+7=31. Collected form: 2510+41+10+21=3125-10+4\cdot 1+10+2\cdot 1=31 ✓. Dividing by x=5x=5 gives 6.26.2 either way.

Answer

a1x22a1xy+(a1+a2)y2+b1x+(b2b1)yx\frac{a_1x^2-2a_1xy+(a_1+a_2)y^2+b_1x+(b_2-b_1)y}{x}

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