# Factoring

Factoring is another useful thing to keep in our bag of tricks—right between the levitating card and the disappearing coin—when solving equations for particular variables. While we've been solving a lot of equations by simplifying with the distributive property, sometimes we need to do things the other way around and factor instead. Sit back and take a load off, distributive property. You're on vacation.

### Sample Problem

What's the solution to the equation 2*x* + *xy* – *y* = 5?

This one is a little tricky. How do we get the *x* all by itself? We can't exactly declare a quarantine. Instead, look at the left-hand side of the equation, and factor out *x*:

2*x* + *xy* *x*(2 + *y*)

Multiply this out, and you'll see that it works. We can rewrite the original equation as:

*x*(2 + *y*) – *y* = 5

From there, add *y* to both sides and divide by (2 + *y*) to find that:

### Sample Problem

Solve the equation *xy* + *yz* = *xz* for *y*.

Hey, where did all the numbers go? No worries: we can do this step with only variables just as easily. Again, we need to factor. If we factor *y* out of the first two terms, we get *y*(*x* + *z*) = *xz*, and so

### Sample Problem

Solve the equation 3*x* + *xy* = 4*x* – 2 for *x*.

We need to factor out *x*, but first, we get all the *x* terms on one side by subtracting 4*x *from each side:

-*x* + *xy* = -2

Now we factor out *x*:

*x*(-1 + *y*) = -2

Almost there. Now divide both sides by (-1 + *y*):

**Be careful:** When we factor out *x* from itself, we leave 1 behind. This is unfortunate, as we swore to 1 that we would never leave him behind, but it had to be done. We only hope he can forgive us.