Finding partial fractions expansions mentally

On a problem on a test, my students were asked to find $\displaystyle\int\frac{6x^4-7x^3-13x-6}{x^3-2x^2} dx$,

and one student began by writing $\displaystyle\int\frac{6x^4-7x^3-13x-6}{x^2(x-2)} dx=\int\left(\frac{3}{x^2}+6x+\frac{2}{x-2}+\frac{8}{x}+5\right)dx$.

My question is how someone can get this result without doing any division or partial fraction decomposition -- what techniques can be used to get this?


$$ \frac{6x^4 - 12 x^3 + 5 x^3 - 10 x^2 + 8 x^2 - 16 x + 2 x^2 + 3x-6 }{x^2(x-2)} $$

$$ \frac{(6x^4 - 12 x^3) + (5 x^3 - 10 x^2) + (8 x^2 - 16 x) + 2 x^2 + (3x-6) }{x^2(x-2)} $$

My favorite high school math teacher called the rule a "propitious zero," adding and subtracting the same thing to get a more attractive grouping.

In the order I wrote things, $$ 6x + 5 + \frac{8}{x} + \frac{2}{x-2} + \frac{3}{x^2} $$


The residue theorem, for instance. If $f(x)$ is a polynomial with degree $4$, $$ g(x)=\frac{f(x)}{x^2(x-2)} = \frac{A}{x^2}+\frac{B}{x}+\frac{C}{x-2}+D+Ex \tag{1}$$ is granted, and $$ A=\text{Res}\left(x\cdot g(x),x=0\right),\quad B = \text{Res}(g(x),x=0),\quad C=\text{Res}(g(x),x=2)\tag{2} $$ are straightforward to compute through simple limits. Then, by computing $$ g(x)-\frac{A}{x^2}-\frac{B}{x}-\frac{C}{x-2}, \tag{3} $$ that we know in advance to be a polynomial with degree $\leq 1$, we recover $D$ and $E$, too.

As an alternative, it is enough to notice that: $$\begin{eqnarray*}6x^4-7x^3-13x-6 &=& 6x\cdot x^2(x-2)+5x^3-13x-6\\&=&6x\cdot x^2(x-2)+5\cdot x^2(x-2)+10x^2-13x-6 \end{eqnarray*}$$ and: $$ 10x^2-13x-6 = 10\cdot x^2 + 3(x-2)-10 x,\quad \frac{1}{x(x-2)}=\frac{1}{2}\left(\frac{1}{x-2}-\frac{1}{x}\right).$$


At a schematic level, what makes this problem "ugly" is the $x-2$ in the denominator. So the problem solving strategy is to isolate the $x-2$; the rest should then be easy to do mentally. To this end, you know from the principle of partial fraction decomposition that $\frac{6x^4-7x^3-13x-6}{x^2(x-2)}$ can be written in the form $\frac{p(x)}{x^2} + \frac{c}{x-2}$ for some constant $c$. Thus, $$6x^4-7x^3-13x-6 = p(x)(x-2) + cx^2,$$ so in particular $6x^4-7x^3 - cx^2 -13x-6$ is divisible by $x-2$.

There is a standard algorithm for determining when a polynomial $a x^4 + bx^3 + cx^2 + dx+e$ is divisible by $x-2$: It is divisible if and only if $e+2(d+2(c+2(b+2(a)))) = 0$. In the case at hand, this translates to $0=-6+2(-13+2(-c+2(-7+2(6)))) = 8-4c$, which means $c=2$.

Now we can determine $p(x) = \frac{6x^4-7x^3-2x^2-13x-6}{x-2} = 6x^3 + 5x^2 + 8x + 3$. Dividing this by $x^2$ gives all the other terms in the decomposition of the original fraction.

There are really only two computations to do here: figuring out $c$, and dividing $6x^4-7x^3-2x^2-13x-6$ by $x-2$, both of which can reasonably be done in one's head.


Let me expand Will Jagy's "propitious zero" method a bit, to show the process and the reasoning behind it in more detail. We'll start with the original expression:

$$\frac{6x^4-7x^3-13x-6}{x^3-2x^2}.$$

Having factored the denominator $x^3-2x^2$ into $x^2(x-2)$, we want to rearrange the expression in the numerator so as to group it into terms that are each divisible by $x-2$ (or by $x^2$). To be divisible by $x-2$, each such term must necessarily be of the form $cx^{n+1}-2cx^n = cx^n(x-2)$, where $c$ is some constant.

For example, clearly $6x^4-7x^3$ isn't divisible by $x-2$, but $6x^4-12x^3$ would be. We can add $-5x^3 + 5x^3 = 0$ to the numerator to obtain the equivalent expression:

$$\frac{(6x^4-12x^3)+5x^3-13x-6}{x^2(x-2)}.$$

Now we have a new $5x^3$ term to deal with, which would need to be paired with $-10x^2$ to make it divisible by $x-2$. So let's add $-10x^2 + 10x^2 = 0$ to the numerator this time, to get:

$$\frac{(6x^4-12x^3)+(5x^3-10x^2)+10x^2-13x-6}{x^2(x-2)}.$$

Now, we could continue the same way with the $10x^2$ term, adding $-7x+7x=0$ to get $10x^2-13x = (10x^2-20x) + 7x$ and so on.

But since the denominator already contains $x^2$, we might as well choose to accept a lone $cx^2$ term in the numerator, to be later simplified into $\frac{cx^2}{x^2(x-2)} = \frac{c}{x-2}$. Instead, we can switch to working from the other end, and collect the constant term $-6$ into $3x-6$:

$$\frac{(6x^4-12x^3)+(5x^3-10x^2)+10x^2-16x+(3x-6)}{x^2(x-2)}.$$

And finally we can collect the $-16x$ term into $8x^2-16x$, leaving us with:

$$\frac{(6x^4-12x^3)+(5x^3-10x^2)+2x^2+(8x^2-16x)+(3x-6)}{x^2(x-2)}$$ $$=\frac{6x^3}{x^2}+\frac{5x^2}{x^2}+\frac{2}{x-2}+\frac{8x}{x^2}+\frac{3}{x^2}$$ $$=6x+5+\frac{2}{x-2}+\frac{8}{x}+\frac{3}{x^2}.$$

All this is something you might be able to do purely mentally, if you've got a good short-term memory. But it's certainly doable in less than a minute with just a small bit of scratch paper. Your notes on paper might look something like this:$\require{cancel}$

$$\frac{6x^4\overset{(-10+2+8)x^2}{\overset{-12+5}{\cancel{-7}x^3}\overset{-16+3}{\cancel{-13}x}}-6}{x^2(x-2)} = 6x+5+\frac{2}{x-2}+\frac{8}{x}+\frac{3}{x^2}.$$