Step 1: Understanding the Concept
The numerator has a higher degree than the denominator, so divide first.
Step 2: Divide
\(x^{3}+x^{2}+2x+1=(x+2)(x^{2}-x+1)+(3x-1)\).
So the integrand is \(x+2+\frac{3x-1}{x^{2}-x+1}\).
Step 3: Split the remainder
\(3x-1=\frac{3}{2}(2x-1)+\frac{1}{2}\).
So \(\int\frac{3x-1}{x^{2}-x+1}dx=\frac{3}{2}\log|x^{2}-x+1|+\frac{1}{2}\int\frac{dx}{\left(x-\frac{1}{2}\right)^{2}+\frac{3}{4}}\).
Step 4: Integrate
The last integral gives \(\frac{1}{2}\cdot\frac{2}{\sqrt{3}}\tan^{-1}\frac{2x-1}{\sqrt{3}}=\frac{1}{\sqrt{3}}\tan^{-1}\frac{2x-1}{\sqrt{3}}\).
Adding \(\int(x+2)dx=\frac{x^{2}}{2}+2x\) gives the full answer.
Final Answer:
The integral is x squared over 2 plus 2x plus (3/2) log of the quadratic plus (1/sqrt3) tan inverse term plus c.
\[ \boxed{\text{(B) }\dfrac{x^{2}}{2}+2x+\dfrac{3}{2}\log |x^{2}-x+1|+\dfrac{1}{\sqrt{3}}\tan ^{-1}\left(\dfrac{2x-1}{\sqrt{3}}\right)+c} \]