I was trying to solve the following integral:
$$\int \frac{dx}{(x^2 + 2x + 1)(x^2 + 1)}$$
But I'm having some trouble doing partial fractions decomposition with this one. What I did was the following: Firstly I simplified the denominator of the fraction:
$$\int \frac{dx}{(x^2 + 1)(x + 1)^2}$$
So, I know that, to do partial fractions with this we are suposed to write it as:
$$\frac{1}{(x^2 + 1)(x + 1)^2} = \frac{*}{x^2 + 1} + \frac{*}{x + 1} + \frac{*}{(x + 1)^2}$$
The part I'm having touble with is figuring out what should go in the $*$. I checked in WolframAlpha and it's supossed to be written as:
$$\frac{1}{(x^2 + 1)(x + 1)^2} = \frac{Ax + B}{x^2 + 1} + \frac{C}{x + 1} + \frac{D}{(x + 1)^2}$$
My question is: How can I conclude this? Is there a general rule for doing this? What is the thought process behind choosing what to put in the numerator of the fractions? My teacher only showed us some examples and I also find myself having some trouble doing this when it's a type of fraction I've never seen before, can you give me some general tips when doing this?
Rule of thumb: "The partial fraction $\frac{P(x)}{Q(x)}$ has the following property: the degree of $P(x)$ must be one less than the degree of $Q(x)$. So we have a constant over a linear, a linear over a quadratic, a quadratic over a cubic, etc." and this always works (Taken from Joe's comment)
Actually, you take linear in the numerator even for $(x+1)^2$ but it gets reduced
$$\frac{1}{(x^2 + 1)(x + 1)^2} = \frac{Ax+B}{x^2 + 1} + \frac{C}{x + 1} + \frac{Dx+E}{(x + 1)^2}$$
$$\frac{1}{(x^2 + 1)(x + 1)^2} = \frac{Ax+B}{x^2 + 1} + \frac{C}{x + 1} + \frac{D(x+1)+(E-D)}{(x + 1)^2}$$ $$\frac{1}{(x^2 + 1)(x + 1)^2} = \frac{Ax+B}{x^2 + 1} + \frac{C+D}{x + 1} + \frac{(E-D)}{(x + 1)^2}$$
And you get the form, $$\frac{1}{(x^2 + 1)(x + 1)^2} = \frac{*}{x^2 + 1} + \frac{*}{x + 1} + \frac{*}{(x + 1)^2}$$
So the rule of thumb always works, WolframAlpha gives you a simplified version.
Hope this helped.:)