Bài 6:
a: \(P=\left(\dfrac{1}{x-1}+\dfrac{x}{\left(x-1\right)\left(x^2+x+1\right)}\cdot\dfrac{x^2+x+1}{x+1}\right)\cdot\dfrac{\left(x+1\right)^2}{2x+1}\)
\(=\left(\dfrac{1}{x-1}+\dfrac{x}{\left(x-1\right)\left(x+1\right)}\right)\cdot\dfrac{\left(x+1\right)^2}{2x+1}\)
\(=\dfrac{x+1+x}{\left(x-1\right)\left(x+1\right)}\cdot\dfrac{\left(x+1\right)^2}{2x+1}=\dfrac{x+1}{x-1}\)
b: Để P nguyên thì x-1+2 chia hết cho x-1
=>\(x-1\in\left\{1;-1;2;-2\right\}\)
=>\(x\in\left\{2;0;3\right\}\)