<s>[INST] Solving integral $\int \frac{3x-1}{\left(x^2+16\right)^3}$ I need to solve this one integral. 
$$\int \frac{3x-1}{\left(x^2+16\right)^3}$$
You need to use the method of undetermined coefficients. That's what I get:


$$(3x-1) = (Ax + B)(x^{2}+16)^{2} + (Cx + D)(x^{2}+16) + (Ex + F)$$
$$1: 256B + 16D + F = -1$$
$$x: 256A + 16C + E = 3$$
$$x2: 32B + D = 0$$
$$x3: 32A + C = 0$$
$$x4: B = 0$$
$$x5: A = 0$$
$$A = 0;B = 0;C = 0;D = 0;E = 3;F = -1;$$

It turns out that I'm back to the same integral. What is wrong I do?
 [/INST] As your integrand is already decomposed in partial fractions, start with the next step. The derivative of $x^2 + 16$ is $2x$, hence we have
$$ \int \frac{3x-1}{(x^2+ 16)^3}\, dx = \frac 32 \int\frac{2x}{(x^2 +16)^3}\,dx -\int\frac{1}{(x^2+16)^3}\, dx $$
In the first term, let $u = x^2+16$, giving
$$ \int \frac{2x}{(x^2+16)^3}\, dx = \int u^{-3}\, du = -\frac 12 u^{-2} 
   = -\frac 1{2(x^2 + 16)^2} $$
In the second term, we let $v = \frac x4$, giving
$$ \int \frac{1}{(x^2 + 16)^3}\, dx = 4\int \frac{1}{(16v^2 + 16)^3}\, dv
  = \frac 1{1024}\int \frac{dv}{(v^2 + 1)^3} $$
Now we have by partial integration that 
$$ \int \frac{dv}{(v^2 + 1)^\alpha} = \frac{v}{2(\alpha-1)(v^2+ 1)^{\alpha - 1}} + \frac{2\alpha -3}{2\alpha - 2}\int \frac{dv}{(v^2 + 1)^{\alpha -1}} $$
Hence
\begin{align*}
  \int \frac{dv}{(v^2 + 1)^3} &= \frac v{4(v^2 + 1)^2} + \frac{3}4 \int \frac {dv}{(v^2 + 1)^2}\\
    &= \frac v{4(v^2 + 1)^2} + \frac 34 \cdot \frac{v}{2(v^2 + 1)} + \frac 34 \cdot \frac 12 \int \frac{dv}{v^2 + 1} \\
    &= \frac v{4(v^2 + 1)^2} +\frac{3v}{8(v^2 + 1)} + \frac 38 \arctan v 
\end{align*}
Let $v = \frac x4$ again and you are done.
</s>