4

The problem is simple, to complete the square of $(x+a)(x+b)$. My calculations yield

$$\left(x+\frac{a+b}{2}\right)^2-\frac{(a+b)^2}{4}+ab,$$

But the textbook's answer is different ("problem 361", at the bottom of the page):

$$\left(x+\frac{a+b}{2}\right)^2-\frac{(a-b)^2}{4}$$

Did I do anything the wrong way?

$$(x+a)(x+b)=x^2+xb+ax+ab=x^2+x(a+b)+ab=$$

$$=\left(x^2+2*\frac{a+b}{2}*x+\left(\frac{a+b}{2}\right)^2\right)-\left(\frac{a+b}{2}\right)^2+ab=$$

$$=\left(x+\frac{a+b}{2}\right)^2-\frac{(a+b)^2}{4}+ab$$

2 Answers2

4

You did nothing wrong.

Note that $$-\frac{(a+b)^2}{4}+ab=\frac{-(a+b)^2+4ab}{4}=\frac{-a^2+2ab-b^2}{4}=-\frac{(a-b)^2}{4}$$

mathlove
  • 151,597
2

$\displaystyle \bf{(x+a)\cdot (x+b)} = x^2+(a+b)x+ab$

$\displaystyle = \underbrace{x^2+(a+b)x+\left(\frac{a+b}{2}\right)^2}+\underbrace{ab-\left(\frac{a+b}{2}\right)^2} = \left[x+\frac{a+b}{2}\right]^2-\left(\frac{a-b}{2}\right)^2$

So your answer is Right.

juantheron
  • 56,203