How can I integrate this function?
$$\int \left( {3x^3+3x^2+3x+1 \over (x^2+1)(x+1)^2}\right)dx$$
Using a previous example I have found:
$$\int \left({3x^3+3x^2+3x+1 \over (x^2+1)(x+1)^2}dx\right) ={A\over x^2+1}+{B \over x+1}+{Cx+D\over (x+1)^2}$$
And then: $$\int 3x^3+3x^2+3x+1 ={A(x+1)(x+1)^2}+{B(x^2+1)(x+1)^2}+{Cx+D(x^2+1)(x+1)^2}$$
How ever now I'm supposed to substitute a value of x into the formula, but I'm not sure what value of x to use, nor do I know if I have done these steps correctly
Can anyone please point me in the right direction?
Hints
The first step is roughly correct, you have to find the values of A, B, C and D such that
$$\int \left({3x^3+3x^2+3x+1 \over (x^2+1)(x+1)^2}dx\right) =\int \left({Ax+B\over x^2+1}+{C \over x+1}+{D\over (x+1)^2})\right)dx$$
To find the values of the constant, several methods exist, you can have a look at https://en.wikipedia.org/wiki/Partial_fraction_decomposition. The brutal method is to proceed by identification. There ara smartest methods such as multiplying both expressions by $(x+1)^2$, which gives
$${3x^3+3x^2+3x+1 \over (x^2+1)} ={(Ax+B)(x+1)^2\over x^2+1}+{C (x+1)}+{D} $$
And then using $x=-1$ to find that ${-3+3-3+1 \over 2} = 0+0+D$, and then $D=-1$.
The second step is wrong. Once you have the values of the constants, use the facts that
$$ \int \dfrac{1}{x^2+1}\mathrm{d}x=\arctan(x) + \mathrm{constant}$$ $$ \int \dfrac{2x}{x^2+1}\mathrm{d}x=\ln(x^2+1) + \mathrm{constant}$$ $$ \int \dfrac{1}{x+1}\mathrm{d}x=\ln(x + 1) + \mathrm{constant}$$ $$ \int \dfrac{1}{(x+1)^2}\mathrm{d}x=-\dfrac{1}{x+1} + \mathrm{constant}$$