The first two terms don't have anything in common. Let's switch the middle two terms. If you can, see if you can do it without waking them. Those guys have had a long day and are all tuckered out.

y^{2} + 7y + 35x + 5xy

That's better; now we can do our thing. The first two terms have a y in common, and the second two terms have 5x in common. Let's factor 'em.

y(y + 7) + 5x(7 + y)

Since addition is commutative, y + 7 = 7 + y and we can rewrite our expression:

y(y + 7) + 5x(y + 7)

Then we pull out the common factor of (y + 7) and get:

(y + 5x)(y + 7)

Example 2

Factor 2x^{2} + 14x – 3x – 21 by grouping.

The first two terms have 2x in common, which we can factor out to find:

2x(x + 7) – 3x – 21

For the second two terms, we could factor out 3 or we could factor out -3. Whoa! Rein in your pony there, cowboy. If we factor out 3, we'll find:

2x(x + 7) + 3(-x – 7)

Those two terms don't have a common factor. Instead, if we factor out -3 we'll get:

2x(x + 7) – 3(x + 7)

And we could pull out (x + 7) to finish up:

(2x – 3)(x + 7)

Example 3

Factor by grouping: 2x^{2} – 9x – 35.

Here we need two numbers whose product is -70 and whose sum is -9 (don't forget those negative signs). To have a product of -70, exactly one of the numbers must be negative. We don't care which one, as long as somebody volunteers.

Let's start adding up all the numbers that have a product of 70: