Question:
Compute $\displaystyle \int\frac{x^2+1}{(x^2+2)(x+1)} \, dx$
My Approach:
As per my knowledge this integral can be divided in partial Fraction of form $\dfrac{Ax+B}{x^2+px+q}$ and then do the following as per to integrate it.
Solution:
Taking $\dfrac{x^2+1}{(x^2+2)(x+1)}=\dfrac{Ax^2+Bx+C}{x^2+2}+\dfrac{D}{x+1}$
Rule given: Denominator g(x) contains quadratic tractor (may not be factorisable). To each non-repeated quadratic factor of the form $x^2+px+q$(or $x^2+q$, $q$ not equal to $0$), there Should be a partial Fraction of the form $Ax+B/(x^2+px+q)$.
My problem:
I can't understand why the solution provided deviates from the rule that I have studied to solve these kind of problems.
Book:
ISC MATHEMATICS XII
Publishers:
Kalyani
Dividing $x^2+1$ by $x^2+2$ yields $1$ as the quotient and $-1$ as the remainder, so we have $$ \frac{x^2+1}{x^2+2} = 1 - \frac 1 {x^2+2}. $$ So \begin{align} & \frac{x^2+1}{(x^2+2)(x+1)} = \frac 1 {x+1} - \frac 1 {(x^2+2)(x+1)} \\[15pt] = {} & \frac 1 {x+1} + \frac{Ax+B}{x^2+2} + \frac{\text{some constant}}{x+1} \\[15pt] = {} & \frac{Ax+B}{x^2+2} + \frac C {x+1} \end{align} Thus I would decompose this into partial fractions in a way consistent with your approach.