Partial Fraction Decomposition Problem... half answered... $$\int \frac{5x^3+19x^2+27x-3}{(x+3)^2(x^2+3)}dx$$
I know I will be using partial fraction decomposition on this problem, at least it seems that way. so far, what I have is this:
$$\frac{5x^3+19x^2+27x-3}{(x+3)^2(x^2+3)}=\frac{A}{x+3}{}+\frac{B}{(x+3)^2}+\frac{Cx+D}{x^2+3}$$
Multiplying by the LCD : $(x+3)^2(x^2+3)$
I am left with :
$$5x^3+19x^2+27x-3=A(x+3)(x^2+3)+B(x^2+3)+(Cx+D)(x+3)^2$$
By setting $x=-3:B=-4$ 
Now is where I am running into trouble. Now that I can substitute B into the original decomposition equation, There is no value of x that will leave only one variable to solve for. Please lend me a hand you guys(and girls). Thanks!
 A: There are many options: 


*

*Differentiate and substitute $x=-3$. 

*Substitute simple values such as $x=0$ and $x=1$ and $x=-1$ to get three equations in three unknowns. 

*The method @Shu mentions in the comments. 

*Substitute $x=\sqrt{-3}$ and $x=-\sqrt{-3}$. 
A: I'll denote $f(x)$ this rational function. Here is an alternative to the expanding/equating strategy.
Limit trick: multiply both sides by $x$, compare the degrees, and let $x$ tend to $+\infty$:
$$
\lim_{x\rightarrow+\infty}xf(x)=5=A+C.
$$
Substitution trick: pick a small value in the domain of $f$. Here $0$ is perfect:
$$
f(0)=\frac{-3}{27}=\frac{A}{3}+\frac{B}{3}+\frac{D}{3}
$$
We need one more equation. Let's try $-2$, it's not too bad.
$$
f(-2)=\frac{-21}{7}=A+B+\frac{D-2C}{7}.
$$
Now, no miracle, there is a $4\times 4$ system to solve using also $B=-4$.
A: $$5x^3+19x^2+27x-3=A(x+3)(x^2+3)+B(x^2+3)+(Cx+D)(x+3)^2=$$
$$=(A+C)x^3+(3A+B+6C)x^2+(3A+6D+9C)x+(9A+3B+9D)$$
equating the coefficients next to the same power of $x$ we get following system
$$A+C=5$$
$$3A+B+6C=19$$
$$3A+6D+9C=27$$
$$9A+3B+9D=-3$$
A: \begin{align}
   5x^3+19x^2+27x-3 &= A(x+3)(x^2+3)+B(x^2+3)+(Cx+D)(x+3)^2
            &\text{Let $x = -3$}\\
   -48&=12B \\
   B &= -4 & \text{Go back and let $B = -4$}\\
\hline
   5x^3+19x^2+27x-3 &= A(x+3)(x^2+3)-4(x^2+3)+(Cx+D)(x+3)^2 \\
   5x^3 + 23x^2 + 27x + 9 &=  A(x+3)(x^2+3)+(Cx+D)(x+3)^2
      &\text{Divide both sides by $(x+3)$}\\
\hline
   5x^2 + 8x + 3 &=  A(x^2+3)+(Cx+D)(x+3) &\text{Let $x=-3$} \\
   24 &= 12A \\
   A &= 2 &\text{Go back and let A = 2} \\
\hline
   5x^2 + 8x + 3 &=  2(x^2+3)+(Cx+D)(x+3) \\
   3x^2 + 8x - 3 &= (Cx+D)(x+3) 
      &\text{Divide both sides by $(x+3)$} \\
   3x-1 &= Cx+D \\
   C &= 3 \\
   D &= -1
\end{align}
Computational note.
The quotient $(5x^3 + 23x^2 + 27x + 9) \div (x+3)$ and the value of 
that quotient at $x=-3$ can be accomplished with synthetic division.
\begin{array}{r|rrrrr}
      & 5 &  23 &  27 &  9 \\
   -3 & 0 & -15 & -24 & -9 \\
\hline
      & 5 &   8 &   3 \\
   -3 & 0 & -15 &  21\\
\hline
      & 5 &  -7 &  24
\end{array}
Hence $(5x^3 + 23x^2 + 27x + 9) \div (x+3) = 5x^2+8x+3$ and the value of 
$5x^2+8x+3$ when $x=-3$ is $24$.
