# How do these equations cancel?

1. Oct 18, 2013

### noahsdev

1. The problem statement, all variables and given/known data
I have the answer but I don't understand how they got it. What did they expand? These are the last two in the book but I cant understand how they cancelled the denominator.
2. Equations
Equation 1:
f(x) = (x3+8)/(x+2)

Equation 2:
f(x) = (x3-27)/(x-3)

x2-2x+4
x2+3x+9

Thanks :).

2. Oct 18, 2013

### tiny-tim

hi noahsdev!

you should be able to do this by long division (the same as in ordinary arithmetic) …

have a go

(alternatively, you should learn simple factorisations such as for x2 - a2 and x3 - a3)

3. Oct 18, 2013

### Mentallic

For equation 1, if you plug in x=-2, you get 0 in the denominator, but you also get 0 in the numerator. This means that (x-(-2)) = (x+2) is a factor of the numerator because if you now plug x=-2 into the numerator, you'll once again get a value of 0. So you can factorize $x^3+8=(x+2)(...)$ , and we'll denote (...) by P(x)

Now, since the x+2 factor will cancel with the denominator, what you have left is P(x) which will be your answer.

To find out what that factor needs to be, you can either do long division as tiny-tim suggested, or you can do the following:

Since on the LHS we have a cubic, and on the RHS we have a linear factor multiplied by an unknown factor, that unknown must be a quadratic of course. So $P(x) = ax^2+bx+c$ for some constant a,b,c that we need to figure out. We can do better than this though! Since the coefficient of $x^3$ on the LHS is 1 and the constant is 8, then same must be true on the RHS. If we expanded $(x+2)(ax^2+bx+c)$ we'd get $ax^3+...+2c$ where the ... includes terms of x2 and x.

So the coefficient of x3 on the LHS is 1, and the coefficient of x3 on the RHS is a, hence a=1.
The constant on the LHS is 8, and on the RHS it's 2c, so c=4. So right now we have

$$(x+2)(x^2+bx+4)$$

Which if you had some practice at doing, you'd be able to jump straight to this point.

Now to find b. We need to do some expanding for this and then equate coefficients. Since

$$x^3+8=x^3+0x^2+0x+8$$

this means that the coefficient of x2 and x is 0 on the LHS so it must be on the RHS too.

Expanding $(x+2)(x^2+bx+4)$ gives us

$$x^3+bx^2+4x+2x^2+2bx+8$$

and factoring the x2 terms and the x terms gives us

$$x^3+(b+2)x^2+(4+2b)x+8$$

So

b+2=0
b=-2

and we should also get the same answer for the coefficient of x,

4+2b=0
b=-2

Hence $P(x) = x^2-2x+4$ and that's our answer.

By the way, this method might look long and intimidating, but with practice it'll get easier and easier and you'll be able to skip all of the unnecessary steps such as expanding (x+2)P(x) completely and then comparing coefficients from there.

Personally, I haven't had to do long division in years because I always use this method over it, so I thought I'd give you that option as well if you prefer it.

4. Oct 19, 2013

### LCKurtz

Don't they teach synthetic division anymore? It's much quicker than your method or long division.

Code (Text):

-2 | 1  0  0  8
|[U]   -2  4 -8
[/U]     1 -2  4  0

The coefficients of the quadratic are on the third line with remainder 0.