--- title: "Advanced Algebra: Factoring by Grouping" --- ## Factoring by Grouping The problem: Simplify $$ \frac{3x^3 - 3x^2 + 7x - 7}{27x^4 - 147} $$ The tricky thing about this one is that you have to group the numerator into $(3x^3 - 3x^2) + (7x-7)$, and then notice that the first group contains multiples of $3$, and the second multiples of $7$, so that for the rest of the problem you're looking for places where you can use one of your "factoring tricks" to find hidden $3$s and $7$s. So, let's start by factoring out as much as we can from the two groups in the numerator: $$ \frac{(3x^3 - 3x^2) + (7x - 7)}{27x^4 -147} = \frac{3x^2(x-1)+7(x-1)}{27x^4 - 147} $$ Now we see the first "trick" we can use, because, if we look at the numerator as a *whole*, we see that both terms in the numerator contain $(x-1)$. So, let's pull this $(x-1)$ term out and see what we're left with: $$ \frac{3x^2(x-1)+7(x-1)}{27x^4 - 147} = \frac{(3x^2+7)(x-1)}{27x^4 - 147} $$ So now, we might think, can we factor stuff in the numerator anymore? Like, that $(3x^2 + 7)$ term? But, remember, there is a **difference of squares** formula, so that for example $$ (x^2 - 9) = (x+3)(x-3) $$ But there is **not** a **sum of squares** formula! $$ (x^2 + 9) = \ldots \; ? \; 😵 $$ So, since our $(3x^2 + 7)$ isn't a difference of squares, we know that we can't factor it any more [^1]. Let's move to the denominator. This is where I steered you in the wrong direction in our session, because I thought the "trick" was to notice that $147 = 7^2 + 3$. Sometimes that will help, but in this case we should have looked more closely at the number $147$! Since we have that $(3x^2 + 7)$ term in the numerator, and it looks like the $27x^4$ in the denominator can be turned into $3(3x^2)(3x^2)$, it'd be nice if we could turn the 147 term into something involving $3$ as well, for factoring. Well, let's look at multiples of $3$: $$ \begin{align*} 3\cdot 10 &= 30 \\ 3\cdot 20 &= 60 \\ 3\cdot 30 &= 90 \\ 3\cdot 40 &= 120 \\ 3 \cdot 50 &= 150 \end{align*} $$ And, at $150$, we're **so close** to $147$! All we have to do is subtract a $3$! Meaning, one less $3$: $$ \begin{align*} 3\cdot 50 &= 150 \\ 3\cdot 49 &= 147 \end{align*} $$ And we've got our factoring of $147$: we can pull out a $3$, **plus** $49$ should look familiar as $7^2$. So, we've factored $147$ into two nice things: $$ 147 = 3\cdot 7^2. $$ Looking back at our full fraction now, we have $$ \frac{(3x^2 + 7)(x-1)}{27x^4 - 3\cdot 7^2} $$ Notice that we can now factor the denominator by pulling a $3$ out of both terms, and then get a nice **difference of squares** term! $$ \frac{(3x^2 + 7)(x-1)}{27x^4 - 3\cdot 7^2} = \frac{(3x^2 + 7)(x-1)}{3(9x^4 - 7^2)} = \frac{(3x^2 + 7)(x-1)}{3((3x^2)^2-7^2)} $$ So, since we're now in nice difference-of-squares land instead of chaotic sum-of-squares land, we can use our difference of squares formula to get $$ \frac{(3x^2 + 7)(x-1)}{3(3x^2 - 7)(3x^2 + 7)} $$ and we can *finally* see the cancellation: the $(3x^2 + 7)$ in the numerator and the denominator will cancel, leaving us with $$ \frac{(3x^2 + 7)(x-1)}{3(3x^2 - 7)(3x^2 + 7)} = \frac{(x-1)}{3(3x^2 - 7)} $$ And... are we done? You might be tempted to try and factor the $(3x^2 - 7)$ in the denominator, since it looks like it *could* be a difference-of-squares, but since $7$ isn't the square of any whole number, this won't be very helpful in terms of simplifying stuff: $$ \frac{(x-1)}{3(3x^2 - 7)} = \frac{(x-1)}{3(\sqrt{3}x + \sqrt{7})(\sqrt{3}x - \sqrt{7})} $$ We don't really ever want square roots in the denominator, when we're simplifying, so let's just leave $(3x^2 - 7)$ as it is. Our final answer! $$ \frac{3x^3 - 3x^2 + 7x - 7}{27x^4 - 147} = \frac{(x-1)}{3(3x^2 - 7)} \; ✅ $$ [^1]: If your brain is like mine (which I hope it's not tbh), you may be like, "wait, so math just can't solve it?" Well, it turns out, this is literally the equation that led weird mathematicians to invent the "imaginary number" $i = \sqrt{-1}$. Basically, when they tried to solve $x^2 + 9 = 0$, they were like, ok, let's go: $$ x^2 + 9 = 0 \iff x^2 = -9 \iff x = \sqrt{-9} \; 😵 $$ and most people said, "ok, can't take the square root of a negative number, game over". But a little guy named **Euler**, who you know from his famous number $e \approx 2.718$, decided to say "well, what if we just use $i$ to represent $\sqrt{-1}$, then we can write $$ x = \pm \sqrt{-9} = \pm \sqrt{9}i = \pm 3i, $$ and that looked nice and clean enough for mathematicians to adopt. Because, now look at how nicely we can factor $x^2 + 9$: $$ x^2 + 9 = (x + 3i)(x - 3i) $$ and you can FOIL the right-side term to see how this works: $$ (x + 3i)(x - 3i) = x^2 + 3ix - 3ix - 9i^2, $$ but since the $3ix$ and $-3ix$ cancel, and $i^2 = (\sqrt{-1})^2 = -1$, this simplifies to $$ x^2 +3ix - 3ix - 9i^2 = x^2 - 9(\sqrt{-1})^2 = x^2 - 9(-1) = x^2 + 9. ✅ $$ Bam! $x^2 + 9 = (x+3i)(x-3i)$, and with $i$ in our toolbox we finally have formulas for both the **sum** and **difference** of squares: $$ \begin{align} x^2 - b^2 &= (x+b)(x-b) \\ x^2 + b^2 &= (x+bi)(x-bi) \end{align} $$