a)P=\(\left(\dfrac{x}{x^2-4}+\dfrac{1}{x+2}-\dfrac{2}{x-2}\right):\left(1-\dfrac{x}{x+2}\right)=\left(\dfrac{x}{x^2-2^2}+\dfrac{1}{x+2}-\dfrac{2}{x-2}\right):\left(\dfrac{x+2}{x+2}-\dfrac{x}{x+2}\right)=\left(\dfrac{x}{\left(x+2\right)\left(x-2\right)}+\dfrac{1}{x+2}-\dfrac{2}{x-2}\right):\left(\dfrac{x+2-x}{x+2}\right)=\left(\dfrac{x}{\left(x+2\right)\left(x-2\right)}+\dfrac{x-2}{\left(x+2\right)\left(x-2\right)}-\dfrac{2\left(x+2\right)}{\left(x-2\right)\left(x+2\right)}\right):\dfrac{2}{x+2}=\left(\dfrac{x}{\left(x+2\right)\left(x-2\right)}+\dfrac{x-2}{\left(x+2\right)\left(x-2\right)}-\dfrac{2x+4}{\left(x-2\right)\left(x+2\right)}\right).\dfrac{x+2}{2}\)
=\(\dfrac{x+x-2-\left(2x+4\right)}{\left(x+2\right)\left(x-2\right)}.\dfrac{x+2}{2}=\dfrac{x+x-2-2x-4}{\left(x+2\right)\left(x-2\right)}.\dfrac{x+2}{2}=\dfrac{-6}{\left(x+2\right)\left(x-2\right)}.\dfrac{x+2}{2}=\dfrac{-6\left(x+2\right)}{\left(x+2\right)\left(x-2\right)2}=\dfrac{-3}{x-2}\)
b)Để P thuộc Z
=>\(\dfrac{-3}{x-2}\)thuộc z
=>-3chia hết cho x-2
=>x-2 thuộc vào ước của -3 là +-1, +-3
Với x-2=1=>x=3(thỏa mãn)
Với x-2=-1=>x=1(thỏa mãn)
Với x-2=3=>x=5(thỏa mãn)
Với x-2=-3=>x=-1(thỏa mãn)
Vậy x=3, x=1, x=5, x=-1 thì P nhận giá trị nguyên