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?

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}.$$
