Partial Fractions Variables $$\int\frac{x^3+6x^2+3x+16}{x^3+4x}\,dx$$
Eventually one solves that a variable (I used $C$) ${}= -x$.
By variables I mean the decomposition yields $A + Bx+C$.
Therefore $C = -1$.
I think that $C$ should equal $-x$. How is what I think not possible?
 A: Partial fraction decomposition here only works because it is proven that if $P(x)$ is a polynomial, an expression 
\begin{equation}
\frac{P(x)}{(x)(ax^{2}+b)}
\end{equation}
...can be put in the form:
\begin{equation}
\frac{A}{x}+\frac{Bx+C}{ax^{2}+b}
\end{equation}
...IF A, B, and C are constants. Otherwise, all bets are off.
It is possible that it works with C=-x in this case by coincidence, which you can check, but that's not a partial fraction decomposition; a partial fraction decomposition is one in which A, B, and C are constant.
I'll do the problem here:
First, factor the denominator so that it contains only one term:
\begin{equation}
x^{3}+4x=x(x^{2}+4)
\end{equation}
The goal is to find an A, B, and C (constants) such that:
\begin{equation}
\frac{x^{3}+6x^{2}+3x+16}{x(x^{2}+4)}=\frac{A}{x}+\frac{Bx+C}{x^{2}+4}
\end{equation}
Multiplying both sides by $x(x^{2}+4)$:
\begin{equation}
x^{3}+6x^{2}+3x+16=A(x^{2}+4)+(Bx+C)x=A(x^{2}+4)+Bx^{2}+Cx
\end{equation}
Plugging in x=0 will cancel everything on the right except the A term. The left will become 16:
\begin{equation}
16=A(4) \implies A=4
\end{equation}
Unfortunately, we can't use that strategy to find B and C, because there is no number which will make the A term 0. So I'll use a different strategy.
Working on the right hand side, I'll plug in A=4 because we know that now, and order everything by the power:
\begin{equation}
4(x^{2}+4)+Bx^{2}+Cx=4x^{2}+16+Bx^{2}+Cx=Bx^{2}+4x^{2}+Cx+16
\end{equation}
Coming back to the whole equation (having simplified the right side), we have:
\begin{equation}
x^{3}+6x^{2}+3x+16=Bx^{2}+4x^{2}+Cx+16
\end{equation}
This is the interesting part: The only way for these two to be equal for all x is if all the $x^{2}$ coefficients on the left sum to the $x^{2}$ coefficients on the right. So...
\begin{equation}
6=B+4 \implies B=2
\end{equation}
Now, same with the x coefficients:
\begin{equation}
3=C
\end{equation}
In conclusion, 
\begin{equation}
\frac{x^{3}+6x^{2}+3x+16}{x(x^{2}+4)}=\frac{4}{x}+\frac{2x+3}{x^{2}+4}
\end{equation}
This new function is easier to integrate. Split the second fraction into two fractions:
\begin{equation}
=\int \frac{4}{x}+\frac{2x}{x^{2}+4}+\frac{3}{x^{2}+4}dx
\end{equation}
With $u=x^{2}+4$, and dividing by 4 on the top and bottom of the 3rd fraction, this equals
\begin{equation}
4\int \frac{1}{x}dx+\int \frac{du}{u}+\int \frac{3/4}{(x/2)^{2}+1}dx
\end{equation}
Then the first two terms are just natural logs (see below). The rightmost term is an arctan.
\begin{equation}
\int \frac{1}{x}dx=ln(x)+C 
\end{equation}
\begin{equation}
\int \frac{1}{x^{2}+1}dx=arctan(x)+C 
\end{equation}
