(N/A) Let $\frac{x^{2}+x+1}{(x+1)^{2}(x+2)} = \frac{A}{x+1} + \frac{B}{(x+1)^{2}} + \frac{C}{x+2}$ ..........$(1)$
Multiplying both sides by $(x+1)^{2}(x+2)$,we get:
$x^{2}+x+1 = A(x+1)(x+2) + B(x+2) + C(x+1)^{2}$
Expanding the terms:
$x^{2}+x+1 = A(x^{2}+3x+2) + B(x+2) + C(x^{2}+2x+1)$
$x^{2}+x+1 = (A+C)x^{2} + (3A+B+2C)x + (2A+2B+C)$
Equating the coefficients of $x^{2}, x$ and the constant term:
$A+C = 1$
$3A+B+2C = 1$
$2A+2B+C = 1$
Solving these equations:
From $A+C=1$,we have $C = 1-A$.
Substituting into the other equations:
$3A+B+2(1-A) = 1 \Rightarrow A+B = -1 \Rightarrow B = -1-A$
$2A+2(-1-A)+(1-A) = 1 \Rightarrow 2A-2-2A+1-A = 1 \Rightarrow -A-1 = 1 \Rightarrow A = -2$
Then $B = -1-(-2) = 1$ and $C = 1-(-2) = 3$.
Substituting values into equation $(1)$:
$\int \frac{x^{2}+x+1}{(x+1)^{2}(x+2)} dx = \int \left( \frac{-2}{x+1} + \frac{1}{(x+1)^{2}} + \frac{3}{x+2} \right) dx$
$= -2 \ln|x+1| - \frac{1}{x+1} + 3 \ln|x+2| + K$