<s>[INST] 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?
 [/INST] 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.
</s>